Package org.apache.jena.query.text
Class DatasetGraphText
- java.lang.Object
-
- org.apache.jena.sparql.core.DatasetGraphWrapper
-
- org.apache.jena.query.text.changes.DatasetGraphTextMonitor
-
- org.apache.jena.query.text.DatasetGraphText
-
- All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable,org.apache.jena.atlas.lib.Sync,DatasetGraph,Transactional
public class DatasetGraphText extends DatasetGraphTextMonitor implements Transactional
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jena.sparql.core.Transactional
Transactional.Promote
-
-
Constructor Summary
Constructors Constructor Description DatasetGraphText(DatasetGraph dsg, TextIndex index, TextDocProducer producer)DatasetGraphText(DatasetGraph dsg, TextIndex index, TextDocProducer producer, boolean closeIndexOnClose)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Rollback all changes, discarding any exceptions that occur.voidbegin(ReadWrite readWrite)voidbegin(TxnType txnType)voidclose()voidcommit()voidend()GraphgetDefaultGraph()GraphgetGraph(Node graphNode)TextIndexgetTextIndex()booleanisInTransaction()java.util.Iterator<TextHit>search(java.lang.String queryString)Search the text index on the default text fieldjava.util.Iterator<TextHit>search(java.lang.String queryString, int limit)Search the text index on the default text fieldjava.util.Iterator<TextHit>search(java.lang.String queryString, Node predicate)Search the text index on the text field associated with the predicatejava.util.Iterator<TextHit>search(java.lang.String queryString, Node predicate, int limit)Search the text index on the text field associated with the predicatejava.util.Iterator<TextHit>search(java.lang.String queryString, Node predicate, java.lang.String graphURI, java.lang.String lang, int limit)Search the text index on the text field associated with the predicate within graphbooleansupportsTransactionAbort()Declare whetherabort()is supported.booleansupportsTransactions()-
Methods inherited from class org.apache.jena.query.text.changes.DatasetGraphTextMonitor
add, add, addGraph, delete, delete, deleteAny, getMonitor, monitored, removeGraph, sync
-
Methods inherited from class org.apache.jena.sparql.core.DatasetGraphWrapper
begin, clear, contains, contains, containsGraph, find, find, find, findNG, getBase, getBaseForQuery, getContext, getLock, getUnionGraph, getWrapped, isEmpty, listGraphNodes, prefixes, promote, promote, setDefaultGraph, size, toString, transactionMode, transactionType, unwrap
-
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
begin, calc, calculate, calculateRead, calculateWrite, exec, execute, executeRead, executeWrite, promote, promote, transactionMode, transactionType
-
-
-
-
Constructor Detail
-
DatasetGraphText
public DatasetGraphText(DatasetGraph dsg, TextIndex index, TextDocProducer producer)
-
DatasetGraphText
public DatasetGraphText(DatasetGraph dsg, TextIndex index, TextDocProducer producer, boolean closeIndexOnClose)
-
-
Method Detail
-
getDefaultGraph
public Graph getDefaultGraph()
- Specified by:
getDefaultGraphin interfaceDatasetGraph- Overrides:
getDefaultGraphin classDatasetGraphTextMonitor
-
getGraph
public Graph getGraph(Node graphNode)
- Specified by:
getGraphin interfaceDatasetGraph- Overrides:
getGraphin classDatasetGraphTextMonitor
-
getTextIndex
public TextIndex getTextIndex()
-
search
public java.util.Iterator<TextHit> search(java.lang.String queryString)
Search the text index on the default text field
-
search
public java.util.Iterator<TextHit> search(java.lang.String queryString, Node predicate)
Search the text index on the text field associated with the predicate
-
search
public java.util.Iterator<TextHit> search(java.lang.String queryString, int limit)
Search the text index on the default text field
-
search
public java.util.Iterator<TextHit> search(java.lang.String queryString, Node predicate, int limit)
Search the text index on the text field associated with the predicate
-
search
public java.util.Iterator<TextHit> search(java.lang.String queryString, Node predicate, java.lang.String graphURI, java.lang.String lang, int limit)
Search the text index on the text field associated with the predicate within graph
-
begin
public void begin(TxnType txnType)
- Specified by:
beginin interfaceTransactional- Overrides:
beginin classDatasetGraphWrapper
-
begin
public void begin(ReadWrite readWrite)
- Specified by:
beginin interfaceTransactional- Overrides:
beginin classDatasetGraphWrapper
-
commit
public void commit()
- Specified by:
commitin interfaceTransactional- Overrides:
commitin classDatasetGraphWrapper
-
abort
public void abort()
Rollback all changes, discarding any exceptions that occur.- Specified by:
abortin interfaceTransactional- Overrides:
abortin classDatasetGraphWrapper
-
isInTransaction
public boolean isInTransaction()
- Specified by:
isInTransactionin interfaceTransactional- Overrides:
isInTransactionin classDatasetGraphWrapper
-
end
public void end()
- Specified by:
endin interfaceTransactional- Overrides:
endin classDatasetGraphWrapper
-
supportsTransactions
public boolean supportsTransactions()
- Specified by:
supportsTransactionsin interfaceDatasetGraph- Overrides:
supportsTransactionsin classDatasetGraphWrapper
-
supportsTransactionAbort
public boolean supportsTransactionAbort()
Declare whetherabort()is supported. This goes along with clearing up after exceptions inside application transaction code.- Specified by:
supportsTransactionAbortin interfaceDatasetGraph- Overrides:
supportsTransactionAbortin classDatasetGraphWrapper
-
close
public void close()
- Specified by:
closein interfaceorg.apache.jena.atlas.lib.Closeable- Specified by:
closein interfaceDatasetGraph- Overrides:
closein classDatasetGraphWrapper
-
-