public interface Graph extends Serializable, Comparable<Graph>
Modifier and Type | Method and Description |
---|---|
void |
beginTransaction()
Starts a new transaction.
|
void |
clear()
Clears all data from the graph.
|
void |
close()
Closes the graph.
|
void |
commitTransaction()
Commits the changes made by the transaction.
|
boolean |
containsStatement(XDIStatement XDIstatement)
Check if a statement exists in this graph.
|
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 contextNodeXDIAddress,
XDIAddress XDIaddress) |
Relation |
getDeepRelation(XDIAddress contextNodeXDIAddress,
XDIAddress XDIaddress,
XDIAddress targetXDIAddress) |
ReadOnlyIterator<Relation> |
getDeepRelations(XDIAddress contextNodeXDIAddress,
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.
|
ContextNode |
getRootContextNode(boolean subgraph)
Gets the local root context node of this graph.
|
Statement |
getStatement(XDIStatement XDIstatement)
Gets a statement in this graph.
|
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 contextNodeXDIAddress,
XDIAddress XDIaddress,
Node targetNode) |
Relation |
setDeepRelation(XDIAddress contextNodeXDIAddress,
XDIAddress XDIaddress,
XDIAddress targetXDIAddress) |
Statement |
setStatement(XDIStatement XDIstatement)
Sets a statement in this graph.
|
boolean |
supportsTransactions()
Check if this graph supports transactions.
|
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.
|
compareTo
GraphFactory getGraphFactory()
String getIdentifier()
ContextNode getRootContextNode(boolean subgraph)
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.ContextNode getRootContextNode()
void close()
void clear()
boolean isEmpty()
String toString(String format, Properties parameters)
format
- The serialization format.parameters
- Parameters for the serialization.String toString(String format)
format
- The serialization format.String toString(MimeType mimeType)
mimeType
- The MIME type.Node setDeepNode(XDIAddress nodeXDIAddress)
Node getDeepNode(XDIAddress nodeXDIAddress, boolean subgraph)
Node getDeepNode(XDIAddress nodeXDIAddress)
ContextNode setDeepContextNode(XDIAddress contextNodeXDIAddress)
ContextNode getDeepContextNode(XDIAddress contextNodeXDIAddress, boolean subgraph)
ContextNode getDeepContextNode(XDIAddress contextNodeXDIAddress)
LiteralNode setDeepLiteralNode(XDIAddress literalNodeXDIAddress)
LiteralNode getDeepLiteralNode(XDIAddress literalNodeXDIAddress, boolean subgraph)
LiteralNode getDeepLiteralNode(XDIAddress literalNodeXDIAddress)
Relation setDeepRelation(XDIAddress contextNodeXDIAddress, XDIAddress XDIaddress, XDIAddress targetXDIAddress)
Relation setDeepRelation(XDIAddress contextNodeXDIAddress, XDIAddress XDIaddress, Node targetNode)
Relation getDeepRelation(XDIAddress contextNodeXDIAddress, XDIAddress XDIaddress, XDIAddress targetXDIAddress)
Relation getDeepRelation(XDIAddress contextNodeXDIAddress, XDIAddress XDIaddress)
ReadOnlyIterator<Relation> getDeepRelations(XDIAddress contextNodeXDIAddress, XDIAddress XDIaddress)
Statement setStatement(XDIStatement XDIstatement)
Statement getStatement(XDIStatement XDIstatement)
ReadOnlyIterator<Statement> getAllStatements()
boolean containsStatement(XDIStatement XDIstatement)
long getAllStatementCount()
boolean supportsTransactions()
void beginTransaction()
void commitTransaction()
void rollbackTransaction()
Copyright © 2017. All rights reserved.