|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.contentmanagement.contentmanager.stubs.model.trees.Node
org.gcube.contentmanagement.contentmanager.stubs.model.trees.InnerNode
org.gcube.contentmanagement.contentmanager.stubs.model.trees.GDoc
public final class GDoc
Extends InnerNode
for roots of trees that model gDoc
documents.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.gcube.contentmanagement.contentmanager.stubs.model.trees.Node |
---|
Node.State |
Constructor Summary | |
---|---|
GDoc()
Creates an instance. |
|
GDoc(Edge... edges)
Constructs an instance with given edges. |
|
GDoc(GDoc doc)
Copy constructor, creates a clone of a given node. |
|
GDoc(java.lang.String id)
Constructs an instance with a given identifier. |
|
GDoc(java.lang.String id,
Edge... edges)
Constructs an instance with a given identifier and edges. |
|
GDoc(java.lang.String id,
java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes,
Edge... edges)
Constructs an instance with a given identifier, attributes, and edges. |
|
GDoc(java.lang.String id,
Node.State state,
java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes,
Edge... edges)
|
|
GDoc(java.lang.String collID,
java.lang.String id,
Edge... edges)
Constructs an instance in a given collection with a given identifier and given edges. |
Method Summary | |
---|---|
java.lang.String |
collectionID()
Returns the identifier of the document's collection. |
void |
collectionID(java.lang.String id)
Sets the identifier of the document's collection. |
void |
delete()
Marks the node as State#DELETED , removing all its attributes and all its edges. |
GDoc |
delta(GDoc future)
Returns a document that reflects the delta between this document and a given input document, or null if
the documents are equals. |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class org.gcube.contentmanagement.contentmanager.stubs.model.trees.InnerNode |
---|
add, add, child, child, child, child, child, child, children, children, children, children, children, children, children, children, delta, descendant, descendant, descendants, descendants, descendants, descendants, edge, edge, edge, edges, edges, edges, edges, equals, hasEdge, hasEdge, hasEdge, labels, labels, main, remove, remove, remove, remove |
Methods inherited from class org.gcube.contentmanagement.contentmanager.stubs.model.trees.Node |
---|
ancestors, ancestorsAndSelf, attribute, attribute, attribute, attributes, hasAttribute, hasAttribute, hasAttribute, id, parent, removeAttribute, removeAttribute, removeAttribute, setAttribute, setAttribute, setAttribute, state, uri |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GDoc(GDoc doc)
n
- the node.public GDoc()
public GDoc(java.lang.String id)
id
- the identifier.public GDoc(java.lang.String id, Edge... edges)
id
- the identifier.edges
- the edges.public GDoc(Edge... edges)
edges
- the edges.public GDoc(java.lang.String collID, java.lang.String id, Edge... edges)
collID
- the collection identifier.id
- the identifier.edges
- the edges.public GDoc(java.lang.String id, java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes, Edge... edges)
id
- the identifier.attributes
- the attributes.edges
- the edges.public GDoc(java.lang.String id, Node.State state, java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes, Edge... edges)
Method Detail |
---|
public void collectionID(java.lang.String id)
id
- the identifier.public java.lang.String collectionID()
public GDoc delta(GDoc future) throws java.lang.IllegalArgumentException
null
if
the documents are equals.
The delta document can only be computed if the input document has the same identifier as this document, and it is repeated recursively for all pairs of children that verify the same condition. For all purposes, in fact, the input document is expected to be (or simply look like) a future version of this document, as if it was originally cloned from this document and had evolved since.
Under this assumption, the delta document has:
Node.NULL
value (node by node);
Node.State.DELETED
, for deleted, and
emptied of their attributes and their own children;
Node.State.NEW
, for new;
future
- the input document.
java.lang.IllegalArgumentException
- in the following circumstances:
public void delete()
State#DELETED
, removing all its attributes and all its edges.
public java.lang.String toString()
toString
in class InnerNode
public int hashCode()
hashCode
in class InnerNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |