public class MemoryOccurrenceStore extends java.lang.Object implements OccurrenceStore
OccurrenceStore.State, OccurrenceStore.Type
Constructor and Description |
---|
MemoryOccurrenceStore() |
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
|
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 deleteMany(TermSelector selector)
deleteMany
in interface OccurrenceStore
public void close()
close
in interface OccurrenceStore