|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectextractTerms.Occurrence
Contain an occurrence of units (String) pair or triple.
Number of occurrence of units pair or triple (int), lines positions in the input file (TreeSet of Integers) and names of text (Hashtable of Integers) wich contain the occurrence.
Relation (int), iteration (int) and typeName (String) of the occurrence.
May contain a measure (double).
Constructor Summary | |
Occurrence(java.lang.String _unit1,
java.lang.String _unit2)
Partial Occurrence with just strings of units filled. |
|
Occurrence(java.lang.String _unit1,
java.lang.String _unit2,
int _occ,
java.util.TreeSet _lines,
java.util.Hashtable _nameOfText,
double _measure,
int _relation,
int _iteration,
java.lang.String _typeName)
Partial Occurrence with all fields filled. |
|
Occurrence(java.lang.String _unit1,
java.lang.String _unit2,
java.lang.String _unit3)
Partial Occurrence with just strings of units filled. |
|
Occurrence(java.lang.String _unit1,
java.lang.String _unit2,
java.lang.String _unit3,
int _occ,
java.util.TreeSet _lines,
java.util.Hashtable _nameOfText,
double _measure,
int _relation,
int _iteration,
java.lang.String _typeName)
Full Occurrence with all fields filled. |
Method Summary | |
boolean |
addLine(int line)
Add a line number if it doesn't already exist. |
boolean |
addNameOfText(java.lang.String _nameOfText)
Add a name of text if it doesn't already exist. |
int |
compareTo(java.lang.Object obj)
Compares an Occurrence with another Occurrence on their units content in ascending alphabetical order. |
boolean |
equals(java.lang.Object obj)
Test the equality of 2 Occurrence objects on their units content. |
int |
getIteration()
Returns the number of the iteration when this term was extracted. |
java.lang.String |
getKey()
Returns the concatenation of the term's units. |
java.util.TreeSet |
getLines()
Returns the list of lines of this occurrence in the text where it was extract. |
java.util.Iterator |
getLinesIterator()
Returns an iterator to read successively the value of lines of this occurrence. |
double |
getMeasure()
Returns the value of the measure for this occurrence. |
java.lang.Double |
getMeasureDbl()
Same as getMeasure() but of Double type. |
java.lang.String |
getMeasureString()
Returns the String of the formatted value of the measure for this occurrence. |
java.util.Hashtable |
getNamesOfText()
Returns the table of names of text where occurrence appears. |
int |
getOcc()
Returns the number of occurrence. |
java.lang.Integer |
getOccInt()
Same as getOcc() but of Integer type. |
int |
getRelation()
Returns the position of the element in the list of units selector that was selected for this term. |
static java.lang.String |
getTag(java.lang.String unit,
java.lang.String separator)
Returns the string after the separator contains in the unit. |
java.lang.String |
getTypeName()
Returns the type name of this term. |
java.lang.String |
getUnit1()
Returns the first unit of the term. |
java.lang.String |
getUnit2()
Returns the second unit of the term. |
java.lang.String |
getUnit3()
Returns the third unit of the term. |
static java.lang.String |
getWord(java.lang.String unit,
java.lang.String separator)
Returns the string before the separator contains in the unit. |
boolean |
hasLines()
Returns true if this occurrence has at less one line in the list of its lines where it appears. |
int |
incrementOcc()
Increment by 1 the number of occurrence for this occurrence. |
boolean |
is2Units()
Returns true if it is a 2 units occurrence. |
boolean |
is3Units()
Returns true if it is a 3 units occurrence. |
void |
setIteration(int _iteration)
Set the number of the iteration. |
void |
setMeasure(double _measure)
Set the value of the measure. |
void |
setRelation(int _relation)
Set the number of the relation. |
void |
setTypeName(java.lang.String _typeName)
Set the name of the type. |
java.lang.String |
toString()
Returns the string representation of an occurrence. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Occurrence(java.lang.String _unit1, java.lang.String _unit2)
full constructor
public Occurrence(java.lang.String _unit1, java.lang.String _unit2, java.lang.String _unit3)
full constructor
public Occurrence(java.lang.String _unit1, java.lang.String _unit2, int _occ, java.util.TreeSet _lines, java.util.Hashtable _nameOfText, double _measure, int _relation, int _iteration, java.lang.String _typeName)
full constructor
public Occurrence(java.lang.String _unit1, java.lang.String _unit2, java.lang.String _unit3, int _occ, java.util.TreeSet _lines, java.util.Hashtable _nameOfText, double _measure, int _relation, int _iteration, java.lang.String _typeName)
_unit1
- string of the first unit of the occurrence ; couldn't
be null._unit2
- string of the second unit of the occurrence ; couldn't
be null._unit3
- string of the third unit of the occurrence ; couldn't
be null._occ
- number of occurrence for these concatenated
units ; superior or equal to 1._lines
- contain lines (Integer) of occurrence._nameOfText
- contain number of occurrence (Integer) indexed by
name of text ; invariant : the sum of all number of occurrence is
equal to occ field._measure
- contain the value of the measure._relation
- position of the element in the list of units
selector that was selected for this term_iteration
- number of the iteration when this term was
extracted_typeName
- three first letters of the type name according to
the list of types in the Expression panelMethod Detail |
public int getOcc()
public java.lang.Integer getOccInt()
getOcc()
public java.lang.String getUnit1()
public java.lang.String getUnit2()
public java.lang.String getUnit3()
public java.lang.String getKey()
public double getMeasure()
public java.lang.Double getMeasureDbl()
getMeasure()
public java.lang.String getMeasureString()
public java.util.TreeSet getLines()
public java.util.Iterator getLinesIterator()
public java.util.Hashtable getNamesOfText()
public int getRelation()
public int getIteration()
public java.lang.String getTypeName()
public boolean is2Units()
public boolean is3Units()
public boolean hasLines()
public void setMeasure(double _measure)
public int incrementOcc()
public boolean addLine(int line)
public boolean addNameOfText(java.lang.String _nameOfText)
public void setIteration(int _iteration)
public void setRelation(int _relation)
public void setTypeName(java.lang.String _typeName)
public java.lang.String toString()
public static java.lang.String getWord(java.lang.String unit, java.lang.String separator)
unit
- the unit to splitseparator
- the separator used to split the unit in two
public static java.lang.String getTag(java.lang.String unit, java.lang.String separator)
unit
- the unit to splitseparator
- the separator used to split the unit in two
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
obj
- the reference object with which to compare.
public boolean equals(java.lang.Object obj)
obj
- the reference object with which to compare.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |