|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.edustructures.sifworks.tools.mapping.ObjectMapping
public class 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.
| Constructor Summary | |
|---|---|
ObjectMapping(java.lang.String objType)
Constructor |
|
ObjectMapping(java.lang.String objType,
org.w3c.dom.Node node)
Constructor |
|
| Method Summary | |
|---|---|
void |
addRule(FieldMapping mapping)
Appends a FieldMapping definition |
void |
clearRules()
Clear all FieldMapping definitions. |
ObjectMapping |
copy(Mappings newParent)
Creates a copy this ObjectMapping instance. |
org.w3c.dom.Node |
getNode()
Gets the optional DOM Node associated with this ObjectMapping instance. |
java.lang.String |
getObjectType()
Gets the SIF Data Object type of this ObjectMapping |
FieldMapping |
getRule(int index)
Gets the FieldMapping at the specified index |
int |
getRuleCount()
Count the number of FieldMapping definitions. |
FieldMapping[] |
getRules(boolean inherit)
Return an array of all FieldMapping definitions |
java.util.List<FieldMapping> |
getRulesList(boolean inherit)
Return a list of all FieldMapping definitions |
void |
insertRule(FieldMapping mapping,
int index)
Insert a FieldMapping definition at the specified index. |
void |
removeRule(FieldMapping mapping)
Remove a FieldMapping definition |
void |
removeRule(int index)
Removes the FieldMapping at the specified index |
void |
setNode(org.w3c.dom.Node node)
Sets the optional DOM Node associated with this ObjectMapping instance. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectMapping(java.lang.String objType)
throws ADKMappingException
objType - The name of a SIF Data Object (e.g. "StudentPersonal")
ADKMappingException
public ObjectMapping(java.lang.String objType,
org.w3c.dom.Node node)
throws ADKMappingException
objType - The name of a SIF Data Object (e.g. "StudentPersonal")node - The optional DOM Node from which this ObjectType was produced
ADKMappingException| Method Detail |
|---|
public org.w3c.dom.Node getNode()
public void setNode(org.w3c.dom.Node node)
public ObjectMapping copy(Mappings newParent)
throws ADKMappingException
This method performs a "deep copy", such that a clone is made of each child FieldMapping. The parent of the new ObjectMapping will be the Mappings object passed to this function. Any DOM Nodes assigned to this object or its children are cloned and appended to the parent Mappings's DOM Node if one exists.
ADKMappingExceptionpublic java.lang.String getObjectType()
public void addRule(FieldMapping mapping)
throws ADKMappingException
mapping - A FieldMapping that defines the rules for mapping a field
of the application to an element or attribute of a SIF Data Object.
There can only be one FieldMapping per unique field name (i.e. if
you have defined a FieldMapping rule with a field name of 'STUDENTNUM',
there cannot be another FieldMapping rule with that same field name.)
To map a single application field to more than one SIF element or
attribute, create a FieldMapping with a unique field name (e.g. 'STUDENTNUM_2')
and call the setAlias method to define it as an alias
of an existing field.
ADKMappingException - thrown if there is already a FieldMapping
with the specified field name
public void insertRule(FieldMapping mapping,
int index)
throws ADKMappingException
mapping - A FieldMapping that defines the rules for mapping a field
of the application to an element or attribute of a SIF Data Object.
There can only be one FieldMapping per unique field name (i.e. if
you have defined a FieldMapping rule with a field name of 'STUDENTNUM',
there cannot be another FieldMapping rule with that same field name.)
To map a single application field to more than one SIF element or
attribute, create a FieldMapping with a unique field name (e.g. 'STUDENTNUM_2')
and call the setAlias method to define it as an alias
of an existing field.
ADKMappingException - thrown if there is already a FieldMapping
with the specified field namepublic void removeRule(FieldMapping mapping)
public void removeRule(int index)
index - The zero-based index of the FieldMappingpublic FieldMapping[] getRules(boolean inherit)
inherit - True to inherit FieldMapping definitions from the
parent Mappings ancestry
public java.util.List<FieldMapping> getRulesList(boolean inherit)
inherit - True to inherit FieldMapping definitions from the
parent Mappings ancestry
public int getRuleCount()
public FieldMapping getRule(int index)
index - The zero-based index of the FieldMappingpublic void clearRules()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||