[This is preliminary documentation and is subject to change.]
Populate a SifDataObject from values in the supplied IDictionary by evaluating
all field rules for the associated SIF Data Object type. For each key in
the IDictionary, the corresponding field rule is evaluated to assign the
IDictionary value to the appropriate element or attribute in the SifDataObject.
If a field is not represented in the IDictionary, its associated rule will
not be evaluated.
This method is intended to populate a new SifDataObject instance when an
agent is publishing objects to a zone. The other form of the
map method is intended to obtain element and attribute values
from a SifDataObject consumed by the agent when processing SIF
Events or SIF Responses.
To use this method,
-
Create a IDictionary and populate it with all known field values. The
key of each entry must be the local application-defined name of
the field -- the same field name used in field rules -- and the
value is the string value to assign to the corresponding element
or attribute in the SifDataObject when a field rule matches.
Create a SifDataObject instance of the appropriate type (e.g. a
Edustructures.SifWorks.student.StudentPersonal instance if
the mapping will be applied to an incoming <StudentPersonal>
message).
Call this map method to apply all field values in
the IDictionary to corresponding elements and/or attributes in the
SifDataObject. The method first looks up the ObjectMapping
instance corresponding to the SIF Data Object type. If no ObjectMapping
has been defined for the object type, no action is taken and the
method returns successfully without exception. Otherwise, all
field rules defined by the ObjectMapping are evaluated in order.
| C# | Visual Basic | Visual C++ |
public void Map( IDictionary values, SifDataObject data )
Public Sub Map ( _ values As IDictionary, _ data As SifDataObject _ )
public: void Map ( IDictionary^ values, SifDataObject^ data )
- values (IDictionary)
- A IDictionary that contains field values to assign to the supplied SifDataObject, where each entry in the map is keyed by the local application-defined name of a field and the value is the text value to assign to the corresponding element or attribute of the SifDataObject.
- data (SifDataObject)
- The SifDataObject to assign field values to
| Exception | Condition |
|---|---|
| AdkMappingException | thrown if an error occurs while
evaluating a field rule
|