SIFWorks ADK 2.0
Edustructures.SifWorks.Tools.Mapping Namespace
NamespacesEdustructures.SifWorks.Tools.Mapping

[This is preliminary documentation and is subject to change.]

[Missing namespace summary documentation for N:Edustructures.SifWorks.Tools.Mapping]

Declaration Syntax
C#Visual BasicVisual C++
namespace Edustructures.SifWorks.Tools.Mapping
Namespace Edustructures.SifWorks.Tools.Mapping
namespace Edustructures.SifWorks.Tools.Mapping
Types
All TypesClassesEnumerations
IconTypeDescription
AdkMappingException
Signals an exception in a field mapping rule definition or mapping operation.

FieldMapping
A FieldMapping defines how to map a local application field to an element or attribute of the SIF Data Object type encapsulated by the parent ObjectMapping. Each FieldMapping is associated with a Rule that is evaluated at runtime to carry out the actual mapping operation on a SifDataObject instance. The way the rule behaves is up to its implementation. A FieldMapping may have a default value. If set, the default value is assigned to the SIF element or attribute if the corresponding field value is null or undefined. This is useful if you wish to ensure that a specific SIF element/attribute always has a value regardless of whether or not there is a corresponding value in your application's database. The application-defined field name that is associated with a FieldMapping must be unique; that is, there cannot be more than one FieldMapping for the same application field. However, if you wish to map the same field to more than one SIF element or attribute, you can create an alias. An alias is a FieldMapping that has a unique field name but refers to another field. For example, if your application defines the field STUDENT_NUM and you wish to define two FieldMappings for that field, create an alias:
CopyC#
// Create the default mapping<br />
FieldMapping fm = new FieldMapping("STUDENT_NUM","OtherId[@Type='06']");<br /><br /><br />
// Create an alias (the field name must be unique)<br />
FieldMapping zz = new FieldMapping("MYALIAS","OtherId[@Type='ZZ']");<br />
zz.setAlias( "STUDENT_NUM" );<br /><br />
In the above example, the "STUDENT_NUM" mapping produces an <OtherId> element with its Type attribute set to '06'. The "MYALIAS" mapping produces a second <OtherId> element with its Type attribute set to 'ZZ'. Both elements will have the value of the application-defined STUDENT_NUM field. Note that if MYALIAS were an actual field name of your application, however, the value of the <OtherId Type='ZZ'> element would be equal to that field's value. When creating aliases be sure to choose a name that does not conflict with the real field names used by your application.

MappingDirection
Summary description for MappingDirection.

Mappings
Manages a set of mapping rules that define how to tranform a set of application field values into SIF Data Objects

MappingsFilter
Encapsulates optional filtering attributes for field mapping rules. A field mapping rule can define any of the following filters:
  • SIF Version. The rule will only be applied if the SifVersion instance passed to the
    CopyC#
    Mappings.map
    method matches this value. The version filter is a string comprised of a comparison operator ("=" for equals, "-" for Less Than or Equal To, or "+" for Greater Than or Equal To) followed by a SIF Version identifier. For example, "=1.5" matches SIF 1.5; "+1.1" matches all versions of SIF equal to and greater than 1.1; and "-1.1" matches all versions of SIF less than or equal to SIF 1.1. Filter on SIF Version to map values to version-specific elements or attributes of SIF Data Objects.
  • Direction. The rule will only be applied if the Direction flag (
    CopyC#
    Mappings.DIRECTION_INBOUND
    or
    CopyC#
    Mappings.DIRECTION_OUTBOUND
    ) passed to the
    CopyC#
    Mappings.map
    method matches this value. Filter on Direction to create field mapping rules that differ for inbound messages like SIF_Request than for outbound messages like SIF_Event and SIF_Response.

ObjectMapping
An ObjectMapping defines a set of field mapping rules for a specific SIF Data Object type such as StudentPersonal, StaffPersonal, or BusInfo. ObjectMapping is comprised of zero or more FieldMapping children.

OtherIdMapping
Encapsulates an <OtherId> field mapping

OtherIdRule
A Rule class to evaluate <OtherId> queries as defined by the OtherIdMapping class.

Rule
The abstract base class for all Mappings rules

ValueSet
A ValueSet is an arbitrary mapping table used to map an application's proprietary codes and constants to SIF codes and constants. For example, an agent might define a ValueSet to map grade levels, ethnicity codes, english proficiency codes, and so on. ValueSet stores its data in a HashMap. For each entry in the map, the key is a value defined by the application and the value is a ValueSetEntry object that encapsulates the associated SIF value and other fields like a display title for user interfaces. For example, a ValueSet that maps grade levels might be comprised of the following entries:
KeyValue
PREKPK
K0K
101
202
303
404
505
606
707
808
909
To translate an application-defined value to its SIF equivalent, call the
CopyC#
translate
method. To translate a SIF-defined value to its application-defined equivalent, call the
CopyC#
translateReverse
method.

ValueSetEntry
An entry in a ValueSet. Each ValueSet entry describes a mapping between a local application value and a SIF value. Additional fields include a display title and display order for presenting ValueSet entries in a user interface.

XPathRule
A Rule class to evaluate XPath-like queries as defined by the
CopyC#
SifDtd.lookupByXPath
method