public class MongoDBOccurrenceStore extends java.lang.Object implements OccurrenceStore
Modifier and Type | Class and Description |
---|---|
class |
MongoDBOccurrenceStore.MyMonitorThread
A monitor for
Executor . |
OccurrenceStore.State, OccurrenceStore.Type
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
COVERED_TEXT |
Constructor and Description |
---|
MongoDBOccurrenceStore(java.lang.String dbURI) |
MongoDBOccurrenceStore(java.lang.String mongoDbUri,
OccurrenceStore.State state) |
Modifier and Type | Method and Description |
---|---|
void |
addAllOccurrences(Term term,
java.util.Collection<TermOccurrence> c) |
void |
addOccurrence(Term term,
TermOccurrence e) |
void |
close() |
void |
deleteMany(TermSelector selector) |
void |
flush() |
OccurrenceStore.State |
getCurrentState() |
java.util.Collection<TermOccurrence> |
getOccurrences(Term term) |
OccurrenceStore.Type |
getStoreType() |
java.lang.String |
getUrl()
Returns the path to access the occurrence store if
this occurrence store is of type
Type#FILE ,
null otherwise. |
void |
makeIndex() |
java.util.Iterator<TermOccurrence> |
occurrenceIterator(Term term) |
void |
removeTerm(Term t)
Removes all occurrences of the term
|
protected static final java.lang.String COVERED_TEXT
public MongoDBOccurrenceStore(java.lang.String dbURI)
public MongoDBOccurrenceStore(java.lang.String mongoDbUri, OccurrenceStore.State state)
public java.util.Iterator<TermOccurrence> occurrenceIterator(Term term)
occurrenceIterator
in interface OccurrenceStore
public java.util.Collection<TermOccurrence> getOccurrences(Term term)
getOccurrences
in interface OccurrenceStore
public void addOccurrence(Term term, TermOccurrence e)
addOccurrence
in interface OccurrenceStore
public void addAllOccurrences(Term term, java.util.Collection<TermOccurrence> c)
addAllOccurrences
in interface OccurrenceStore
public OccurrenceStore.Type getStoreType()
getStoreType
in interface OccurrenceStore
public java.lang.String getUrl()
OccurrenceStore
Type#FILE
,
null
otherwise.getUrl
in interface OccurrenceStore
null
if this store is of type OccurrenceStore.Type.MEMORY
public void flush()
flush
in interface OccurrenceStore
public OccurrenceStore.State getCurrentState()
getCurrentState
in interface OccurrenceStore
public void makeIndex()
makeIndex
in interface OccurrenceStore
public void removeTerm(Term t)
OccurrenceStore
removeTerm
in interface OccurrenceStore
public void close()
close
in interface OccurrenceStore
public void deleteMany(TermSelector selector)
deleteMany
in interface OccurrenceStore