|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
de.dfki.mycbr.core.casebase.Attribute
de.dfki.mycbr.core.casebase.Instance
public final class Instance
Represents values occurring in query and or cases. Each attribute knows its
description and therefore knows how similar it is to other attributes of the
same description. Attributes for a fixed description are maintained by ranges
(classes implementing interface Range).
| Field Summary | |
|---|---|
static java.lang.String |
QUERY_ID
|
| Constructor Summary | |
|---|---|
Instance(Concept concept,
java.lang.String id)
Creates new value for the specified description. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.util.Observable |
|---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String QUERY_ID
| Constructor Detail |
|---|
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 instance| Method Detail |
|---|
public 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 removed
public 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 added
java.text.ParseException - if the value does not fit the description
public 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 added
java.text.ParseException - if the value does not fit the description
public boolean addAttribute(AttributeDesc desc,
Attribute a)
desc - the description of the attribute to be addeda - the attribute to be added
public Attribute getAttForDesc(AttributeDesc attDesc)
attDesc - the description for which the attribute should be returned
public java.lang.String getValueAsString()
getValueAsString in class Attributepublic Explainable getExpType()
getExpType in interface IExplainable
public 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||