public class Document
extends java.lang.Object
Constructor and Description |
---|
Document(int id,
java.lang.String url) |
Modifier and Type | Method and Description |
---|---|
void |
clearOccurrenceIndex()
Nullifies the inner occurrence list so as to frees memory.
|
boolean |
equals(java.lang.Object obj) |
java.lang.Integer |
getId() |
java.util.Iterator<TermOccurrence> |
getOccurrenceContext(TermOccurrence occurrence,
OccurrenceType coTermsType,
int contextSize)
Produce an iterator over all single-word term occurrences in the scope
of a given occurrence.
|
java.util.List<TermOccurrence> |
getOccurrences() |
java.lang.String |
getUrl() |
int |
hashCode() |
int |
indexTermOccurrence(TermOccurrence termOccurrence) |
void |
inspect(java.lang.String string) |
java.lang.String |
toString() |
public java.lang.String getUrl()
public int indexTermOccurrence(TermOccurrence termOccurrence)
termOccurrence
- public java.util.List<TermOccurrence> getOccurrences()
public java.util.Iterator<TermOccurrence> getOccurrenceContext(TermOccurrence occurrence, OccurrenceType coTermsType, int contextSize)
occurrence
- the occurrence whose context iterator will be computed by the methodcoTermsType
- the type of occurrence to put in contextcontextSize
- the radius (i.e. half the maximum number of wingle-word terms) of the context window sizeOccurrenceType
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void clearOccurrenceIndex()
public java.lang.String toString()
toString
in class java.lang.Object
public void inspect(java.lang.String string)
public java.lang.Integer getId()