public class BasicVertex extends java.lang.Object implements Vertex, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
LARGE |
static int |
MEDIUM |
static java.lang.String |
SELF |
static int |
SMALL |
Constructor and Description |
---|
BasicVertex() |
BasicVertex(java.lang.Object data) |
BasicVertex(Vertex original)
Create the vertex as a clone of the original.
|
Modifier and Type | Method and Description |
---|---|
Relationship |
addRelationship(Primitive type,
Primitive target)
Add the relation of the relationship primitive type to the target primitive.
|
Relationship |
addRelationship(Primitive type,
Primitive target,
int index)
Add the relation of the relationship type to the target vertex.
|
Relationship |
addRelationship(Primitive type,
Vertex target)
Add the relation of the relationship primitive type to the target vertex.
|
Relationship |
addRelationship(Primitive type,
Vertex target,
int index)
Add the relation of the relationship type to the target vertex.
|
Relationship |
addRelationship(Relationship relationship,
boolean internal)
Add the relation ensuring uniqueness.
|
Relationship |
addRelationship(Relationship relationship,
boolean internal,
boolean init,
float correctnessMultiplier)
Add the relation ensuring uniqueness.
|
Relationship |
addRelationship(Vertex type,
Vertex target)
Add the relation of the relationship type to the target vertex.
|
Relationship |
addRelationship(Vertex type,
Vertex target,
int index)
Add the relation of the relationship type to the target vertex.
|
Relationship |
addRelationship(Vertex type,
Vertex target,
int index,
boolean internal)
Add the relation of the relationship type to the target vertex.
|
Relationship |
addWeakRelationship(Primitive type,
Primitive target,
float correctnessMultiplier)
Add the relation of the relationship type to the target vertex.
|
Relationship |
addWeakRelationship(Primitive type,
Vertex target,
float correctnessMultiplier)
Add the relation of the relationship type to the target vertex.
|
Relationship |
addWeakRelationship(Vertex type,
Vertex target,
float correctnessMultiplier)
Add the relation of the relationship type to the target vertex.
|
java.util.Iterator<Relationship> |
allRelationships()
Provides an easier method of traversing all the relations of all types of a vertex.
|
Relationship |
appendRelationship(Primitive type,
Vertex target)
Add the relation of the relationship type to the end of the target vertex relationships.
|
Relationship |
appendRelationship(Vertex type,
Vertex target)
Add the relation of the relationship type to the end of the target vertex relationships.
|
Vertex |
applyALL(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the ALL operation.
|
Vertex |
applyAPPEND(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Append the relationship in order.
|
Vertex |
applyASSOCIATE(Vertex operator,
java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the ASSOCIATE or DISSOCIATE operation.
|
Vertex |
applyCALL(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the call operation.
|
Vertex |
applyCONDITION(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the OR/AND condition.
|
Vertex |
applyCOUNT(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the COUNT operation.
|
Vertex |
applyDEBUG(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the DEBUG operation.
|
Vertex |
applyEQUAL(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the LESS operation.
|
Vertex |
applyEval(java.util.Map<Vertex,Vertex> variables,
Network network)
Evaluates any eval functions in the equation or formula..
|
Vertex |
applyFOR(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the FOR operation.
|
Vertex |
applyFRAGMENT(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network,
Primitive format)
Apply the FRAGMENT operation.
|
Vertex |
applyGET(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the GET operation.
|
Vertex |
applyGREATER(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the GREATER operation.
|
Vertex |
applyIF(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the IF operation.
|
Vertex |
applyINPUT(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the INPUT operation.
|
Vertex |
applyLEARN(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the LEARN operation.
|
Vertex |
applyLESS(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the LESS operation.
|
Vertex |
applyNEW(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the NEW operation.
|
Vertex |
applyQuotient(java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the quotient.
|
Vertex |
applyRANDOM(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the RANDOM operation.
|
Vertex |
applyRELATED(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the related operation.
|
Vertex |
applyRELATION(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the relation operation.
|
Vertex |
applySENTENCE(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the SENTENCE operation.
|
Vertex |
applySET(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the SET operation.
|
Vertex |
applySRAI(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the SRAI operation.
|
Vertex |
applySRAIX(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the SRAIX operation.
|
Vertex |
applyWHILE(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the WHILE operation.
|
Vertex |
applyWORD(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network)
Apply the WORD operation.
|
void |
associateAll(Primitive associate,
Vertex target,
Primitive type)
Associate each of the relationship target vertices with the target vertex by the type.
|
void |
associateAll(Vertex associate,
Vertex target,
Vertex type)
Associate each of the relationship target vertices with the target vertex by the type.
|
Vertex |
checkRelationRelationshipForAllWords(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network,
Vertex left,
Vertex right,
Vertex relation,
java.util.Collection<Relationship> words)
Check if any of the words have the relationship.
|
Vertex |
checkRelationTargetForAllWords(java.util.List<Relationship> arguments,
java.util.Map<Vertex,Vertex> variables,
Network network,
Vertex left,
Vertex right,
Vertex relation,
java.util.Collection<Relationship> words)
Check if any of the words have the relationship.
|
boolean |
collectMatches(Vertex vertex,
java.util.Map<Vertex,java.util.Set<Vertex>> variables)
Compare if the two vertices match.
|
int |
compare(Vertex vertex)
Compare if the two vertices match.
|
static float |
computeCorrectness(Relationship relationship) |
static java.lang.String |
convertDataType(java.lang.Object data) |
static java.lang.String |
convertDataValue(java.lang.Object data) |
Vertex |
copy()
Create a copy of the vertex with all of the same relationships.
|
void |
decrementConsciousnessLevel()
Decrease the vertices's level of consciousness.
|
void |
decrementConsciousnessLevel(int amount)
Decrease the vertices's level of consciousness by the amount.
|
java.lang.String |
description()
Return a short toString, or header of the vertex.
|
Vertex |
detach()
Create a copy of the vertex with only the id.
|
java.lang.String |
displayString()
User friendly toString.
|
boolean |
equals(java.lang.Object object)
Two vertices are equal if they have the same data.
|
boolean |
equalsIgnoreCase(Vertex vertex)
Compare the vertices ignoring case.
|
void |
fixRelationships(Vertex type)
Fix the corrupted relationship index order.
|
int |
getAccessCount()
Return the number of times the vertex has been accessed.
|
java.util.Date |
getAccessDate()
Return the date the vertex was last accessed.
|
java.util.Collection<Relationship> |
getAllRelationships()
Return all of the relationships.
|
Vertex |
getAssoiate(Vertex type,
Vertex associate,
Vertex associateType)
Return the target vertex related by the type, that has the relationship to the previous, otherwise null if not found.
|
Vertex |
getAssoiate(Vertex type,
Vertex associate,
Vertex associateType,
java.util.Collection<Relationship> associates2,
Vertex associateType2,
java.util.Collection<Relationship> associates3,
Vertex associateType3,
Vertex defaultAssociate)
Return the target vertex related by the type, that has the relationship to the previous, otherwise null if not found.
|
Vertex |
getAssoiate(Vertex type,
Vertex associate,
Vertex associateType,
Vertex defaultAssociate)
Return the target vertex related by the type, that has the relationship to the previous, otherwise null if not found.
|
Vertex |
getAssoiate(Vertex type,
Vertex associate,
Vertex associateType,
Vertex associate2,
Vertex associateType2)
Return the target vertex related by the type, that has the relationship to the previous, otherwise null if not found.
|
Vertex |
getAssoiate(Vertex type,
Vertex associate,
Vertex associateType,
Vertex associate2,
Vertex associateType2,
java.util.Collection<Relationship> associates3,
Vertex associateType3,
Vertex defaultAssociate)
Return the target vertex related by the type, that has the relationship to the previous, otherwise null if not found.
|
Vertex |
getAssoiate(Vertex type,
Vertex associate,
Vertex associateType,
Vertex associate2,
Vertex associateType2,
Vertex associate3,
Vertex associateType3)
Return the target vertex related by the type, that has the relationship to the previous, otherwise null if not found.
|
Vertex |
getAssoiate(Vertex type,
Vertex associate,
Vertex associateType,
Vertex associate2,
Vertex associateType2,
Vertex associate3,
Vertex associateType3,
Vertex defaultAssociate)
Return the target vertex related by the type, that has the relationship to the previous, otherwise null if not found.
|
int |
getConsciousnessLevel()
Return the vertices's level of consciousness.
|
java.util.Date |
getCreationDate()
Return the date the vertex was created.
|
java.lang.Object |
getData()
Return the data value that the vertex represents.
|
java.lang.String |
getDataType()
Return the String name of the data's type.
|
java.lang.String |
getDataValue()
Return the String value of the data.
|
long |
getGroupId()
Return group id of script.
|
java.lang.Boolean |
getHasResponse() |
java.lang.Long |
getId()
Unique id for the vertex.
|
java.lang.String |
getName()
Return the name of the vertex.
|
Network |
getNetwork()
Return the network the vertex is derived from.
|
Vertex |
getRelationship(Primitive type)
Return any relationship target of the primitive type.
|
Relationship |
getRelationship(Primitive type,
Primitive target)
Return the relationship of the type primitive to the target.
|
Relationship |
getRelationship(Primitive type,
Vertex target)
Return the relationship of the type primitive to the target.
|
Vertex |
getRelationship(Vertex type)
Return any relationship target of the type.
|
Relationship |
getRelationship(Vertex type,
Vertex target)
Return the relationship of the type primitive to the target.
|
java.util.Map<Vertex,java.util.Map<Relationship,Relationship>> |
getRelationships()
Return all relationships.
|
java.util.Collection<Relationship> |
getRelationships(Primitive type)
Return any relationship target of the primitive type.
|
java.util.Collection<Relationship> |
getRelationships(Vertex relationshipType)
Return all of the relationships of the type.
|
int |
getWordCount()
Return word count for a sentence.
|
boolean |
hasAnyAssociatedInverseRelationship(Primitive associate,
Vertex target,
Primitive type)
Return if any of the associates of the vertex have an inverse/negative relationship of the type to the target.
|
boolean |
hasAnyAssociatedInverseRelationship(Vertex associate,
Vertex target,
Vertex type)
Return if any of the associates of the vertex have an inverse/negative relationship of the type to the target.
|
boolean |
hasAnyRelationshipToTarget(Vertex target)
Return if the vertex has any relationship to any target.
|
boolean |
hasAnyRelationshipToTargetOfType(Vertex classification)
Return if the vertex has any relationship to any target that is an instantiation of the classification.
|
boolean |
hasAnyResponseRelationship()
PERF: Used to check response without accessing relationships.
|
boolean |
hasData()
Return if the vertex has a data value that it represents.
|
int |
hashCode()
Hash first on data then id for equality compatibility.
|
boolean |
hasInverseRelationship(Primitive type,
Primitive target)
Return if the vertex has an inverse relationship of the type to the target.
|
boolean |
hasInverseRelationship(Primitive type,
Vertex target)
Return if the vertex has an inverse relationship of the type to the target.
|
boolean |
hasInverseRelationship(Vertex type,
Vertex target)
Return if the vertex has an inverse relationship of the type to the target.
|
boolean |
hasName()
Some vertices have no name,
this provides an easy test method.
|
boolean |
hasOrInheritsInverseRelationship(Vertex type,
Vertex target)
Return if the vertex has a relationship of the type to the target.
|
boolean |
hasOrInheritsInverseRelationship(Vertex type,
Vertex target,
java.util.Map<Vertex,Vertex> recursion)
Return if the vertex has a relationship of the type to the target.
|
boolean |
hasOrInheritsRelationship(Vertex type,
Vertex target)
Return if the vertex has a relationship of the type to the target.
|
boolean |
hasOrInheritsRelationship(Vertex type,
Vertex target,
java.util.Map<Vertex,Vertex> recursion)
Return if the vertex has a relationship of the type to the target.
|
boolean |
hasRelationship(Primitive type)
Return if the vertex has a relationship of the type primitive.
|
boolean |
hasRelationship(Primitive type,
Primitive target)
Return if the vertex has a relationship of the type primitive to the target primitive.
|
boolean |
hasRelationship(Primitive type,
Vertex target)
Return if the vertex has a relationship of the type primitive to the target.
|
boolean |
hasRelationship(Vertex type)
Return if the vertex has any (non-inverse) relationship of the type.
|
boolean |
hasRelationship(Vertex type,
Vertex target)
Return if the vertex has a relationship of the type to the target.
|
boolean |
hasRelationships()
Return if the relationships have been instantiated.
|
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.
|
void |
init() |
boolean |
instanceOf(Primitive type)
Return if the vertex is an instantiation of the primitive type.
|
boolean |
instanceOf(Vertex type)
Return if the vertex is an instantiation of the type.
|
boolean |
internalHasRelationship(Vertex type,
Vertex target)
Return if the vertex has a relationship of the type to the target.
|
void |
internalRemoveAllRelationships()
Remove all relationships.
|
void |
internalRemoveRelationship(Primitive type,
Primitive target)
Remove the relationship.
|
void |
internalRemoveRelationship(Relationship relationship)
Remove the relationship.
|
void |
internalRemoveRelationship(Vertex type,
Vertex target)
Remove the relationship.
|
void |
internalRemoveRelationships(Primitive type)
Remove the relationships of the type.
|
void |
internalRemoveRelationships(Vertex type)
Remove the relationships of the type.
|
void |
inverseAssociateAll(Primitive associate,
Vertex target,
Primitive type)
Dissociate the source with each of the relationship targets by the type.
|
void |
inverseAssociateAll(Vertex associate,
Vertex target,
Vertex type)
Dissociate the source with each of the relationship targets by the type.
|
boolean |
is(java.lang.Object data)
Return if the vertex data is equal to the data.
|
boolean |
isArray()
Return if the vertex is an array.
|
boolean |
isDirty()
Return the the vertex has exceeded it relationships maximum.
|
boolean |
isEquation()
Return if the vertex is a equation.
|
boolean |
isList()
Return if the vertex is a list.
|
boolean |
isMeta()
Return if the vertex is for a meta relationship.
|
boolean |
isPinned()
Return if the vertex is pinned to memory, and will not be forgotten.
|
boolean |
isPrimitive()
Return if the vertex is a system primitive.
|
boolean |
isTemporary()
Return if the vertex is temporary, and not persistent.
|
boolean |
isVariable()
Return if the vertex is a variable.
|
void |
iterate(VertexIterator iterator)
Iterator over all related vertices to the vertex.
|
Vertex |
lastRelationship(Primitive type)
Return the fromLast last of the ordered relationship, or null.
|
Vertex |
lastRelationship(Primitive type,
int fromLast)
Return the last of the ordered relationship, or null.
|
Vertex |
lastRelationship(Vertex type)
Return the last of the ordered relationship, or null.
|
Vertex |
lastRelationship(Vertex type,
int fromLast)
Return the fromLast last of the ordered relationship, or null.
|
java.lang.Boolean |
matches(Vertex vertex,
java.util.Map<Vertex,Vertex> variables)
Compare if the two vertices match.
|
Vertex |
mostConscious(Primitive type)
Return the target vertex related by the type with the high consciousness level.
|
Vertex |
mostConscious(Primitive type,
float min)
Return the target vertex related by the type, with the high consciousness level greater than the value.
|
Vertex |
mostConscious(Vertex type)
Return the target vertex related by the type with the high consciousness level.
|
Vertex |
mostConscious(Vertex type,
float min)
Return the target vertex related by the type, with the high consciousness level greater than the value.
|
Vertex |
mostConscious(Vertex type,
float min,
boolean inverse)
Return the target vertex related by the type, with the high consciousness level greater than the value.
|
Vertex |
mostConscious(Vertex type,
Vertex classification)
Return the target vertex related by the type, with the high consciousness level.
|
Relationship |
mostConsciousRelationship(Primitive type)
Return the relationship related by the type, with the high consciousness level.
|
Relationship |
mostConsciousRelationship(Primitive type,
float correctness)
Return the relationship related by the type, with the high consciousness level.
|
Relationship |
mostConsciousRelationship(Vertex type)
Return the relationship related by the type, with the high consciousness level.
|
Vertex |
mostConsciousTargetOfType(Vertex classification)
Return the most conscious target the vertex has any relationship to that is an instantiation of the classification.
|
Vertex |
mostConsciousWithAssoiate(Vertex type,
Vertex associate,
Vertex associateType)
Return the target vertex related by the type, that is also most correctly related to the associate vertex by the relationship.
|
Vertex |
mostConsciousWithAssoiates(Vertex type,
Vertex associate,
Vertex associateType,
Vertex associate2,
Vertex associateType2)
Return the target vertex related by the type, that is also most correctly related to the associate vertex by the relationship.
|
Vertex |
nextMostConscious(Primitive type,
java.util.Set<Vertex> ignoring)
Return the target vertex related by the type, with the high consciousness level greater than the value.
|
Vertex |
nextMostConscious(Primitive type,
Vertex ignoring,
float min)
Return the target vertex related by the type, with the high consciousness level greater than the value.
|
Vertex |
nextMostConscious(Primitive type,
Vertex ignoring,
float min,
boolean inverse)
Return the target vertex inversely/negatively related by the type, with the high consciousness level.
|
Vertex |
nextMostConscious(Vertex type,
java.util.Set<Vertex> ignoring,
float min,
boolean inverse)
Return the target vertex inversely/negatively related by the type, with the high consciousness level.
|
Vertex |
nextMostConscious(Vertex type,
Vertex ignoring,
float min)
Return the target vertex related by the type, with the high consciousness level greater than the value.
|
Vertex |
nextMostConscious(Vertex type,
Vertex ignoring,
float min,
boolean inverse)
Return the target vertex inversely/negatively related by the type, with the high consciousness level.
|
Relationship |
nextMostConsciousRelationship(Primitive type,
Vertex ignoring)
Return the relationship related by the type, with the high consciousness level.
|
Relationship |
nextMostConsciousRelationship(Primitive type,
Vertex ignoring,
float min)
Return the target vertex related by the type, with the high consciousness level greater than the value.
|
Relationship |
nextMostConsciousRelationship(Vertex type,
java.util.Set<Vertex> ignoring,
float min,
boolean inverse)
Return the target vertex inversely/negatively related by the type, with the high consciousness level.
|
Relationship |
nextMostConsciousRelationship(Vertex type,
Vertex ignoring)
Return the relationship related by the type, with the high consciousness level.
|
Relationship |
nextMostConsciousRelationship(Vertex type,
Vertex ignoring,
float min,
boolean inverse)
Return the target vertex inversely/negatively related by the type, with the high consciousness level.
|
java.util.Iterator<Relationship> |
orderedAllRelationships()
Provides an easier method of traversing all the relations of all types of a vertex.
|
java.util.List<Vertex> |
orderedRelations(Primitive primitive)
Return all of the relationships targets of the primitive type, sorted by index.
|
java.util.List<Vertex> |
orderedRelations(Vertex relationshipType)
Return all of the relationship targets of the type, sorted by index.
|
java.util.List<Relationship> |
orderedRelationships(Primitive primitive)
Return all of the relationships of the primitive type, sorted by index.
|
java.util.List<Relationship> |
orderedRelationships(Vertex relationshipType)
Return all of the relationships of the type, sorted by index.
|
java.util.List<Relationship> |
orderedRelationshipsByConsciousness(Primitive primitive)
Return all of the relationships of the type, sorted by consciousness level.
|
java.util.List<Relationship> |
orderedRelationshipsByConsciousness(Vertex relationshipType)
Return all of the relationships of the type, sorted by consciousness level.
|
void |
pinChildren()
Pin the targets of all relationships to memory.
|
void |
pinDescendants()
Pin the vertex and all of its descendants into memory.
|
java.lang.String |
printString()
Print the object's data such as a sentence or paragraph.
|
java.lang.String |
printString(int depth)
Print the object's data such as a sentence or paragraph.
|
Relationship |
removeRelationship(Primitive type,
Primitive target)
Remove the relationship of the relation primitive type to the target vertex.
|
Relationship |
removeRelationship(Primitive type,
Vertex target)
Remove the relationship of the relation primitive type to the target vertex.
|
Relationship |
removeRelationship(Relationship relationship)
Remove the relationship.
|
Relationship |
removeRelationship(Vertex type,
Vertex target)
Remove the relationship of the relation type to the target vertex.
|
void |
replaceRelationship(Relationship oldRelationship,
Vertex newTarget)
Replace the relationship with the new target at the same index.
|
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 |
setCreationDate(java.util.Date creationDate)
Set the date the vertex was created.
|
void |
setData(java.lang.Object data)
Set the data value that the vertex represents.
|
void |
setDataType(java.lang.String type) |
void |
setDataValue(java.lang.String value) |
void |
setGroupId(long groupId)
Set group id of script.
|
void |
setHasResponse(java.lang.Boolean hasResponse) |
void |
setId(java.lang.Long id)
Set the vertex id.
|
void |
setIsDirty(boolean isDirty)
Mark the vertex for forgetfullness.
|
void |
setIsTemporary(boolean isTemporary)
Set if the vertex is temporary, and not persistent.
|
void |
setName(java.lang.String name)
Set the name of the vertex.
|
void |
setNetwork(Network network)
Set the network the vertex is derived from.
|
void |
setOriginal(Vertex original)
Set the original long term vertex the short term vertex was derived from.
|
void |
setPinned(boolean pinned)
Set if the vertex should be pinned to memory.
|
void |
setRelationship(Primitive type,
Primitive newValue)
Set the relationship, removing the old value.
|
void |
setRelationship(Primitive type,
Vertex newValue)
Set the relationship, removing the old value.
|
void |
setRelationship(Vertex type,
Vertex newValue)
Set the relationship, removing the old value.
|
void |
setRelationships(java.util.Map<Vertex,java.util.Map<Relationship,Relationship>> relationships) |
void |
setType(java.lang.String type)
Set the internal data-type of the vertex.
|
void |
setWordCount(int wordCount)
Set word count for a sentence.
|
java.lang.String |
toString() |
int |
totalRelationships()
Return the total number of all relationships.
|
void |
unpinChildren()
Unpin the targets of all relationships from memory.
|
void |
unpinDescendants()
Unpin the vertex and all of its descendants from memory.
|
void |
weakAssociateAll(Primitive associate,
Vertex target,
Primitive type,
float correctnessMultiplier)
Associate each of the relationship target vertices with the target vertex by the type.
|
void |
weakAssociateAll(Vertex associate,
Vertex target,
Vertex type,
float correctnessMultiplier)
Associate each of the relationship target vertices with the target vertex by the type.
|
static void |
writeHeader(Vertex vertex,
java.io.PrintWriter writer) |
public static java.lang.String SELF
public static int SMALL
public static int MEDIUM
public static int LARGE
public BasicVertex()
public BasicVertex(java.lang.Object data)
public BasicVertex(Vertex original)
public boolean isTemporary()
Vertex
isTemporary
in interface Vertex
public void setIsTemporary(boolean isTemporary)
Vertex
setIsTemporary
in interface Vertex
public int getWordCount()
Vertex
getWordCount
in interface Vertex
public void setWordCount(int wordCount)
Vertex
setWordCount
in interface Vertex
public long getGroupId()
Vertex
getGroupId
in interface Vertex
public void setGroupId(long groupId)
Vertex
setGroupId
in interface Vertex
public boolean hasAnyResponseRelationship()
hasAnyResponseRelationship
in interface Vertex
public java.lang.Boolean getHasResponse()
public void setHasResponse(java.lang.Boolean hasResponse)
public boolean isDirty()
Vertex
public void setIsDirty(boolean isDirty)
Vertex
setIsDirty
in interface Vertex
public void setOriginal(Vertex original)
setOriginal
in interface Vertex
public Network getNetwork()
getNetwork
in interface Vertex
public void setNetwork(Network network)
setNetwork
in interface Vertex
public java.util.Date getCreationDate()
getCreationDate
in interface Vertex
public void setCreationDate(java.util.Date creationDate)
setCreationDate
in interface Vertex
public java.util.Date getAccessDate()
getAccessDate
in interface Vertex
public void setAccessDate(java.util.Date accessDate)
setAccessDate
in interface Vertex
public int getAccessCount()
getAccessCount
in interface Vertex
public void setAccessCount(int accessCount)
setAccessCount
in interface Vertex
public void incrementAccessCount()
incrementAccessCount
in interface Vertex
public void incrementConsciousnessLevel()
incrementConsciousnessLevel
in interface Vertex
public void decrementConsciousnessLevel()
decrementConsciousnessLevel
in interface Vertex
public void decrementConsciousnessLevel(int amount)
decrementConsciousnessLevel
in interface Vertex
public void incrementConsciousnessLevel(int amount)
incrementConsciousnessLevel
in interface Vertex
public int getConsciousnessLevel()
getConsciousnessLevel
in interface Vertex
public void setConsciousnessLevel(int consciousnessLevel)
setConsciousnessLevel
in interface Vertex
public Relationship addRelationship(Primitive type, Primitive target)
addRelationship
in interface Vertex
public Relationship addRelationship(Primitive type, Vertex target)
addRelationship
in interface Vertex
public Relationship addRelationship(Vertex type, Vertex target)
addRelationship
in interface Vertex
public Relationship appendRelationship(Vertex type, Vertex target)
appendRelationship
in interface Vertex
public Relationship appendRelationship(Primitive type, Vertex target)
appendRelationship
in interface Vertex
public Relationship addRelationship(Primitive type, Vertex target, int index)
addRelationship
in interface Vertex
public Relationship addRelationship(Primitive type, Primitive target, int index)
addRelationship
in interface Vertex
public Relationship addRelationship(Vertex type, Vertex target, int index)
addRelationship
in interface Vertex
public Relationship addRelationship(Vertex type, Vertex target, int index, boolean internal)
addRelationship
in interface Vertex
public Relationship addWeakRelationship(Primitive type, Primitive target, float correctnessMultiplier)
addWeakRelationship
in interface Vertex
public Relationship addWeakRelationship(Primitive type, Vertex target, float correctnessMultiplier)
addWeakRelationship
in interface Vertex
public Relationship addWeakRelationship(Vertex type, Vertex target, float correctnessMultiplier)
addWeakRelationship
in interface Vertex
public Relationship addRelationship(Relationship relationship, boolean internal)
addRelationship
in interface Vertex
public Relationship addRelationship(Relationship relationship, boolean internal, boolean init, float correctnessMultiplier)
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public boolean equalsIgnoreCase(Vertex vertex)
equalsIgnoreCase
in interface Vertex
public java.lang.Long getId()
Vertex
public void setId(java.lang.Long id)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object getData()
public void setData(java.lang.Object data)
public boolean hasData()
public boolean hasRelationships()
hasRelationships
in interface Vertex
public java.util.Map<Vertex,java.util.Map<Relationship,Relationship>> getRelationships()
getRelationships
in interface Vertex
public Vertex applyQuotient(java.util.Map<Vertex,Vertex> variables, Network network)
applyQuotient
in interface Vertex
public Vertex applyEval(java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyWORD(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applySENTENCE(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyFRAGMENT(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network, Primitive format)
public Vertex applyALL(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyASSOCIATE(Vertex operator, java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyAPPEND(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyCONDITION(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyIF(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applySET(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyRANDOM(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyDEBUG(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyCOUNT(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyGREATER(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyLESS(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyEQUAL(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyFOR(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyWHILE(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyINPUT(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyGET(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyNEW(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyCALL(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network) throws java.lang.Exception
java.lang.Exception
public Vertex applyLEARN(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network) throws java.lang.Exception
java.lang.Exception
public Vertex applySRAI(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network) throws java.lang.Exception
java.lang.Exception
public Vertex applySRAIX(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network) throws java.lang.Exception
java.lang.Exception
public Vertex checkRelationTargetForAllWords(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network, Vertex left, Vertex right, Vertex relation, java.util.Collection<Relationship> words)
public Vertex checkRelationRelationshipForAllWords(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network, Vertex left, Vertex right, Vertex relation, java.util.Collection<Relationship> words)
public Vertex applyRELATION(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex applyRELATED(java.util.List<Relationship> arguments, java.util.Map<Vertex,Vertex> variables, Network network)
public java.lang.Boolean matches(Vertex vertex, java.util.Map<Vertex,Vertex> variables)
public boolean collectMatches(Vertex vertex, java.util.Map<Vertex,java.util.Set<Vertex>> variables)
collectMatches
in interface Vertex
public int compare(Vertex vertex)
public void fixRelationships(Vertex type)
fixRelationships
in interface Vertex
public int totalRelationships()
totalRelationships
in interface Vertex
public Vertex getRelationship(Primitive type)
getRelationship
in interface Vertex
public Vertex getRelationship(Vertex type)
getRelationship
in interface Vertex
public java.util.Collection<Relationship> getRelationships(Primitive type)
getRelationships
in interface Vertex
public java.util.Collection<Relationship> getRelationships(Vertex relationshipType)
getRelationships
in interface Vertex
public Vertex lastRelationship(Vertex type)
lastRelationship
in interface Vertex
public Vertex lastRelationship(Vertex type, int fromLast)
lastRelationship
in interface Vertex
public Vertex lastRelationship(Primitive type)
lastRelationship
in interface Vertex
public Vertex lastRelationship(Primitive type, int fromLast)
lastRelationship
in interface Vertex
public java.util.List<Relationship> orderedRelationships(Primitive primitive)
orderedRelationships
in interface Vertex
public java.util.List<Relationship> orderedRelationships(Vertex relationshipType)
orderedRelationships
in interface Vertex
public java.util.List<Relationship> orderedRelationshipsByConsciousness(Primitive primitive)
orderedRelationshipsByConsciousness
in interface Vertex
public java.util.List<Relationship> orderedRelationshipsByConsciousness(Vertex relationshipType)
orderedRelationshipsByConsciousness
in interface Vertex
public java.util.List<Vertex> orderedRelations(Primitive primitive)
orderedRelations
in interface Vertex
public java.util.List<Vertex> orderedRelations(Vertex relationshipType)
orderedRelations
in interface Vertex
public Vertex mostConscious(Vertex type, float min)
mostConscious
in interface Vertex
public Relationship mostConsciousRelationship(Vertex type)
mostConsciousRelationship
in interface Vertex
public Relationship nextMostConsciousRelationship(Vertex type, Vertex ignoring)
nextMostConsciousRelationship
in interface Vertex
public Relationship mostConsciousRelationship(Primitive type)
mostConsciousRelationship
in interface Vertex
public Relationship mostConsciousRelationship(Primitive type, float correctness)
mostConsciousRelationship
in interface Vertex
public Relationship nextMostConsciousRelationship(Primitive type, Vertex ignoring)
nextMostConsciousRelationship
in interface Vertex
public Vertex mostConscious(Primitive type, float min)
mostConscious
in interface Vertex
public Vertex mostConscious(Vertex type, float min, boolean inverse)
mostConscious
in interface Vertex
public Vertex nextMostConscious(Primitive type, java.util.Set<Vertex> ignoring)
nextMostConscious
in interface Vertex
public Vertex nextMostConscious(Primitive type, Vertex ignoring, float min)
nextMostConscious
in interface Vertex
public Relationship nextMostConsciousRelationship(Primitive type, Vertex ignoring, float min)
nextMostConsciousRelationship
in interface Vertex
public Vertex nextMostConscious(Vertex type, Vertex ignoring, float min)
nextMostConscious
in interface Vertex
public Vertex mostConscious(Primitive type)
mostConscious
in interface Vertex
public Vertex mostConscious(Vertex type)
mostConscious
in interface Vertex
public Vertex nextMostConscious(Primitive type, Vertex ignoring, float min, boolean inverse)
public Vertex nextMostConscious(Vertex type, Vertex ignoring, float min, boolean inverse)
public Vertex nextMostConscious(Vertex type, java.util.Set<Vertex> ignoring, float min, boolean inverse)
nextMostConscious
in interface Vertex
public static float computeCorrectness(Relationship relationship)
public Relationship nextMostConsciousRelationship(Vertex type, Vertex ignoring, float min, boolean inverse)
public Relationship nextMostConsciousRelationship(Vertex type, java.util.Set<Vertex> ignoring, float min, boolean inverse)
nextMostConsciousRelationship
in interface Vertex
public Vertex mostConsciousTargetOfType(Vertex classification)
mostConsciousTargetOfType
in interface Vertex
public Vertex mostConscious(Vertex type, Vertex classification)
mostConscious
in interface Vertex
public Vertex getAssoiate(Vertex type, Vertex associate, Vertex associateType)
getAssoiate
in interface Vertex
public Vertex getAssoiate(Vertex type, Vertex associate, Vertex associateType, Vertex defaultAssociate)
getAssoiate
in interface Vertex
public Vertex getAssoiate(Vertex type, Vertex associate, Vertex associateType, Vertex associate2, Vertex associateType2)
getAssoiate
in interface Vertex
public Vertex getAssoiate(Vertex type, Vertex associate, Vertex associateType, Vertex associate2, Vertex associateType2, Vertex associate3, Vertex associateType3)
getAssoiate
in interface Vertex
public Vertex getAssoiate(Vertex type, Vertex associate, Vertex associateType, Vertex associate2, Vertex associateType2, Vertex associate3, Vertex associateType3, Vertex defaultAssociate)
public Vertex getAssoiate(Vertex type, Vertex associate, Vertex associateType, Vertex associate2, Vertex associateType2, java.util.Collection<Relationship> associates3, Vertex associateType3, Vertex defaultAssociate)
getAssoiate
in interface Vertex
public Vertex getAssoiate(Vertex type, Vertex associate, Vertex associateType, java.util.Collection<Relationship> associates2, Vertex associateType2, java.util.Collection<Relationship> associates3, Vertex associateType3, Vertex defaultAssociate)
getAssoiate
in interface Vertex
public Vertex mostConsciousWithAssoiate(Vertex type, Vertex associate, Vertex associateType)
mostConsciousWithAssoiate
in interface Vertex
public Vertex mostConsciousWithAssoiates(Vertex type, Vertex associate, Vertex associateType, Vertex associate2, Vertex associateType2)
mostConsciousWithAssoiates
in interface Vertex
public void weakAssociateAll(Primitive associate, Vertex target, Primitive type, float correctnessMultiplier)
weakAssociateAll
in interface Vertex
public void weakAssociateAll(Vertex associate, Vertex target, Vertex type, float correctnessMultiplier)
weakAssociateAll
in interface Vertex
public void associateAll(Primitive associate, Vertex target, Primitive type)
associateAll
in interface Vertex
public void associateAll(Vertex associate, Vertex target, Vertex type)
associateAll
in interface Vertex
public void inverseAssociateAll(Primitive associate, Vertex target, Primitive type)
inverseAssociateAll
in interface Vertex
public void inverseAssociateAll(Vertex associate, Vertex target, Vertex type)
inverseAssociateAll
in interface Vertex
public boolean hasAnyAssociatedInverseRelationship(Primitive associate, Vertex target, Primitive type)
hasAnyAssociatedInverseRelationship
in interface Vertex
public boolean hasAnyAssociatedInverseRelationship(Vertex associate, Vertex target, Vertex type)
hasAnyAssociatedInverseRelationship
in interface Vertex
public Relationship removeRelationship(Vertex type, Vertex target)
removeRelationship
in interface Vertex
public Relationship removeRelationship(Primitive type, Vertex target)
removeRelationship
in interface Vertex
public Relationship removeRelationship(Primitive type, Primitive target)
removeRelationship
in interface Vertex
public Relationship removeRelationship(Relationship relationship)
public void internalRemoveRelationship(Relationship relationship)
internalRemoveRelationship
in interface Vertex
public void internalRemoveRelationship(Primitive type, Primitive target)
internalRemoveRelationship
in interface Vertex
public void internalRemoveRelationship(Vertex type, Vertex target)
internalRemoveRelationship
in interface Vertex
public void internalRemoveRelationships(Primitive type)
internalRemoveRelationships
in interface Vertex
public void internalRemoveRelationships(Vertex type)
internalRemoveRelationships
in interface Vertex
public void pinChildren()
pinChildren
in interface Vertex
public void unpinChildren()
unpinChildren
in interface Vertex
public void internalRemoveAllRelationships()
internalRemoveAllRelationships
in interface Vertex
public void replaceRelationship(Relationship oldRelationship, Vertex newTarget)
replaceRelationship
in interface Vertex
public void setRelationship(Primitive type, Vertex newValue)
setRelationship
in interface Vertex
public void setRelationship(Primitive type, Primitive newValue)
setRelationship
in interface Vertex
public void setRelationship(Vertex type, Vertex newValue)
setRelationship
in interface Vertex
public void setRelationships(java.util.Map<Vertex,java.util.Map<Relationship,Relationship>> relationships)
public java.util.Iterator<Relationship> allRelationships()
allRelationships
in interface Vertex
public void iterate(VertexIterator iterator)
public void pinDescendants()
pinDescendants
in interface Vertex
public void unpinDescendants()
unpinDescendants
in interface Vertex
public java.util.Iterator<Relationship> orderedAllRelationships()
orderedAllRelationships
in interface Vertex
public java.lang.String displayString()
Vertex
displayString
in interface Vertex
public static void writeHeader(Vertex vertex, java.io.PrintWriter writer)
public boolean isPrimitive()
isPrimitive
in interface Vertex
public boolean isMeta()
public boolean isVariable()
isVariable
in interface Vertex
public boolean isList()
public boolean isArray()
public boolean isEquation()
isEquation
in interface Vertex
public boolean is(java.lang.Object data)
public boolean instanceOf(Primitive type)
instanceOf
in interface Vertex
public boolean instanceOf(Vertex type)
instanceOf
in interface Vertex
public boolean hasRelationship(Primitive type)
hasRelationship
in interface Vertex
public boolean hasRelationship(Primitive type, Primitive target)
hasRelationship
in interface Vertex
public boolean hasRelationship(Primitive type, Vertex target)
hasRelationship
in interface Vertex
public Relationship getRelationship(Primitive type, Vertex target)
getRelationship
in interface Vertex
public Relationship getRelationship(Primitive type, Primitive target)
getRelationship
in interface Vertex
public boolean hasRelationship(Vertex type, Vertex target)
hasRelationship
in interface Vertex
public boolean hasOrInheritsRelationship(Vertex type, Vertex target)
hasOrInheritsRelationship
in interface Vertex
public boolean hasOrInheritsRelationship(Vertex type, Vertex target, java.util.Map<Vertex,Vertex> recursion)
hasOrInheritsRelationship
in interface Vertex
public Relationship getRelationship(Vertex type, Vertex target)
getRelationship
in interface Vertex
public boolean internalHasRelationship(Vertex type, Vertex target)
internalHasRelationship
in interface Vertex
public boolean hasRelationship(Vertex type)
hasRelationship
in interface Vertex
public boolean hasAnyRelationshipToTarget(Vertex target)
hasAnyRelationshipToTarget
in interface Vertex
public boolean hasAnyRelationshipToTargetOfType(Vertex classification)
hasAnyRelationshipToTargetOfType
in interface Vertex
public boolean hasInverseRelationship(Primitive type, Primitive target)
hasInverseRelationship
in interface Vertex
public boolean hasInverseRelationship(Primitive type, Vertex target)
hasInverseRelationship
in interface Vertex
public boolean hasInverseRelationship(Vertex type, Vertex target)
hasInverseRelationship
in interface Vertex
public boolean hasOrInheritsInverseRelationship(Vertex type, Vertex target)
hasOrInheritsInverseRelationship
in interface Vertex
public boolean hasOrInheritsInverseRelationship(Vertex type, Vertex target, java.util.Map<Vertex,Vertex> recursion)
hasOrInheritsInverseRelationship
in interface Vertex
public java.lang.String description()
Vertex
description
in interface Vertex
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDataType()
Vertex
getDataType
in interface Vertex
public java.lang.String getDataValue()
Vertex
getDataValue
in interface Vertex
public void setDataValue(java.lang.String value)
public void setType(java.lang.String type)
public void setDataType(java.lang.String type)
public static java.lang.String convertDataValue(java.lang.Object data)
public static java.lang.String convertDataType(java.lang.Object data)
public Vertex copy()
public Vertex detach()
public java.util.Collection<Relationship> getAllRelationships()
Vertex
getAllRelationships
in interface Vertex
public java.lang.String getName()
public void setName(java.lang.String name)
public boolean hasName()
public boolean isPinned()
public void setPinned(boolean pinned)
public java.lang.String printString()
printString
in interface Vertex
public java.lang.String printString(int depth)
printString
in interface Vertex