public class MemoryOccurrenceStore extends AbstractMemoryOccStore
OccurrenceStore.State, OccurrenceStore.Type
Constructor and Description |
---|
MemoryOccurrenceStore(Lang lang) |
Modifier and Type | Method and Description |
---|---|
void |
addOccurrence(Term term,
java.lang.String documentUrl,
int begin,
int end,
java.lang.String coveredText) |
void |
close() |
void |
flush() |
java.lang.String |
getMostFrequentForm(Term t) |
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 |
removeTerm(Term t)
Removes all occurrences of the term
|
long |
size()
The number of occurrences in occurrence store.
|
getDocument, getDocuments, getDocuments, getForms, log, protectedGetDocument, protectedGetDocuments, protectedGetForms, toForm
public MemoryOccurrenceStore(Lang lang)
public java.util.Collection<TermOccurrence> getOccurrences(Term term)
public OccurrenceStore.Type getStoreType()
public java.lang.String getUrl()
OccurrenceStore
Type#FILE
,
null
otherwise.null
if this store is of type OccurrenceStore.Type.MEMORY
public void flush()
public void removeTerm(Term t)
OccurrenceStore
removeTerm
in interface OccurrenceStore
removeTerm
in class AbstractMemoryOccStore
public void close()
public void addOccurrence(Term term, java.lang.String documentUrl, int begin, int end, java.lang.String coveredText)
addOccurrence
in interface OccurrenceStore
addOccurrence
in class AbstractMemoryOccStore
public java.lang.String getMostFrequentForm(Term t)
getMostFrequentForm
in interface OccurrenceStore
getMostFrequentForm
in class AbstractMemoryOccStore
public long size()
OccurrenceStore