public class MemoryContextNode extends AbstractContextNode implements ContextNode
Modifier and Type | Method and Description |
---|---|
boolean |
containsContextNode(XDIArc XDIarc)
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 |
containsLiteralNode()
Checks if this context node has a literal.
|
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.
|
void |
delContextNode(XDIArc XDIarc)
Deletes the context node with a given arc.
|
void |
delContextNodes()
Deletes all context nodes from this context node.
|
void |
delLiteralNode()
Deletes the literal from this context node.
|
void |
delRelation(XDIAddress XDIaddress,
XDIAddress targetXDIAddress)
Deletes the relation with a given arc from this context node.
|
void |
delRelations()
Deletes all relations from this context node.
|
void |
delRelations(XDIAddress XDIaddress)
Deletes the relations with a given address from this context node.
|
ContextNode |
getContextNode(XDIArc XDIarc,
boolean subgraph)
Returns the context node with a given arc.
|
ReadOnlyIterator<ContextNode> |
getContextNodes()
Returns the context nodes under this context node.
|
LiteralNode |
getLiteralNode()
Returns the literal of this context node.
|
Relation |
getRelation(XDIAddress XDIaddress,
XDIAddress targetXDIAddress)
Returns a relation at this context node.
|
ReadOnlyIterator<Relation> |
getRelations()
Returns the relations of this context node.
|
ReadOnlyIterator<Relation> |
getRelations(XDIAddress XDIaddress)
Returns relations at this context node.
|
XDIArc |
getXDIArc()
Every node has an associated arc.
|
ContextNode |
setContextNode(XDIArc XDIarc)
Creates a new context node and adds it to this context node, or returns an existing context node.
|
LiteralNode |
setLiteralNode(Object literalData)
Creates a new literal and adds it to this context node, or returns an existing literal.
|
Relation |
setRelation(XDIAddress XDIaddress,
Node targetNode)
Creates a new relation and adds it to this context node, or returns an existing relation.
|
clear, compareTo, containsIncomingRelations, containsIncomingRelations, containsLiteralBoolean, containsLiteralNode, containsLiteralNumber, containsLiteralString, containsStatement, delContextNodeDelAllIncomingRelations, delContextNodeDelAllInnerRoots, delContextNodeDelAllRelations, delete, delIncomingRelations, delRelationDelInnerRoot, equals, getAllContextNodeCount, getAllContextNodes, getAllIncomingRelations, getAllLeafContextNodes, getAllLiteralCount, getAllLiteralNodes, getAllRelationCount, getAllRelations, getAllStatementCount, getAllStatements, getContextNode, getContextNodeCount, getDeepContextNode, getDeepContextNode, getDeepLiteralNode, getDeepLiteralNode, getDeepNode, getDeepNode, getDeepRelation, getDeepRelation, getDeepRelations, getGraph, getIncomingRelations, getIncomingRelations, getLiteralBoolean, getLiteralData, getLiteralDataBoolean, getLiteralDataNumber, getLiteralDataString, getLiteralNode, getLiteralNumber, getLiteralString, getRelation, getRelationCount, getRelationCount, getStatement, getStatement, hashCode, isEmpty, isLeafContextNode, isRootContextNode, setContextNodeCheckValid, setContextNodeSetInnerRoot, setDeepContextNode, setDeepLiteralNode, setDeepNode, setDeepRelation, setDeepRelation, setLiteralBoolean, setLiteralCheckValid, setLiteralNumber, setLiteralString, setRelation, setRelationCheckValid, setRelationSetTargetNode, setStatement, toString
getContextNode, getContextNode, getXDIAddress
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
clear, containsIncomingRelations, containsIncomingRelations, containsLiteralBoolean, containsLiteralNode, containsLiteralNumber, containsLiteralString, containsStatement, delIncomingRelations, getAllContextNodeCount, getAllContextNodes, getAllIncomingRelations, getAllLeafContextNodes, getAllLiteralCount, getAllLiteralNodes, getAllRelationCount, getAllRelations, getAllStatementCount, getAllStatements, getContextNode, getContextNodeCount, getDeepContextNode, getDeepContextNode, getDeepLiteralNode, getDeepLiteralNode, getDeepNode, getDeepNode, getDeepRelation, getDeepRelation, getDeepRelations, getIncomingRelations, getIncomingRelations, getLiteralBoolean, getLiteralData, getLiteralDataBoolean, getLiteralDataNumber, getLiteralDataString, getLiteralNode, getLiteralNumber, getLiteralString, getRelation, getRelationCount, getRelationCount, getStatement, getStatement, isEmpty, isLeafContextNode, isRootContextNode, setDeepContextNode, setDeepLiteralNode, setDeepNode, setDeepRelation, setDeepRelation, setLiteralBoolean, setLiteralNumber, setLiteralString, setRelation, setStatement
delete, getContextNode, getContextNode, getGraph, getXDIAddress
compareTo
public XDIArc getXDIArc()
Node
public ContextNode setContextNode(XDIArc XDIarc)
ContextNode
setContextNode
in interface ContextNode
XDIarc
- The arc of the new or existing context node.public ContextNode getContextNode(XDIArc XDIarc, boolean subgraph)
ContextNode
getContextNode
in interface ContextNode
getContextNode
in class AbstractContextNode
XDIarc
- 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 ReadOnlyIterator<ContextNode> getContextNodes()
ContextNode
getContextNodes
in interface ContextNode
public boolean containsContextNode(XDIArc XDIarc)
ContextNode
containsContextNode
in interface ContextNode
containsContextNode
in class AbstractContextNode
XDIarc
- The arc to look for.public boolean containsContextNodes()
ContextNode
containsContextNodes
in interface ContextNode
containsContextNodes
in class AbstractContextNode
public void delContextNode(XDIArc XDIarc)
ContextNode
delContextNode
in interface ContextNode
XDIarc
- The arc of the context node.public void delContextNodes()
ContextNode
delContextNodes
in interface ContextNode
delContextNodes
in class AbstractContextNode
public Relation setRelation(XDIAddress XDIaddress, Node targetNode)
ContextNode
setRelation
in interface ContextNode
XDIaddress
- The address of the relation.targetNode
- The target node of the relation.public Relation getRelation(XDIAddress XDIaddress, XDIAddress targetXDIAddress)
ContextNode
getRelation
in interface ContextNode
getRelation
in class AbstractContextNode
XDIaddress
- The address of the relation.targetXDIAddress
- The target node address of the relation.public ReadOnlyIterator<Relation> getRelations(XDIAddress XDIaddress)
ContextNode
getRelations
in interface ContextNode
getRelations
in class AbstractContextNode
XDIaddress
- The address of the relations.public ReadOnlyIterator<Relation> getRelations()
ContextNode
getRelations
in interface ContextNode
public boolean containsRelation(XDIAddress XDIaddress, XDIAddress targetXDIAddress)
ContextNode
containsRelation
in interface ContextNode
containsRelation
in class AbstractContextNode
XDIaddress
- The address of the relations.targetXDIAddress
- The target node address of the relation.public boolean containsRelations(XDIAddress XDIaddress)
ContextNode
containsRelations
in interface ContextNode
containsRelations
in class AbstractContextNode
XDIaddress
- The address of the relations.public boolean containsRelations()
ContextNode
containsRelations
in interface ContextNode
containsRelations
in class AbstractContextNode
public void delRelation(XDIAddress XDIaddress, XDIAddress targetXDIAddress)
ContextNode
delRelation
in interface ContextNode
XDIaddress
- The address of the relation.targetXDIAddress
- The target node address of the relation.public void delRelations(XDIAddress XDIaddress)
ContextNode
delRelations
in interface ContextNode
delRelations
in class AbstractContextNode
XDIaddress
- The address of the relations.public void delRelations()
ContextNode
delRelations
in interface ContextNode
delRelations
in class AbstractContextNode
public LiteralNode setLiteralNode(Object literalData)
ContextNode
setLiteralNode
in interface ContextNode
literalData
- The literal data associated with the literal.public LiteralNode getLiteralNode()
ContextNode
getLiteralNode
in interface ContextNode
public boolean containsLiteralNode()
ContextNode
containsLiteralNode
in interface ContextNode
containsLiteralNode
in class AbstractContextNode
public void delLiteralNode()
ContextNode
delLiteralNode
in interface ContextNode
Copyright © 2017. All rights reserved.