|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pandora.knowledge.BasicRelationship
public class BasicRelationship
Meta reference. Basic implementation to allow subclasses to avoid defining some of the basic stuff.
Constructor Summary | |
---|---|
BasicRelationship()
|
|
BasicRelationship(Vertex source,
Vertex type,
Vertex target)
|
Method Summary | |
---|---|
int |
compareTo(Relationship another)
Compare the relationships by index, to allow sorting. |
void |
decrementConsciousnessLevel()
Decrease the vertices's level of consciousness. |
void |
decrementConsciousnessLevel(int amount)
Decrease the vertices's level of consciousness by the amount. |
boolean |
equals(java.lang.Object another)
|
int |
getAccessCount()
Return the number of times the vertex has been accessed. |
java.util.Calendar |
getAccessDate()
Return the date the vertex was last accessed. |
int |
getConsciousnessLevel()
Return the vertices's level of consciousness. |
float |
getCorrectness()
Return the fuzzy value of the certainty of the relationship's correctness. |
java.util.Calendar |
getCreationDate()
Return the date the vertex was created. |
java.lang.Number |
getId()
|
int |
getIndex()
Return the index of the relationships in the source's relationships of that type. |
Vertex |
getSource()
|
Vertex |
getTarget()
|
Vertex |
getType()
|
int |
hashCode()
|
boolean |
hasIndex()
Return if the relationship has an index (preset order). |
void |
incrementAccessCount()
Record that the vertex was accessed, update the access time and increment the access count. |
void |
incrementConsciousnessLevel()
Increase the vertices's level of consciousness. |
void |
incrementConsciousnessLevel(int amount)
Increase the vertices's level of consciousness by the amount. |
boolean |
isInverse()
Return if the relationship is inverse, i.e. |
boolean |
isPinned()
Return if the vertex is pinned to memory, and will not be forgotten. |
void |
setAccessCount(int accessCount)
Set the number of times the vertex has been accessed. |
void |
setAccessDate(java.util.Calendar accessDate)
Set the date the vertex was last accessed. |
void |
setAccessDate(java.util.Date accessDate)
Set the date the vertex was last accessed. |
void |
setConsciousnessLevel(int consciousnessLevel)
Set the vertices's level of consciousness. |
void |
setCorrectness(float correctness)
Set the fuzzy value of the certainty of the relationship's correctness. |
void |
setCreationDate(java.util.Calendar creationDate)
Set the date the vertex was created. |
void |
setCreationDate(java.util.Date creationDate)
Set the date the vertex was created. |
void |
setId(java.lang.Number id)
Set the relationship id. |
void |
setIndex(int index)
Set the index of the relationships in the source's relationships of that type. |
void |
setPinned(boolean pinned)
Set if the vertex should be pinned to memory. |
void |
setSource(Vertex source)
|
void |
setTarget(Vertex target)
|
void |
setType(Vertex type)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicRelationship()
public BasicRelationship(Vertex source, Vertex type, Vertex target)
Method Detail |
---|
public java.lang.Number getId()
public void setId(java.lang.Number id)
public boolean equals(java.lang.Object another)
equals
in class java.lang.Object
public int compareTo(Relationship another)
compareTo
in interface java.lang.Comparable<Relationship>
public float getCorrectness()
getCorrectness
in interface Relationship
public void setCorrectness(float correctness)
setCorrectness
in interface Relationship
public boolean isInverse()
isInverse
in interface Relationship
public int getIndex()
getIndex
in interface Relationship
public void setIndex(int index)
setIndex
in interface Relationship
public boolean hasIndex()
hasIndex
in interface Relationship
public Vertex getType()
getType
in interface Relationship
public Vertex getSource()
getSource
in interface Relationship
public Vertex getTarget()
getTarget
in interface Relationship
public int hashCode()
hashCode
in class java.lang.Object
public void setSource(Vertex source)
setSource
in interface Relationship
public void setTarget(Vertex target)
setTarget
in interface Relationship
public void setType(Vertex type)
setType
in interface Relationship
public boolean isPinned()
isPinned
in interface Relationship
public void setPinned(boolean pinned)
setPinned
in interface Relationship
public java.util.Calendar getCreationDate()
getCreationDate
in interface Relationship
public void setCreationDate(java.util.Calendar creationDate)
setCreationDate
in interface Relationship
public void setCreationDate(java.util.Date creationDate)
setCreationDate
in interface Relationship
public java.util.Calendar getAccessDate()
getAccessDate
in interface Relationship
public void setAccessDate(java.util.Calendar accessDate)
setAccessDate
in interface Relationship
public void setAccessDate(java.util.Date accessDate)
setAccessDate
in interface Relationship
public int getAccessCount()
getAccessCount
in interface Relationship
public void setAccessCount(int accessCount)
setAccessCount
in interface Relationship
public void incrementAccessCount()
incrementAccessCount
in interface Relationship
public void incrementConsciousnessLevel()
incrementConsciousnessLevel
in interface Relationship
public void decrementConsciousnessLevel()
decrementConsciousnessLevel
in interface Relationship
public void decrementConsciousnessLevel(int amount)
decrementConsciousnessLevel
in interface Relationship
public void incrementConsciousnessLevel(int amount)
incrementConsciousnessLevel
in interface Relationship
public int getConsciousnessLevel()
getConsciousnessLevel
in interface Relationship
public void setConsciousnessLevel(int consciousnessLevel)
setConsciousnessLevel
in interface Relationship
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |