|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.fc.emf.GraphObjects
public class GraphObjects
This class is used for traversing Data Object structures. It can create Entry Attributes corresponding to the Data Objects in the Data Graph and to add new Data Object to it.
Constructor Summary | |
---|---|
GraphObjects(ResourceHash resHash)
Initializes the object. |
Method Summary | |
---|---|
void |
applyAttribute(org.eclipse.emf.ecore.sdo.EDataObject root,
Attribute attribute,
Map prefixToURIMap)
Adds the value(s) of the Entry Attribute to the data graph rooted at root . |
void |
applyClassToModel(org.eclipse.emf.ecore.EClass rootClass,
String featurePath,
org.eclipse.emf.ecore.EClass dataType,
Map prefixToURIMap)
The method changes the type of a feature in the model specified by path expression defining the nesting of the XML elements. |
List |
getAttributes(org.eclipse.emf.ecore.sdo.EDataObject root,
Map uriToPrefixMap,
boolean alwaysPrefix)
Traverse the data graph rooted at root and creates
Entry Attributes for the Data Objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphObjects(ResourceHash resHash)
resHash
- Specifies the logger used for logging information
and errors messages.Method Detail |
---|
public List getAttributes(org.eclipse.emf.ecore.sdo.EDataObject root, Map uriToPrefixMap, boolean alwaysPrefix)
root
and creates
Entry Attributes for the Data Objects.
root
- Data Object specifying the root element of the data graph.uriToPrefixMap
- namespace URI to prefix map.alwaysPrefix
- if true
the XML element or attribute names
are prefixed with namespace URI if no prefix is present.
public void applyAttribute(org.eclipse.emf.ecore.sdo.EDataObject root, Attribute attribute, Map prefixToURIMap) throws Exception
root
.
The Entry Attribute's name specifies the position of the value(s) in the data graph.
If part of the intermediate elements from the root to the values' position do not exists
they are also created.
root
- Data Object specifying the root element of the data graph.attribute
- an Entry Attribute which name specifies the position in the
data graph where the Entry Attribute's value(s) have to be inserted.prefixToURIMap
- prefix to namespace URI map.
Exception
- if the Entry Attribute's name contains a non-existing XML element
or attribute name according to the XML Schema.
if the Entry Attribute's name specifies an XML element or attribute that.public void applyClassToModel(org.eclipse.emf.ecore.EClass rootClass, String featurePath, org.eclipse.emf.ecore.EClass dataType, Map prefixToURIMap) throws Exception
rootClass
- the root class in the Ecore model.featurePath
- path expression representing the path from to root
class to the feature.dataType
- the feature's new data type.prefixToURIMap
- prefix to namespace URI map
Exception
- if the Entry Attribute's name contains a non-existing
XML element or attribute name according to the model.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |