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 Relationship
public void setId(java.lang.Long id)
setId
in interface Relationship
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 getMeta()
getMeta
in interface Relationship
public boolean hasMeta()
hasMeta
in interface Relationship
public Vertex getSource()
getSource
in interface Relationship
public Vertex getTarget()
getTarget
in interface Relationship
public void resetHashCode()
public int hashCode()
hashCode
in class java.lang.Object
public boolean checkHashCode()
checkHashCode
in interface Relationship
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 void setMeta(Vertex meta)
setMeta
in interface Relationship
public boolean isPinned()
isPinned
in interface Relationship
public void setPinned(boolean pinned)
setPinned
in interface Relationship
public java.util.Date getCreationDate()
getCreationDate
in interface Relationship
public void setCreationDate(java.util.Date creationDate)
setCreationDate
in interface Relationship
public java.util.Date getAccessDate()
getAccessDate
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