public abstract class AbstractGraph extends Object implements Graph
Modifier | Constructor and Description |
---|---|
protected |
AbstractGraph(GraphFactory graphFactory,
String identifier) |
Modifier and Type | Method and Description |
---|---|
void |
beginTransaction()
Starts a new transaction.
|
void |
clear()
Clears all data from the graph.
|
void |
commitTransaction()
Commits the changes made by the transaction.
|
int |
compareTo(Graph other) |
boolean |
containsStatement(XDIStatement XDIstatement)
Check if a statement exists in this graph.
|
boolean |
equals(Object object) |
long |
getAllStatementCount()
Returns the number of all statements in this graph.
|
ReadOnlyIterator<Statement> |
getAllStatements()
Gets all statements in this graph.
|
ContextNode |
getDeepContextNode(XDIAddress contextNodeXDIAddress) |
ContextNode |
getDeepContextNode(XDIAddress contextNodeXDIAddress,
boolean subgraph) |
LiteralNode |
getDeepLiteralNode(XDIAddress literalNodeXDIAddress) |
LiteralNode |
getDeepLiteralNode(XDIAddress literalNodeXDIAddress,
boolean subgraph) |
Node |
getDeepNode(XDIAddress nodeXDIAddress) |
Node |
getDeepNode(XDIAddress nodeXDIAddress,
boolean subgraph) |
Relation |
getDeepRelation(XDIAddress relativeContextNodeXDIAddress,
XDIAddress XDIaddress) |
Relation |
getDeepRelation(XDIAddress relativeContextNodeXDIAddress,
XDIAddress XDIaddress,
XDIAddress targetXDIAddress) |
ReadOnlyIterator<Relation> |
getDeepRelations(XDIAddress relativeContextNodeXDIAddress,
XDIAddress XDIaddress) |
GraphFactory |
getGraphFactory()
Gets the graph factory that created this graph.
|
String |
getIdentifier()
Returns an optional identifier to distinguish graphs from one another.
|
ContextNode |
getRootContextNode()
Gets the local root context node of this graph.
|
Statement |
getStatement(XDIStatement XDIstatement)
Gets a statement in this graph.
|
int |
hashCode() |
boolean |
isEmpty()
Checks if the graph is empty.
|
void |
rollbackTransaction()
Rolls back the changes made by the transaction.
|
ContextNode |
setDeepContextNode(XDIAddress contextNodeXDIAddress) |
LiteralNode |
setDeepLiteralNode(XDIAddress literalNodeXDIAddress) |
Node |
setDeepNode(XDIAddress nodeXDIAddress) |
Relation |
setDeepRelation(XDIAddress relativeContextNodeXDIAddress,
XDIAddress XDIaddress,
Node targetNode) |
Relation |
setDeepRelation(XDIAddress relativeContextNodeXDIAddress,
XDIAddress XDIaddress,
XDIAddress targetXDIAddress) |
Statement |
setStatement(XDIStatement XDIstatement)
Sets a statement in this graph.
|
boolean |
supportsTransactions()
Check if this graph supports transactions.
|
String |
toString() |
String |
toString(MimeType mimeType)
Converts the graph to a string in the given MIME type.
|
String |
toString(String format)
Converts the graph to a string in the given serialization format.
|
String |
toString(String format,
Properties parameters)
Converts the graph to a string in the given serialization format.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
close, getRootContextNode
protected AbstractGraph(GraphFactory graphFactory, String identifier)
public GraphFactory getGraphFactory()
Graph
getGraphFactory
in interface Graph
public String getIdentifier()
Graph
getIdentifier
in interface Graph
public ContextNode getRootContextNode()
Graph
getRootContextNode
in interface Graph
public void clear()
Graph
public boolean isEmpty()
Graph
public String toString(String format, Properties parameters)
Graph
public String toString(String format)
Graph
public String toString(MimeType mimeType)
Graph
public Node setDeepNode(XDIAddress nodeXDIAddress)
setDeepNode
in interface Graph
public Node getDeepNode(XDIAddress nodeXDIAddress, boolean subgraph)
getDeepNode
in interface Graph
public Node getDeepNode(XDIAddress nodeXDIAddress)
getDeepNode
in interface Graph
public ContextNode setDeepContextNode(XDIAddress contextNodeXDIAddress)
setDeepContextNode
in interface Graph
public ContextNode getDeepContextNode(XDIAddress contextNodeXDIAddress, boolean subgraph)
getDeepContextNode
in interface Graph
public ContextNode getDeepContextNode(XDIAddress contextNodeXDIAddress)
getDeepContextNode
in interface Graph
public LiteralNode setDeepLiteralNode(XDIAddress literalNodeXDIAddress)
setDeepLiteralNode
in interface Graph
public LiteralNode getDeepLiteralNode(XDIAddress literalNodeXDIAddress, boolean subgraph)
getDeepLiteralNode
in interface Graph
public LiteralNode getDeepLiteralNode(XDIAddress literalNodeXDIAddress)
getDeepLiteralNode
in interface Graph
public Relation setDeepRelation(XDIAddress relativeContextNodeXDIAddress, XDIAddress XDIaddress, XDIAddress targetXDIAddress)
setDeepRelation
in interface Graph
public Relation setDeepRelation(XDIAddress relativeContextNodeXDIAddress, XDIAddress XDIaddress, Node targetNode)
setDeepRelation
in interface Graph
public Relation getDeepRelation(XDIAddress relativeContextNodeXDIAddress, XDIAddress XDIaddress, XDIAddress targetXDIAddress)
getDeepRelation
in interface Graph
public Relation getDeepRelation(XDIAddress relativeContextNodeXDIAddress, XDIAddress XDIaddress)
getDeepRelation
in interface Graph
public ReadOnlyIterator<Relation> getDeepRelations(XDIAddress relativeContextNodeXDIAddress, XDIAddress XDIaddress)
getDeepRelations
in interface Graph
public Statement setStatement(XDIStatement XDIstatement)
Graph
setStatement
in interface Graph
public Statement getStatement(XDIStatement XDIstatement)
Graph
getStatement
in interface Graph
public boolean containsStatement(XDIStatement XDIstatement)
Graph
containsStatement
in interface Graph
public ReadOnlyIterator<Statement> getAllStatements()
Graph
getAllStatements
in interface Graph
public long getAllStatementCount()
Graph
getAllStatementCount
in interface Graph
public boolean supportsTransactions()
Graph
supportsTransactions
in interface Graph
public void beginTransaction()
Graph
beginTransaction
in interface Graph
public void commitTransaction()
Graph
commitTransaction
in interface Graph
public void rollbackTransaction()
Graph
rollbackTransaction
in interface Graph
public int compareTo(Graph other)
compareTo
in interface Comparable<Graph>
Copyright © 2017. All rights reserved.