public abstract class AbstractNetwork extends java.lang.Object implements Network, java.lang.Cloneable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_SIZE |
static int |
MAX_TEXT
Define max text size for data value.
|
| Constructor and Description |
|---|
AbstractNetwork(boolean isShortTerm) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addVertex(Vertex vertex)
Register the vertex with the network.
|
void |
associateCaseInsensitivity(java.lang.String word,
Vertex meaning)
Associate alternative cases of the word with the meaning.
|
void |
associateCaseInsensitivity(Vertex word)
Associate alternative cases of the word with the meaning, types, conjugations.
|
void |
checkReduction(Vertex sentence)
Check if the sentence has been reduced, if not, then reduce.
|
AbstractNetwork |
clone()
Return a copy of the network.
|
Vertex |
createAnonymousSpeaker()
Create a new anonymous speaker.
|
Vertex |
createFormula(java.lang.String code)
Compile the forumla response.
|
Vertex |
createFragment(java.lang.String text)
Tokenize the fragment into its words and create a vertex representation.
|
Vertex |
createInstance(Primitive type)
Create a new instance of the type.
|
Vertex |
createInstance(Vertex type)
Create a new instance of the type.
|
Vertex |
createMeta(Relationship relationship)
Return the relationship meta vertex.
|
Vertex |
createName(java.lang.String text)
Create the word as a name.
|
Vertex |
createNewObject(java.lang.String name)
Create the word, and a new meaning.
|
Vertex |
createObject(java.lang.String name)
Create the word, and its meaning.
|
Vertex |
createParagraph(java.lang.String text)
Tokenize the paragraph into its sentences and create a vertex representation.
|
Vertex |
createParagraph(Vertex sentence)
Convert the sentence to a paragraph if it has multiple phrases.
|
Vertex |
createPattern(java.lang.String text)
Tokenize the sentence pattern into its words and wildcrads, and create a vertex representation.
|
Vertex |
createPattern(java.lang.String text,
SelfCompiler compiler)
Tokenize the sentence pattern into its words and wildcrads, and create a vertex representation.
|
Vertex |
createPrimitive(java.lang.String name)
Create the primitive and associate the word to it.
|
Vertex |
createSentence(java.lang.String text)
Tokenize the sentence into its words and create a vertex representation.
|
Vertex |
createSentence(java.lang.String text,
boolean generated)
Tokenize the sentence into its words and create a vertex representation.
|
Vertex |
createSentence(java.lang.String text,
boolean generated,
boolean reduction)
Tokenize the sentence into its words and create a vertex representation.
|
Vertex |
createSentence(java.lang.String text,
boolean generated,
boolean reduction,
boolean whitespace)
Tokenize the sentence into its words and create a vertex representation.
|
Vertex |
createSpeaker(java.lang.String name)
Find or create the speaker with the name.
|
Vertex |
createTemplate(java.lang.String code)
Compile the template response.
|
Vertex |
createTemporyVertex()
Create a temporary, non-persistent vertex.
|
Vertex |
createTimestamp()
Create a timestamp based on the current nanos.
|
Vertex |
createUniqueSpeaker(Primitive id,
Primitive type,
java.lang.String name)
Find or create the speaker from the unique id.
|
Vertex |
createVertex()
Create a new vertex in this network,
assign the id and creation date.
|
Vertex |
createVertex(java.lang.Object data)
Create a new vertex in this network with the data,
If a vertex with the data already exists, then it is returned as the data must be unique.
|
Vertex |
createVertex(Vertex source)
Create a new vertex from the source.
|
Vertex |
createWord(java.lang.String text)
Tokenize the text into its words and create a vertex representation of the word or compound word.
|
Bot |
getBot()
Return the associated Bot instance.
|
java.util.Map<java.lang.Object,Vertex> |
getVerticesByData() |
void |
importMerge(Vertex source,
java.util.Map<Vertex,Vertex> identitySet)
Merge the vertex into this network from an import.
|
Vertex |
importVertex(Vertex source,
java.util.Map<Vertex,Vertex> identitySet)
Find the vertex matching the source, or create a new one.
|
boolean |
isReadOnly() |
boolean |
isShortTerm() |
void |
merge(Network network)
Merge the vertices and relations of the network into this network.
|
void |
merge(Vertex sourceVertex)
Merge the vertex into this network.
|
void |
parseFragment(Vertex fragment,
java.lang.String text,
boolean generated,
boolean whitespace)
Tokenize the fragment into its words and create a vertex representation.
|
void |
removeProperty(java.lang.String propertyName)
Remove the property setting to the current transaction.
|
void |
removeRelationship(Relationship relationship)
Remove the relationship from the network.
|
void |
saveProperty(java.lang.String propertyName,
java.lang.String value,
boolean startup)
Save the property setting to the current transaction.
|
void |
setBot(Bot bot)
Set the associated Bot instance.
|
void |
setShortTerm(boolean isShortTerm) |
java.lang.String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitclear, countAll, countAllLike, executeNativeQuery, executeQuery, findAll, findAll, findAllInstances, findAllLike, findAllLike, findAllQuery, findAllQuery, findAllQuery, findAllRelationshipsTo, findAllRelationshipsTo, findAllRelationshipsTo, findByData, findById, findByName, findByNativeQuery, findData, getCriteriaBuilder, getParent, removeVertex, removeVertexAndReferences, resume, save, search, setParent, sizepublic static final int MAX_TEXT
public static int MAX_SIZE
public boolean isReadOnly()
isReadOnly in interface Networkpublic java.util.Map<java.lang.Object,Vertex> getVerticesByData()
public void saveProperty(java.lang.String propertyName,
java.lang.String value,
boolean startup)
saveProperty in interface Networkpublic void removeProperty(java.lang.String propertyName)
removeProperty in interface Networkpublic AbstractNetwork clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic abstract void addVertex(Vertex vertex)
Networkpublic Vertex createVertex()
createVertex in interface Networkpublic Vertex createTemporyVertex()
createTemporyVertex in interface Networkpublic Vertex createVertex(Vertex source)
createVertex in interface Networkpublic Vertex createVertex(java.lang.Object data)
createVertex in interface Networkpublic void merge(Network network)
public void merge(Vertex sourceVertex)
public Vertex importVertex(Vertex source, java.util.Map<Vertex,Vertex> identitySet)
public void importMerge(Vertex source, java.util.Map<Vertex,Vertex> identitySet)
importMerge in interface Networkpublic void removeRelationship(Relationship relationship)
removeRelationship in interface Networkpublic Vertex createMeta(Relationship relationship)
createMeta in interface Networkpublic Vertex createInstance(Primitive type)
createInstance in interface Networkpublic Vertex createInstance(Vertex type)
createInstance in interface Networkpublic Vertex createWord(java.lang.String text)
createWord in interface Networkpublic Vertex createName(java.lang.String text)
createName in interface Networkpublic void associateCaseInsensitivity(java.lang.String word,
Vertex meaning)
associateCaseInsensitivity in interface Networkpublic void associateCaseInsensitivity(Vertex word)
associateCaseInsensitivity in interface Networkpublic Vertex createParagraph(Vertex sentence)
createParagraph in interface Networkpublic Vertex createParagraph(java.lang.String text)
createParagraph in interface Networkpublic Vertex createSentence(java.lang.String text)
createSentence in interface Networkpublic Vertex createPattern(java.lang.String text)
createPattern in interface Networkpublic Vertex createPattern(java.lang.String text, SelfCompiler compiler)
createPattern in interface Networkpublic Vertex createSentence(java.lang.String text, boolean generated)
createSentence in interface Networkpublic Vertex createSentence(java.lang.String text, boolean generated, boolean reduction)
createSentence in interface Networkpublic Vertex createTemplate(java.lang.String code)
createTemplate in interface Networkpublic Vertex createFormula(java.lang.String code)
createFormula in interface Networkpublic Vertex createSentence(java.lang.String text, boolean generated, boolean reduction, boolean whitespace)
createSentence in interface Networkpublic void checkReduction(Vertex sentence)
checkReduction in interface Networkpublic Vertex createFragment(java.lang.String text)
createFragment in interface Networkpublic void parseFragment(Vertex fragment, java.lang.String text, boolean generated, boolean whitespace)
public Vertex createObject(java.lang.String name)
createObject in interface Networkpublic Vertex createPrimitive(java.lang.String name)
createPrimitive in interface Networkpublic Vertex createNewObject(java.lang.String name)
createNewObject in interface Networkpublic Vertex createSpeaker(java.lang.String name)
createSpeaker in interface Networkpublic Vertex createUniqueSpeaker(Primitive id, Primitive type, java.lang.String name)
createUniqueSpeaker in interface Networkpublic Vertex createAnonymousSpeaker()
createAnonymousSpeaker in interface Networkpublic Vertex createTimestamp()
createTimestamp in interface Networkpublic Bot getBot()
public void setBot(Bot bot)
public boolean isShortTerm()
public void setShortTerm(boolean isShortTerm)