Class DatasetGraphStorage
- java.lang.Object
-
- org.apache.jena.sparql.core.DatasetGraphBase
-
- org.apache.jena.sparql.core.DatasetGraphBaseFind
-
- org.apache.jena.dboe.storage.system.DatasetGraphStorage
-
- All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable,DatabaseRDF,DatasetGraph,Transactional
- Direct Known Subclasses:
SimpleDB.DatasetGraphSimpleDB
public class DatasetGraphStorage extends DatasetGraphBaseFind implements DatabaseRDF
Alternative: DatasetGraph over RDFStorage, using DatasetGraphBaseFind Collapses DatasetGraphTriplesQuads into this adapter class.DatasetGraph DatasetGraphBase DatasetGraphBaseFind DatasetGraphStorageDirect/** A DatasetGraph base class for triples+quads storage. The machinery is really the splitting between default and named graphs. This happens in two classes,DatasetGraphBaseFind(for find splitting) andDatasetGraphTriplesQuadsadd/delete splitting (it inheritsDatasetGraphBaseFind).Because storage is usually decomposing quads and triples, the default behaviour is to work in s/p/o and g/s/p/o.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jena.sparql.core.Transactional
Transactional.Promote
-
-
Constructor Summary
Constructors Constructor Description DatasetGraphStorage(StorageRDF storage, StoragePrefixes prefixes, Transactional transactional)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()voidadd(Node g, Node s, Node p, Node o)voidadd(Quad quad)voidaddGraph(Node graphName, Graph graph)voidbegin()voidbegin(ReadWrite mode)voidbegin(TxnType txnType)voidcommit()voiddelete(Node g, Node s, Node p, Node o)voiddelete(Quad quad)voidend()StorageRDFgetData()GraphgetDefaultGraph()GraphgetGraph(Node graphNode)StoragePrefixesgetStoragePrefixes()TransactionalgetTransactional()GraphgetUnionGraph()booleanisInTransaction()java.util.Iterator<Node>listGraphNodes()Provide a general implementation of "listGraphNodes".PrefixMapprefixes()booleanpromote(Transactional.Promote mode)voidremoveGraph(Node graphName)booleansupportsTransactionAbort()booleansupportsTransactions()ReadWritetransactionMode()TxnTypetransactionType()-
Methods inherited from class org.apache.jena.sparql.core.DatasetGraphBaseFind
find, findInUnionGraph, findNG, findQuadsInUnionGraph
-
Methods inherited from class org.apache.jena.sparql.core.DatasetGraphBase
clear, close, contains, contains, containsGraph, deleteAny, deleteAny, find, find, getContext, getLock, isEmpty, setDefaultGraph, size, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.jena.sparql.core.DatasetGraph
addAll, stream, stream
-
Methods inherited from interface org.apache.jena.sparql.core.Transactional
calc, calculate, calculateRead, calculateWrite, exec, execute, executeRead, executeWrite, promote
-
-
-
-
Constructor Detail
-
DatasetGraphStorage
public DatasetGraphStorage(StorageRDF storage, StoragePrefixes prefixes, Transactional transactional)
-
-
Method Detail
-
begin
public void begin()
- Specified by:
beginin interfaceTransactional
-
begin
public void begin(TxnType txnType)
- Specified by:
beginin interfaceTransactional
-
begin
public void begin(ReadWrite mode)
- Specified by:
beginin interfaceTransactional
-
promote
public boolean promote(Transactional.Promote mode)
- Specified by:
promotein interfaceTransactional
-
commit
public void commit()
- Specified by:
commitin interfaceTransactional
-
abort
public void abort()
- Specified by:
abortin interfaceTransactional
-
isInTransaction
public boolean isInTransaction()
- Specified by:
isInTransactionin interfaceTransactional
-
end
public void end()
- Specified by:
endin interfaceTransactional
-
transactionMode
public ReadWrite transactionMode()
- Specified by:
transactionModein interfaceTransactional
-
transactionType
public TxnType transactionType()
- Specified by:
transactionTypein interfaceTransactional
-
supportsTransactions
public boolean supportsTransactions()
- Specified by:
supportsTransactionsin interfaceDatasetGraph
-
supportsTransactionAbort
public boolean supportsTransactionAbort()
- Specified by:
supportsTransactionAbortin interfaceDatasetGraph
-
getData
public StorageRDF getData()
- Specified by:
getDatain interfaceDatabaseRDF- Returns:
- the triples/quads storage.
-
getStoragePrefixes
public StoragePrefixes getStoragePrefixes()
- Specified by:
getStoragePrefixesin interfaceDatabaseRDF- Returns:
- the prefixes storage.
-
getTransactional
public Transactional getTransactional()
- Specified by:
getTransactionalin interfaceDatabaseRDF- Returns:
- the
Transactionalfor this database.
-
prefixes
public PrefixMap prefixes()
- Specified by:
prefixesin interfaceDatasetGraph
-
listGraphNodes
public java.util.Iterator<Node> listGraphNodes()
Provide a general implementation of "listGraphNodes". Implementations may wish to override and do this operation in a more efficient manner.- Specified by:
listGraphNodesin interfaceDatasetGraph
-
getDefaultGraph
public Graph getDefaultGraph()
- Specified by:
getDefaultGraphin interfaceDatasetGraph- Specified by:
getDefaultGraphin classDatasetGraphBase
-
getUnionGraph
public Graph getUnionGraph()
- Specified by:
getUnionGraphin interfaceDatasetGraph- Overrides:
getUnionGraphin classDatasetGraphBase
-
getGraph
public Graph getGraph(Node graphNode)
- Specified by:
getGraphin interfaceDatasetGraph- Specified by:
getGraphin classDatasetGraphBase
-
add
public void add(Quad quad)
- Specified by:
addin interfaceDatasetGraph- Overrides:
addin classDatasetGraphBase
-
delete
public void delete(Quad quad)
- Specified by:
deletein interfaceDatasetGraph- Overrides:
deletein classDatasetGraphBase
-
add
public void add(Node g, Node s, Node p, Node o)
- Specified by:
addin interfaceDatasetGraph- Overrides:
addin classDatasetGraphBase
-
delete
public void delete(Node g, Node s, Node p, Node o)
- Specified by:
deletein interfaceDatasetGraph- Overrides:
deletein classDatasetGraphBase
-
addGraph
public void addGraph(Node graphName, Graph graph)
- Specified by:
addGraphin interfaceDatasetGraph- Specified by:
addGraphin classDatasetGraphBase
-
removeGraph
public void removeGraph(Node graphName)
- Specified by:
removeGraphin interfaceDatasetGraph- Specified by:
removeGraphin classDatasetGraphBase
-
-