public class BasicRelationship extends java.lang.Object implements Relationship, java.lang.Comparable<Relationship>, java.io.Serializable
| Constructor and Description |
|---|
BasicRelationship() |
BasicRelationship(Vertex source,
Vertex type,
Vertex target) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkHashCode() |
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.Date |
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.Date |
getCreationDate()
Return the date the vertex was created.
|
java.lang.Long |
getId() |
int |
getIndex()
Return the index of the relationships in the source's relationships of that type.
|
Vertex |
getMeta() |
Vertex |
getSource() |
Vertex |
getTarget() |
Vertex |
getType() |
int |
hashCode() |
boolean |
hasIndex()
Return if the relationship has an index (preset order).
|
boolean |
hasMeta() |
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 |
resetHashCode() |
void |
setAccessCount(int accessCount)
Set the number of times the vertex has been 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.Date creationDate)
Set the date the vertex was created.
|
void |
setId(java.lang.Long id)
Set the relationship id.
|
void |
setIndex(int index)
Set the index of the relationships in the source's relationships of that type.
|
void |
setMeta(Vertex meta) |
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() |
public java.lang.Long getId()
getId in interface Relationshippublic void setId(java.lang.Long id)
setId in interface Relationshippublic boolean equals(java.lang.Object another)
equals in class java.lang.Objectpublic int compareTo(Relationship another)
compareTo in interface java.lang.Comparable<Relationship>public float getCorrectness()
getCorrectness in interface Relationshippublic void setCorrectness(float correctness)
setCorrectness in interface Relationshippublic boolean isInverse()
isInverse in interface Relationshippublic int getIndex()
getIndex in interface Relationshippublic void setIndex(int index)
setIndex in interface Relationshippublic boolean hasIndex()
hasIndex in interface Relationshippublic Vertex getType()
getType in interface Relationshippublic Vertex getMeta()
getMeta in interface Relationshippublic boolean hasMeta()
hasMeta in interface Relationshippublic Vertex getSource()
getSource in interface Relationshippublic Vertex getTarget()
getTarget in interface Relationshippublic void resetHashCode()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean checkHashCode()
checkHashCode in interface Relationshippublic void setSource(Vertex source)
setSource in interface Relationshippublic void setTarget(Vertex target)
setTarget in interface Relationshippublic void setType(Vertex type)
setType in interface Relationshippublic void setMeta(Vertex meta)
setMeta in interface Relationshippublic boolean isPinned()
isPinned in interface Relationshippublic void setPinned(boolean pinned)
setPinned in interface Relationshippublic java.util.Date getCreationDate()
getCreationDate in interface Relationshippublic void setCreationDate(java.util.Date creationDate)
setCreationDate in interface Relationshippublic java.util.Date getAccessDate()
getAccessDate in interface Relationshippublic void setAccessDate(java.util.Date accessDate)
setAccessDate in interface Relationshippublic int getAccessCount()
getAccessCount in interface Relationshippublic void setAccessCount(int accessCount)
setAccessCount in interface Relationshippublic void incrementAccessCount()
incrementAccessCount in interface Relationshippublic void incrementConsciousnessLevel()
incrementConsciousnessLevel in interface Relationshippublic void decrementConsciousnessLevel()
decrementConsciousnessLevel in interface Relationshippublic void decrementConsciousnessLevel(int amount)
decrementConsciousnessLevel in interface Relationshippublic void incrementConsciousnessLevel(int amount)
incrementConsciousnessLevel in interface Relationshippublic int getConsciousnessLevel()
getConsciousnessLevel in interface Relationshippublic void setConsciousnessLevel(int consciousnessLevel)
setConsciousnessLevel in interface Relationshippublic java.lang.String toString()
toString in class java.lang.Object