
public abstract class AbstractContextNode extends AbstractNode implements ContextNode
| Constructor and Description |
|---|
AbstractContextNode(Graph graph,
ContextNode contextNode) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the context node.
|
int |
compareTo(ContextNode other) |
boolean |
containsContextNode(XDIArc contextNodeXDIArc)
Checks if a context node with a given arc exists under this context node.
|
boolean |
containsContextNodes()
Checks if this context node has one or more context nodes.
|
boolean |
containsIncomingRelations()
Checks if this context node has one or more incoming relations.
|
boolean |
containsIncomingRelations(XDIAddress XDIaddress)
Checks if incoming relations with a given arc exist in this context node.
|
boolean |
containsLiteralBoolean(Boolean literalData)
Checks if this context node has a literal with the given data.
|
boolean |
containsLiteralNode()
Checks if this context node has a literal.
|
boolean |
containsLiteralNode(Object literalData)
Checks if this context node has a literal with the given data.
|
boolean |
containsLiteralNumber(Double literalData)
Checks if this context node has a literal with the given data.
|
boolean |
containsLiteralString(String literalData)
Checks if this context node has a literal with the given data.
|
boolean |
containsRelation(XDIAddress XDIaddress,
XDIAddress targetXDIAddress)
Checks if a relation with a given arc and target node address exists in this context node.
|
boolean |
containsRelations()
Checks if this context node has one or more relations.
|
boolean |
containsRelations(XDIAddress XDIaddress)
Checks if relations with a given arc exist in this context node.
|
boolean |
containsStatement(XDIStatement XDIstatement)
Check if a statement exists in this context node.
|
protected void |
delContextNodeDelAllIncomingRelations()
When a context node is deleted, all incoming relations have to be deleted too.
|
protected void |
delContextNodeDelAllInnerRoots()
When a context node is deleted, all inner roots have to be deleted too.
|
protected void |
delContextNodeDelAllRelations()
When a context node is deleted, all relations have to be deleted too.
|
void |
delContextNodes()
Deletes all context nodes from this context node.
|
void |
delete()
Deletes this node.
|
void |
delIncomingRelations()
Deletes the incoming relations of this context node.
|
protected void |
delRelationDelInnerRoot(XDIAddress XDIaddress,
XDIAddress targetXDIAddress)
When a relation is deleted, its inner root has to be deleted too.
|
void |
delRelations()
Deletes all relations from this context node.
|
void |
delRelations(XDIAddress XDIaddress)
Deletes the relations with a given address from this context node.
|
boolean |
equals(Object object) |
long |
getAllContextNodeCount()
Returns the number of all context nodes under this context node.
|
ReadOnlyIterator<ContextNode> |
getAllContextNodes()
Returns all context nodes under this context node.
|
ReadOnlyIterator<Relation> |
getAllIncomingRelations()
Returns all incoming relations of this context node.
|
ReadOnlyIterator<ContextNode> |
getAllLeafContextNodes()
Returns all leaf context nodes under this context node.
|
long |
getAllLiteralCount()
Returns the number of all literals of this context node.
|
ReadOnlyIterator<LiteralNode> |
getAllLiteralNodes()
Returns all literals of this context node.
|
long |
getAllRelationCount()
Returns the number of all relations of this context node.
|
ReadOnlyIterator<Relation> |
getAllRelations()
Returns all relations of this context node.
|
long |
getAllStatementCount()
Returns the number of all statements in this context node.
|
ReadOnlyIterator<Statement> |
getAllStatements()
Gets all statements in this context node.
|
ContextNode |
getContextNode(XDIArc contextNodeXDIArc)
Returns the context node with a given arc.
|
ContextNode |
getContextNode(XDIArc relativeContextNodeXDIAddress,
boolean subgraph)
Returns the context node with a given arc.
|
long |
getContextNodeCount()
Returns the number of context nodes under this context node.
|
ContextNode |
getDeepContextNode(XDIAddress relativeContextNodeXDIAddress) |
ContextNode |
getDeepContextNode(XDIAddress relativeContextNodeXDIAddress,
boolean subgraph) |
LiteralNode |
getDeepLiteralNode(XDIAddress relativeLiteralNodeXDIAddress) |
LiteralNode |
getDeepLiteralNode(XDIAddress relativeLiteralNodeXDIAddress,
boolean subgraph) |
Node |
getDeepNode(XDIAddress relativeNodeXDIAddress) |
Node |
getDeepNode(XDIAddress relativeNodeXDIAddress,
boolean subgraph) |
Relation |
getDeepRelation(XDIAddress relativeContextNodeXDIAddress,
XDIAddress XDIaddress) |
Relation |
getDeepRelation(XDIAddress relativeContextNodeXDIAddress,
XDIAddress XDIaddress,
XDIAddress targetXDIAddress) |
ReadOnlyIterator<Relation> |
getDeepRelations(XDIAddress relativeContextNodeXDIAddress,
XDIAddress XDIaddress) |
Graph |
getGraph()
Get the graph of this node.
|
ReadOnlyIterator<Relation> |
getIncomingRelations()
Returns the incoming relations of this context node.
|
ReadOnlyIterator<Relation> |
getIncomingRelations(XDIAddress XDIaddress)
Returns the incoming relations with a given arc.
|
LiteralNode |
getLiteralBoolean(Boolean literalData)
Returns the literal of this context node.
|
Object |
getLiteralData()
Get the literal data.
|
Boolean |
getLiteralDataBoolean()
Get the literal data boolean.
|
Double |
getLiteralDataNumber()
Get the literal data number.
|
String |
getLiteralDataString()
Get the literal data string.
|
LiteralNode |
getLiteralNode(Object literalData)
Returns the literal of this context node.
|
LiteralNode |
getLiteralNumber(Double literalData)
Returns the literal of this context node.
|
LiteralNode |
getLiteralString(String literalData)
Returns the literal of this context node.
|
Relation |
getRelation(XDIAddress XDIaddress)
Returns a relation at this context node.
|
Relation |
getRelation(XDIAddress XDIaddress,
XDIAddress targetXDIAddress)
Returns a relation at this context node.
|
long |
getRelationCount()
Returns the number of relations of this context node.
|
long |
getRelationCount(XDIAddress XDIaddress)
Returns the number of relations of this context node.
|
ReadOnlyIterator<Relation> |
getRelations(XDIAddress XDIaddress)
Returns relations at this context node.
|
Statement.ContextNodeStatement |
getStatement()
Gets the statement that represents this context node.
|
Statement |
getStatement(XDIStatement statement)
Gets a statement in this context node.
|
int |
hashCode() |
boolean |
isEmpty()
Checks if the context node is empty.
|
boolean |
isLeafContextNode()
Checks if this context node is a leaf context node.
|
boolean |
isRootContextNode()
Checks if this context node is the root context node.
|
protected void |
setContextNodeCheckValid(XDIArc XDIarc)
Checks if a context node can be created.
|
protected void |
setContextNodeSetInnerRoot(XDIArc XDIarc,
ContextNode contextNode)
When a context node is created, check if the inner root subject and predicate have to be created too.
|
ContextNode |
setDeepContextNode(XDIAddress relativeContextNodeXDIAddress) |
LiteralNode |
setDeepLiteralNode(XDIAddress relativeLiteralNodeXDIAddress) |
Node |
setDeepNode(XDIAddress relativeNodeXDIAddress) |
Relation |
setDeepRelation(XDIAddress relativeContextNodeXDIAddress,
XDIAddress XDIaddress,
Node targetNode) |
Relation |
setDeepRelation(XDIAddress relativeContextNodeXDIAddress,
XDIAddress XDIaddress,
XDIAddress targetXDIAddress) |
LiteralNode |
setLiteralBoolean(Boolean literalData)
Creates a new literal and adds it to this context node, or returns an existing literal.
|
protected void |
setLiteralCheckValid(Object literalData)
Checks if a literal can be created.
|
LiteralNode |
setLiteralNumber(Double literalData)
Creates a new literal and adds it to this context node, or returns an existing literal.
|
LiteralNode |
setLiteralString(String literalData)
Creates a new literal and adds it to this context node, or returns an existing literal.
|
Relation |
setRelation(XDIAddress XDIaddress,
XDIAddress targetXDIAddress)
Creates a new relation and adds it to this context node, or returns an existing relation.
|
protected void |
setRelationCheckValid(XDIAddress XDIaddress,
XDIAddress targetXDIAddress)
Checks if a relation can be created.
|
protected Node |
setRelationSetTargetNode(XDIAddress targetXDIAddress)
When a relation is created, check if the target node has to be created too.
|
Statement |
setStatement(XDIStatement statement)
Sets a statement in this context node.
|
String |
toString() |
getContextNode, getContextNode, getXDIAddressclone, finalize, getClass, notify, notifyAll, wait, wait, waitdelContextNode, delLiteralNode, delRelation, getContextNodes, getLiteralNode, getRelations, setContextNode, setLiteralNode, setRelationgetContextNode, getContextNode, getXDIAddress, getXDIArcpublic AbstractContextNode(Graph graph, ContextNode contextNode)
public Graph getGraph()
Nodepublic boolean isRootContextNode()
ContextNodeisRootContextNode in interface ContextNodepublic boolean isLeafContextNode()
ContextNodeisLeafContextNode in interface ContextNodepublic void delete()
Nodepublic void clear()
ContextNodeclear in interface ContextNodepublic boolean isEmpty()
ContextNodeisEmpty in interface ContextNodepublic ContextNode getContextNode(XDIArc relativeContextNodeXDIAddress, boolean subgraph)
ContextNodegetContextNode in interface ContextNoderelativeContextNodeXDIAddress - The arc of the context node.subgraph - This is simply a hint to the implementation whether
child context nodes will subsequently be requested. Implementations may
or may not actually use this parameter.public ContextNode getContextNode(XDIArc contextNodeXDIArc)
ContextNodegetContextNode in interface ContextNodecontextNodeXDIArc - The arc of the context node.public ReadOnlyIterator<ContextNode> getAllContextNodes()
ContextNodegetAllContextNodes in interface ContextNodepublic ReadOnlyIterator<ContextNode> getAllLeafContextNodes()
ContextNodegetAllLeafContextNodes in interface ContextNodepublic boolean containsContextNode(XDIArc contextNodeXDIArc)
ContextNodecontainsContextNode in interface ContextNodecontextNodeXDIArc - The arc to look for.public boolean containsContextNodes()
ContextNodecontainsContextNodes in interface ContextNodepublic void delContextNodes()
ContextNodedelContextNodes in interface ContextNodepublic long getContextNodeCount()
ContextNodegetContextNodeCount in interface ContextNodepublic long getAllContextNodeCount()
ContextNodegetAllContextNodeCount in interface ContextNodepublic Relation setRelation(XDIAddress XDIaddress, XDIAddress targetXDIAddress)
ContextNodesetRelation in interface ContextNodeXDIaddress - The address of the relation.targetXDIAddress - The target node address of the relation.public Relation getRelation(XDIAddress XDIaddress, XDIAddress targetXDIAddress)
ContextNodegetRelation in interface ContextNodeXDIaddress - The address of the relation.targetXDIAddress - The target node address of the relation.public Relation getRelation(XDIAddress XDIaddress)
ContextNodegetRelation in interface ContextNodeXDIaddress - The address of the relation.public ReadOnlyIterator<Relation> getRelations(XDIAddress XDIaddress)
ContextNodegetRelations in interface ContextNodeXDIaddress - The address of the relations.public ReadOnlyIterator<Relation> getIncomingRelations(XDIAddress XDIaddress)
ContextNodegetIncomingRelations in interface ContextNodeXDIaddress - The address of the relations.public ReadOnlyIterator<Relation> getIncomingRelations()
ContextNodegetIncomingRelations in interface ContextNodepublic ReadOnlyIterator<Relation> getAllRelations()
ContextNodegetAllRelations in interface ContextNodepublic ReadOnlyIterator<Relation> getAllIncomingRelations()
ContextNodegetAllIncomingRelations in interface ContextNodepublic boolean containsRelation(XDIAddress XDIaddress, XDIAddress targetXDIAddress)
ContextNodecontainsRelation in interface ContextNodeXDIaddress - The address of the relations.targetXDIAddress - The target node address of the relation.public boolean containsRelations(XDIAddress XDIaddress)
ContextNodecontainsRelations in interface ContextNodeXDIaddress - The address of the relations.public boolean containsRelations()
ContextNodecontainsRelations in interface ContextNodepublic boolean containsIncomingRelations(XDIAddress XDIaddress)
ContextNodecontainsIncomingRelations in interface ContextNodepublic boolean containsIncomingRelations()
ContextNodecontainsIncomingRelations in interface ContextNodepublic void delRelations(XDIAddress XDIaddress)
ContextNodedelRelations in interface ContextNodeXDIaddress - The address of the relations.public void delRelations()
ContextNodedelRelations in interface ContextNodepublic void delIncomingRelations()
ContextNodedelIncomingRelations in interface ContextNodepublic long getRelationCount(XDIAddress XDIaddress)
ContextNodegetRelationCount in interface ContextNodeXDIaddress - The address of the relations.public long getRelationCount()
ContextNodegetRelationCount in interface ContextNodepublic long getAllRelationCount()
ContextNodegetAllRelationCount in interface ContextNodepublic LiteralNode setLiteralString(String literalData)
ContextNodesetLiteralString in interface ContextNodeliteralData - The literal data string associated with the literal.public LiteralNode setLiteralNumber(Double literalData)
ContextNodesetLiteralNumber in interface ContextNodeliteralData - The literal data number associated with the literal.public LiteralNode setLiteralBoolean(Boolean literalData)
ContextNodesetLiteralBoolean in interface ContextNodeliteralData - The literal data boolean associated with the literal.public LiteralNode getLiteralNode(Object literalData)
ContextNodegetLiteralNode in interface ContextNodeliteralData - The literal data associated with the literal.public LiteralNode getLiteralString(String literalData)
ContextNodegetLiteralString in interface ContextNodeliteralData - The literal data string associated with the literal.public LiteralNode getLiteralNumber(Double literalData)
ContextNodegetLiteralNumber in interface ContextNodeliteralData - The literal data number associated with the literal.public LiteralNode getLiteralBoolean(Boolean literalData)
ContextNodegetLiteralBoolean in interface ContextNodeliteralData - The literal data boolean associated with the literal.public Object getLiteralData()
ContextNodegetLiteralData in interface ContextNodepublic String getLiteralDataString()
ContextNodegetLiteralDataString in interface ContextNodepublic Double getLiteralDataNumber()
ContextNodegetLiteralDataNumber in interface ContextNodepublic Boolean getLiteralDataBoolean()
ContextNodegetLiteralDataBoolean in interface ContextNodepublic ReadOnlyIterator<LiteralNode> getAllLiteralNodes()
ContextNodegetAllLiteralNodes in interface ContextNodepublic boolean containsLiteralNode(Object literalData)
ContextNodecontainsLiteralNode in interface ContextNodeliteralData - The literal data associated with the literal.public boolean containsLiteralString(String literalData)
ContextNodecontainsLiteralString in interface ContextNodeliteralData - The literal data string associated with the literal.public boolean containsLiteralNumber(Double literalData)
ContextNodecontainsLiteralNumber in interface ContextNodeliteralData - The literal data number associated with the literal.public boolean containsLiteralBoolean(Boolean literalData)
ContextNodecontainsLiteralBoolean in interface ContextNodeliteralData - The literal data boolean associated with the literal.public boolean containsLiteralNode()
ContextNodecontainsLiteralNode in interface ContextNodepublic long getAllLiteralCount()
ContextNodegetAllLiteralCount in interface ContextNodepublic Node setDeepNode(XDIAddress relativeNodeXDIAddress)
setDeepNode in interface ContextNodepublic Node getDeepNode(XDIAddress relativeNodeXDIAddress, boolean subgraph)
getDeepNode in interface ContextNodepublic Node getDeepNode(XDIAddress relativeNodeXDIAddress)
getDeepNode in interface ContextNodepublic ContextNode setDeepContextNode(XDIAddress relativeContextNodeXDIAddress)
setDeepContextNode in interface ContextNodepublic ContextNode getDeepContextNode(XDIAddress relativeContextNodeXDIAddress, boolean subgraph)
getDeepContextNode in interface ContextNodepublic ContextNode getDeepContextNode(XDIAddress relativeContextNodeXDIAddress)
getDeepContextNode in interface ContextNodepublic LiteralNode setDeepLiteralNode(XDIAddress relativeLiteralNodeXDIAddress)
setDeepLiteralNode in interface ContextNodepublic LiteralNode getDeepLiteralNode(XDIAddress relativeLiteralNodeXDIAddress, boolean subgraph)
getDeepLiteralNode in interface ContextNodepublic LiteralNode getDeepLiteralNode(XDIAddress relativeLiteralNodeXDIAddress)
getDeepLiteralNode in interface ContextNodepublic Relation setDeepRelation(XDIAddress relativeContextNodeXDIAddress, XDIAddress XDIaddress, XDIAddress targetXDIAddress)
setDeepRelation in interface ContextNodepublic Relation setDeepRelation(XDIAddress relativeContextNodeXDIAddress, XDIAddress XDIaddress, Node targetNode)
setDeepRelation in interface ContextNodepublic Relation getDeepRelation(XDIAddress relativeContextNodeXDIAddress, XDIAddress XDIaddress, XDIAddress targetXDIAddress)
getDeepRelation in interface ContextNodepublic Relation getDeepRelation(XDIAddress relativeContextNodeXDIAddress, XDIAddress XDIaddress)
getDeepRelation in interface ContextNodepublic ReadOnlyIterator<Relation> getDeepRelations(XDIAddress relativeContextNodeXDIAddress, XDIAddress XDIaddress)
getDeepRelations in interface ContextNodepublic Statement.ContextNodeStatement getStatement()
ContextNodegetStatement in interface ContextNodepublic Statement setStatement(XDIStatement statement)
ContextNodesetStatement in interface ContextNodepublic Statement getStatement(XDIStatement statement)
ContextNodegetStatement in interface ContextNodepublic ReadOnlyIterator<Statement> getAllStatements()
ContextNodegetAllStatements in interface ContextNodepublic boolean containsStatement(XDIStatement XDIstatement)
ContextNodecontainsStatement in interface ContextNodepublic long getAllStatementCount()
ContextNodegetAllStatementCount in interface ContextNodeprotected void setContextNodeCheckValid(XDIArc XDIarc) throws Xdi2GraphException
Xdi2GraphExceptionprotected void setRelationCheckValid(XDIAddress XDIaddress, XDIAddress targetXDIAddress) throws Xdi2GraphException
Xdi2GraphExceptionprotected void setLiteralCheckValid(Object literalData) throws Xdi2GraphException
Xdi2GraphExceptionprotected void setContextNodeSetInnerRoot(XDIArc XDIarc, ContextNode contextNode)
protected Node setRelationSetTargetNode(XDIAddress targetXDIAddress)
protected void delContextNodeDelAllInnerRoots()
protected void delContextNodeDelAllRelations()
protected void delContextNodeDelAllIncomingRelations()
protected void delRelationDelInnerRoot(XDIAddress XDIaddress, XDIAddress targetXDIAddress)
public int compareTo(ContextNode other)
compareTo in interface Comparable<ContextNode>Copyright © 2017. All rights reserved.