public class XodusOccurrenceStore extends AbstractMemoryOccStore
OccurrenceStore.State, OccurrenceStore.Type
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENTITY_OCCURRENCE |
static java.lang.String |
P_BEGIN |
static java.lang.String |
P_COVERED_TEXT |
static java.lang.String |
P_DOCUMENT_URL |
static java.lang.String |
P_END |
static java.lang.String |
P_TERM_KEY |
Constructor and Description |
---|
XodusOccurrenceStore(Lang lang,
java.lang.String url) |
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.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, getMostFrequentForm, log, protectedGetDocument, protectedGetDocuments, protectedGetForms, toForm
public static final java.lang.String ENTITY_OCCURRENCE
public static final java.lang.String P_DOCUMENT_URL
public static final java.lang.String P_TERM_KEY
public static final java.lang.String P_COVERED_TEXT
public static final java.lang.String P_BEGIN
public static final java.lang.String P_END
public XodusOccurrenceStore(Lang lang, java.lang.String url)
public java.util.Collection<TermOccurrence> getOccurrences(Term term)
public OccurrenceStore.Type getStoreType()
public void flush()
public java.lang.String getUrl()
OccurrenceStore
Type#FILE
,
null
otherwise.null
if this store is of type OccurrenceStore.Type.MEMORY
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 long size()
OccurrenceStore