|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is used to access the data encapsulated by an Relation object. Typically, a KnowledgeModel-implementation will also implement this interface. The contract of this interface specifices that: - Each RelationData object can be encapsulated by multiple Relation objects. - The contract does NOT state that the data is stored locally in the RelationData object, and this can not be assumed. This means that the RelationData object can be an interface to a standard SQL database or a concurrently accessed knowledge model server. - The data represented by an RelationData object must be possible to access concurrently. If an implementation of RelationData allows multiple instances of RelationData to exist at once, the access must allow concurrentl, thread-safe even access to the data across the RelationData instances. - All manipulations of this object is done either from a KnowledgeModel or Relation object (or a subclass of these). RelationData classes should be viewed as internal classes to the Relation and KnowledgeModel classes.
Method Summary | |
void |
addOverridenBy(Relation override)
This relation is market as beeing overriden by another relation. |
void |
addOverriding(Relation override)
This relation is market as overriding another relation. |
long |
getCreationTime()
Returns the time of creation for this relation in the same format as System.getCurrentMillis(); |
java.lang.String |
getDescription()
Returns the description of this entity. |
double |
getExplanationStrength()
Returns the explanation strength for this relation. |
Entity |
getFrom()
Returns the entity from where the relation originates. |
java.lang.Object |
getID()
Returns a unique ID for the entity this elationData represents. |
Relation |
getInverse()
Returns the inverse of this relation. |
Relation[] |
getOverridenBy()
Returns which relations this relation is overriden by. |
Relation[] |
getOverrides()
Returns the relation (if any) this relation overrides. |
Entity |
getRelationType()
Returns the instance of Entity describing this relation's type. |
Entity |
getValue()
Returns the entity this relation is pointing at. |
boolean |
isOverridden()
Returns true if there is at least one relation overriding this relation. |
boolean |
isOverriding()
Returns true if this relation overrides another relation. |
void |
remove()
Permanently removes the relation represented by this RelationData object. |
void |
removeOverriddenBy(Relation override)
Removes a relation from beeing overriden by this relation. |
void |
removeOverriding(Relation override)
Removes a relation from beeing overriden by this relation. |
void |
setCreationTime(long time)
Sets the creation time. |
void |
setDescription(java.lang.String description)
Sets the desciption of this relation. |
void |
setExplanationStrength(double value)
Sets the strength variable contains the explanation strength for this relation. |
void |
setFrom(Entity from)
Sets the from-entity (the origin) of the relation. |
void |
setInverse(Relation inverse)
Sets the inverse of this relation to be the given relation. |
void |
setRelationType(Entity relationType)
Sets this relation's type. |
void |
setValue(Entity value)
Sets the value (the target) of the relation. |
Method Detail |
public java.lang.Object getID()
public void setFrom(Entity from)
from
- The new from-entity of the relation.public Entity getFrom()
public void setValue(Entity value)
value
- The new value of the relation.public Entity getValue()
public Entity getRelationType()
public void setRelationType(Entity relationType)
relationType
- The Entity describing this relation's type.public void setDescription(java.lang.String description)
description
- The String containing the description.public java.lang.String getDescription()
public long getCreationTime()
public void setCreationTime(long time)
time
- The time in the format of System.getCurrentMillis() this relation was created.public void setExplanationStrength(double value)
value
- The explanation strength.public double getExplanationStrength()
public void addOverriding(Relation override)
override
- The relation to overridepublic void removeOverriding(Relation override)
override
- The relation to remove from the overide list.public Relation[] getOverrides()
public boolean isOverriding()
public boolean isOverridden()
public void addOverridenBy(Relation override)
override
- The relation to overridepublic void removeOverriddenBy(Relation override)
override
- The relation to remove from the overide list.public Relation[] getOverridenBy()
public void remove()
public void setInverse(Relation inverse)
public Relation getInverse()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |