public class CoreDataGraph extends Object implements PlasmaDataGraph
| Constructor and Description |
|---|
CoreDataGraph() |
CoreDataGraph(PlasmaDataObject root) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PlasmaDataGraphEventVisitor visitor)
Begin breadth-first traversal of this DataGraph, the given visitor
receiving various events for each graph node traversed.
|
void |
accept(PlasmaDataGraphVisitor visitor)
Begin breadth-first traversal of this DataGraph, the given visitor
receiving "visit" events for each graph node traversed.
|
void |
acceptDepthFirst(PlasmaDataGraphVisitor visitor)
Begin depth-first traversal of this DataGraph, the given visitor receiving
"visit" events for each graph node traversed.
|
String |
asXml()
Traverses, serializes and returns the data graph formatted as XML.
|
commonj.sdo.DataObject |
createRootObject(String namespaceURI,
String typeName)
Creates a new root data object of the
specified type. |
commonj.sdo.DataObject |
createRootObject(commonj.sdo.Type type)
Returns the root
data object of this data graph. |
String |
dump()
Traverses, serializes and returns the data graph in an internal text format
useful for debugging.
|
String |
dumpDepthFirst()
Traverses the data graph depth first, serializing and returning the data
graph in an internal text format useful for debugging.
|
commonj.sdo.ChangeSummary |
getChangeSummary()
Returns the
change summary associated with this data
graph. |
Object |
getId()
Returns an object to be used and managed by client
Data Access Services as an
identifier for a Data Graph. |
String |
getPath(commonj.sdo.DataObject dataObject)
Calculates and returns the path relative to the data-graph root for the
given data object.
|
commonj.sdo.DataObject |
getRootObject()
Returns the root
data object of this data graph. |
commonj.sdo.Type |
getType(String uri,
String typeName)
Returns the
type with the given the URI,
or contained by the resource at the given URI, and with the given
name. |
UUID |
getUUID()
Returns the UUID for this data graph, which is the same UUID used for the
root Data Object.
|
String |
getUUIDAsString()
Returns the UUID for this data graph, which is the same UUID used for the
root Data Object, as a character string.
|
commonj.sdo.DataObject |
removeRootObject()
Detaches and returns the root
data object of this data
graph. |
void |
setId(Object id)
Sets an object to be used and managed by client
Data Access Services as an
identifier for a Data Graph. |
String |
toString() |
public CoreDataGraph()
public CoreDataGraph(PlasmaDataObject root)
public UUID getUUID()
getUUID in interface PlasmaDataGraphpublic String getUUIDAsString()
getUUIDAsString in interface PlasmaDataGraphpublic void setId(Object id)
Data Access Services as an
identifier for a Data Graph.setId in interface PlasmaDataGraphid - the identifierpublic Object getId()
Data Access Services as an
identifier for a Data Graph.getId in interface PlasmaDataGraphpublic commonj.sdo.DataObject createRootObject(String namespaceURI, String typeName)
specified type. An
exception is thrown if a root object exists.createRootObject in interface commonj.sdo.DataGraphnamespaceURI - namespace of the type.typeName - name of the type.IllegalStateException - if the root object already exists.createRootObject(Type),
getType(String, String)public commonj.sdo.DataObject createRootObject(commonj.sdo.Type type)
data object of this data graph.createRootObject in interface commonj.sdo.DataGraphDataObject.getDataGraph()public commonj.sdo.ChangeSummary getChangeSummary()
change summary associated with this data
graph.getChangeSummary in interface commonj.sdo.DataGraphChangeSummary.getDataGraph()public commonj.sdo.DataObject getRootObject()
data object of this data graph.getRootObject in interface commonj.sdo.DataGraphDataObject.getDataGraph()public commonj.sdo.DataObject removeRootObject()
data object of this data
graph.removeRootObject in interface PlasmaDataGraphDataObject.getDataGraph()public commonj.sdo.Type getType(String uri, String typeName)
type with the given the URI,
or contained by the resource at the given URI, and with the given
name.getType in interface commonj.sdo.DataGraphuri - the namespace URI of a type or the location URI of a resource
containing a type.typeName - name of a type.public String getPath(commonj.sdo.DataObject dataObject)
getPath in interface PlasmaDataGraphdataObject - the target data objectpublic void accept(PlasmaDataGraphVisitor visitor)
accept in interface PlasmaDataGraphvisitor - the graph visitor receiving traversal eventsDataGraph,
DataObject,
PlasmaDataGraph,
PlasmaDataObject,
PlasmaDataGraphVisitor.visit()public void acceptDepthFirst(PlasmaDataGraphVisitor visitor)
acceptDepthFirst in interface PlasmaDataGraphvisitor - the graph visitor receiving traversal eventsDataGraph,
DataObject,
PlasmaDataGraph,
PlasmaDataObject,
PlasmaDataGraphVisitor.visit()public void accept(PlasmaDataGraphEventVisitor visitor)
accept in interface PlasmaDataGraphvisitor - the graph visitor receiving traversal eventsDataGraph,
DataObject,
PlasmaDataGraph,
PlasmaDataObject,
PlasmaDataGraphEventVisitor.start(),
PlasmaDataGraphEventVisitor.end()public String dump()
PlasmaDataGraphdump in interface PlasmaDataGraphpublic String dumpDepthFirst()
PlasmaDataGraphdumpDepthFirst in interface PlasmaDataGraphpublic String asXml() throws IOException
PlasmaDataGraphasXml in interface PlasmaDataGraphIOExceptionCopyright © 2021. All rights reserved.