public class CTerm extends java.lang.Object implements java.lang.Comparable<CTerm>, java.io.Serializable
Constructor and Description |
---|
CTerm(java.util.List<CTerm> concepts,
double weight,
boolean positive)
Instantiates a new concept term.
|
CTerm(java.lang.String concept)
Instantiates a new concept-term.
|
CTerm(java.lang.String serialized,
boolean print)
Instantiates a new concept-term from a String.
|
CTerm(java.lang.String concept,
double weight,
boolean positive)
Instantiates a new concept-term.
|
CTerm(java.lang.String instance,
java.lang.String concept)
Instantiates a new concept-term.
|
CTerm(java.lang.String instance,
java.lang.String concept,
double weight,
boolean positive)
Instantiates a new concept-term.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(CTerm otherTerm) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getConcept()
Gets the concept.
|
java.util.List<CTerm> |
getConcepts()
Gets the concepts.
|
java.lang.String |
getInstance()
Gets the single instance of CTerm.
|
boolean |
getPositive()
Gets if the concept-term is positive or negative.
|
java.util.List<CTerm> |
getRules()
Gets the rules.
|
java.lang.String |
getToken()
Gets the string representation of the term.
|
double |
getWeight()
Gets the concept weight.
|
int |
hashCode() |
void |
increaseWeight(double addedValue)
Increases weight by value
addedValue . |
void |
setToken(java.lang.String token)
Sets the string representation of the term.
|
void |
setWeight(double weight)
Sets the concept term weight.
|
java.lang.String |
toString() |
public CTerm(java.util.List<CTerm> concepts, double weight, boolean positive)
concepts
- the conceptsweight
- the weightpositive
- if the concept (preference) is positivepublic CTerm(java.lang.String concept, double weight, boolean positive)
concept
- the conceptweight
- the concept weightpositive
- if the concept (preference) is positivepublic CTerm(java.lang.String instance, java.lang.String concept, double weight, boolean positive)
instance
- the instanceconcept
- the conceptweight
- the concept weightpositive
- if the concept (preference) is positivepublic CTerm(java.lang.String concept)
concept
- the conceptpublic CTerm(java.lang.String instance, java.lang.String concept)
instance
- the instanceconcept
- the conceptpublic CTerm(java.lang.String serialized, boolean print)
serialized
- the serialised stringprint
- whether to print out or notpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getConcept()
public java.util.List<CTerm> getConcepts()
public java.lang.String getInstance()
public void setToken(java.lang.String token)
token
- the new string representation of the termpublic void setWeight(double weight)
weight
- the new concept term weightpublic void increaseWeight(double addedValue)
addedValue
.addedValue
- the added valuepublic java.lang.String getToken()
public double getWeight()
public int compareTo(CTerm otherTerm)
compareTo
in interface java.lang.Comparable<CTerm>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean getPositive()
public java.util.List<CTerm> getRules()