public final class Instance extends Attribute implements java.util.Observer, IExplainable
Range).| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
QUERY_ID |
| Constructor and Description |
|---|
Instance(Concept concept,
java.lang.String id)
Creates new value for the specified description.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAttribute(AttributeDesc desc,
Attribute a) |
boolean |
addAttribute(AttributeDesc desc,
java.lang.Object value) |
boolean |
addAttribute(java.lang.String n,
Attribute a)
Sets the value of the attribute specified by desc to att.
|
boolean |
addAttribute(java.lang.String n,
java.lang.Object value) |
void |
clean(AttributeDesc desc) |
Attribute |
getAttForDesc(AttributeDesc attDesc)
Returns the attribute for the given description.
|
java.util.HashMap<AttributeDesc,Attribute> |
getAttributes()
Gets all the attribute values for this c.
|
Concept |
getConcept()
Gets the description for this attribute to determine similarity functions
or restrictions for the value of this attribute.
|
Explainable |
getExpType() |
java.lang.String |
getName() |
java.lang.String |
getValueAsString()
Returns the string representation of this c attribute.
|
boolean |
isAdapted() |
void |
removeAttribute(AttributeDesc desc)
Removes the given attribute.
|
void |
reset()
Sets the value for every direct or inherited attribute description
to the default special value undefined.
|
void |
setAdapted(boolean adapted) |
void |
setAttsUnknown()
Sets the value for every direct or inherited attribute description
to the default special value undefined.
|
void |
setName(java.lang.String n) |
java.lang.String |
toString() |
void |
update(java.util.Observable o,
java.lang.Object arg) |
public static final java.lang.String QUERY_ID
public Instance(Concept concept, java.lang.String id)
Concept.addInstance(String)
to create an instance properly!concept - description of this attributeid - the name of this instancepublic void setName(java.lang.String n)
n - new name of thispublic java.lang.String getName()
getName in interface IExplainablepublic Concept getConcept()
public java.util.HashMap<AttributeDesc,Attribute> getAttributes()
public void removeAttribute(AttributeDesc desc)
desc - the attribute to be removedpublic boolean addAttribute(java.lang.String n,
Attribute a)
n - the name of the attribute descriptiona - the value to be added to this c attribute.public boolean addAttribute(java.lang.String n,
java.lang.Object value)
throws java.text.ParseException
n - the name of the attribute descriptionvalue - the value of the attribute to be addedjava.text.ParseException - if the value does not fit the descriptionpublic boolean addAttribute(AttributeDesc desc, java.lang.Object value) throws java.text.ParseException
desc - the description of the attribute to be addedvalue - the value to be addedjava.text.ParseException - if the value does not fit the descriptionpublic boolean addAttribute(AttributeDesc desc, Attribute a)
desc - the description of the attribute to be addeda - the attribute to be addedpublic Attribute getAttForDesc(AttributeDesc attDesc)
attDesc - the description for which the attribute should be returnedpublic java.lang.String getValueAsString()
getValueAsString in class Attributepublic Explainable getExpType()
getExpType in interface IExplainablepublic void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observerpublic void clean(AttributeDesc desc)
desc - the instance will be cleaned wrt this descriptionpublic void reset()
public void setAttsUnknown()
public java.lang.String toString()
toString in class java.lang.Objectpublic void setAdapted(boolean adapted)
adapted - the adapted to setpublic boolean isAdapted()