
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)
Returns a node at an arbitrary level of the graph.
|
Node |
getDeepNode(XDIAddress nodeXDIAddress,
boolean subgraph)
Returns a node at an arbitrary level of the graph.
|
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)
Create a new node at an arbitrary level of the graph, or returns an existing node.
|
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,
Properties parameters)
Converts the graph to a string in the given serialization format.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitclose, getRootContextNodeprotected AbstractGraph(GraphFactory graphFactory, String identifier)
public GraphFactory getGraphFactory()
GraphgetGraphFactory in interface Graphpublic String getIdentifier()
GraphgetIdentifier in interface Graphpublic ContextNode getRootContextNode()
GraphgetRootContextNode in interface Graphpublic void clear()
Graphpublic boolean isEmpty()
Graphpublic String toString(String format, Properties parameters)
Graphpublic String toString(MimeType mimeType)
Graphpublic Node setDeepNode(XDIAddress nodeXDIAddress)
GraphsetDeepNode in interface GraphnodeXDIAddress - The relative address of the new or existing node.public ContextNode setDeepContextNode(XDIAddress contextNodeXDIAddress)
setDeepContextNode in interface Graphpublic LiteralNode setDeepLiteralNode(XDIAddress literalNodeXDIAddress)
setDeepLiteralNode in interface Graphpublic Node getDeepNode(XDIAddress nodeXDIAddress, boolean subgraph)
GraphgetDeepNode in interface GraphnodeXDIAddress - The relative address of the 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 getDeepContextNode(XDIAddress contextNodeXDIAddress, boolean subgraph)
getDeepContextNode in interface Graphpublic LiteralNode getDeepLiteralNode(XDIAddress literalNodeXDIAddress, boolean subgraph)
getDeepLiteralNode in interface Graphpublic Node getDeepNode(XDIAddress nodeXDIAddress)
GraphgetDeepNode in interface GraphnodeXDIAddress - The relative address of the node.public ContextNode getDeepContextNode(XDIAddress contextNodeXDIAddress)
getDeepContextNode in interface Graphpublic LiteralNode getDeepLiteralNode(XDIAddress literalNodeXDIAddress)
getDeepLiteralNode in interface Graphpublic Statement setStatement(XDIStatement XDIstatement)
GraphsetStatement in interface Graphpublic Statement getStatement(XDIStatement XDIstatement)
GraphgetStatement in interface Graphpublic boolean containsStatement(XDIStatement XDIstatement)
GraphcontainsStatement in interface Graphpublic ReadOnlyIterator<Statement> getAllStatements()
GraphgetAllStatements in interface Graphpublic long getAllStatementCount()
GraphgetAllStatementCount in interface Graphpublic boolean supportsTransactions()
GraphsupportsTransactions in interface Graphpublic void beginTransaction()
GraphbeginTransaction in interface Graphpublic void commitTransaction()
GraphcommitTransaction in interface Graphpublic void rollbackTransaction()
GraphrollbackTransaction in interface Graphpublic int compareTo(Graph other)
compareTo in interface Comparable<Graph>Copyright © 2015. All Rights Reserved.