public interface Network
Modifier and Type | Method and Description |
---|---|
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, type, tense, etc..
|
void |
checkReduction(Vertex sentence)
Check if the sentence has been reduced, if not, then reduce.
|
void |
clear()
Clear all vertices from the network.
|
int |
countAll()
Return count of all vertices.
|
int |
countAllLike(java.lang.String filter)
Return count of vertices matching the filter.
|
Vertex |
createAnonymousSpeaker()
Create a new anonymous speaker.
|
Vertex |
createFormula(java.lang.String text)
Compile the forumla response.
|
Vertex |
createFragment(java.lang.String text)
Tokenize the text into its words and create a vertex representation of the sentence fragment.
|
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 name)
Find or create the speaker with the 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 reduced)
Tokenize the sentence into its words and create a vertex representation.
|
Vertex |
createSentence(java.lang.String text,
boolean generated,
boolean reduced,
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 text)
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.
|
Vertex |
createVertex(java.lang.Object data)
Create a new vertex in this network with the data.
|
Vertex |
createVertex(Vertex vertex)
Return the matching registered vertex, or register if missing.
|
Vertex |
createWord(java.lang.String text)
Tokenize the text into its words and create a vertex representation of the word or compound word.
|
int |
executeNativeQuery(java.lang.String sql)
Execute and commit the native query.
|
int |
executeQuery(java.lang.String jpql)
Execute and commit the update query.
|
java.util.List<Vertex> |
findAll()
Return all vertices.
|
java.util.List<Vertex> |
findAll(int pageSize,
int page)
Return all vertices.
|
java.util.List<Vertex> |
findAllInstances(Vertex type,
Vertex relationship,
java.util.Calendar start)
Find all relationships related to the vertex or of the vertex type.
|
java.util.List<Vertex> |
findAllLike(java.lang.String filter)
Return all vertices matching the filter.
|
java.util.List<Vertex> |
findAllLike(java.lang.String filter,
int pageSize,
int page)
Return all vertices matching the filter.
|
java.util.List |
findAllQuery(java.lang.String query)
Return all vertices matching the query.
|
java.util.List |
findAllQuery(java.lang.String query,
int max)
Return all vertices matching the query.
|
java.util.List |
findAllQuery(java.lang.String query,
java.util.Map parameters,
int pageSize,
int page)
Return all vertices matching the query.
|
java.util.List<Relationship> |
findAllRelationshipsTo(Vertex vertex)
Find all relationships related to the vertex or of the vertex relationship type.
|
java.util.List<Relationship> |
findAllRelationshipsTo(Vertex vertex,
Vertex type)
Find all relationships related to the vertex by the type.
|
java.util.List<Relationship> |
findAllRelationshipsTo(Vertex vertex,
Vertex type,
java.util.Date date)
Find all relationships related to the vertex by the type.
|
Vertex |
findByData(java.lang.Object data)
Return the vertex with the given data.
|
Vertex |
findById(java.lang.Number id)
Return the vertex with the given id.
|
Vertex |
findByName(java.lang.String name)
Return the vertex with the given name.
|
java.util.List |
findByNativeQuery(java.lang.String sql,
java.lang.Class type,
int max)
Execute the native query.
|
Data |
findData(Data data)
Return the lob data.
|
Bot |
getBot()
Return the associated Bot instance.
|
javax.persistence.criteria.CriteriaBuilder |
getCriteriaBuilder()
Return a query builder.
|
Network |
getParent()
Return the parent network.
|
void |
importMerge(Vertex source,
java.util.Map<Vertex,Vertex> identitySet)
Merge the vertex into this network from an import.
|
boolean |
isReadOnly() |
void |
merge(Network network)
Merge the vertices and relations of the network into the source network.
|
void |
merge(Vertex source)
Merge the vertex into this network.
|
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 |
removeVertex(Vertex vertex)
Remove the vertex from the network.
|
void |
removeVertexAndReferences(Vertex vertex)
Remove the vertex and all references to it from the network.
|
void |
resume()
Resume after a merge/save.
|
void |
save()
Merge the memory into the long term.
|
void |
saveProperty(java.lang.String propertyName,
java.lang.String value,
boolean startup)
Save the property setting to the current transaction.
|
java.util.List |
search(javax.persistence.criteria.CriteriaQuery criteria,
int page,
int max)
Execute the criteria query.
|
void |
setBot(Bot Bot)
Set the associated Bot instance.
|
void |
setParent(Network parent)
Set the parent network.
|
int |
size()
Return the total number of vertices stored.
|
void resume()
void save()
boolean isReadOnly()
Vertex createVertex()
Vertex createTemporyVertex()
void addVertex(Vertex vertex)
Vertex createVertex(Vertex vertex)
Vertex createVertex(java.lang.Object data)
Vertex createMeta(Relationship relationship)
Vertex createTimestamp()
void removeVertexAndReferences(Vertex vertex)
void removeVertex(Vertex vertex)
void removeRelationship(Relationship relationship)
java.util.List<Vertex> findAll()
java.util.List<Vertex> findAll(int pageSize, int page)
java.util.List<Vertex> findAllLike(java.lang.String filter)
java.util.List<Vertex> findAllLike(java.lang.String filter, int pageSize, int page)
java.util.List findAllQuery(java.lang.String query)
java.util.List findAllQuery(java.lang.String query, java.util.Map parameters, int pageSize, int page)
int countAll()
int countAllLike(java.lang.String filter)
java.util.List findAllQuery(java.lang.String query, int max)
java.util.List findByNativeQuery(java.lang.String sql, java.lang.Class type, int max)
int executeNativeQuery(java.lang.String sql)
int executeQuery(java.lang.String jpql)
java.util.List<Vertex> findAllInstances(Vertex type, Vertex relationship, java.util.Calendar start)
javax.persistence.criteria.CriteriaBuilder getCriteriaBuilder()
java.util.List search(javax.persistence.criteria.CriteriaQuery criteria, int page, int max)
java.util.List<Relationship> findAllRelationshipsTo(Vertex vertex)
java.util.List<Relationship> findAllRelationshipsTo(Vertex vertex, Vertex type)
java.util.List<Relationship> findAllRelationshipsTo(Vertex vertex, Vertex type, java.util.Date date)
Vertex findByData(java.lang.Object data)
Vertex findByName(java.lang.String name)
Vertex findById(java.lang.Number id)
Network getParent()
void setParent(Network parent)
void merge(Network network)
void merge(Vertex source)
void importMerge(Vertex source, java.util.Map<Vertex,Vertex> identitySet)
int size()
void associateCaseInsensitivity(Vertex word)
void associateCaseInsensitivity(java.lang.String word, Vertex meaning)
void clear()
Vertex createWord(java.lang.String text)
Vertex createFragment(java.lang.String text)
Vertex createSentence(java.lang.String text)
Vertex createPattern(java.lang.String text, SelfCompiler compiler)
Vertex createPattern(java.lang.String text)
Vertex createFormula(java.lang.String text)
Vertex createTemplate(java.lang.String text)
Vertex createSentence(java.lang.String text, boolean generated)
Vertex createSentence(java.lang.String text, boolean generated, boolean reduced)
Vertex createSentence(java.lang.String text, boolean generated, boolean reduced, boolean whitespace)
Vertex createParagraph(Vertex sentence)
Vertex createParagraph(java.lang.String text)
Vertex createObject(java.lang.String name)
Vertex createPrimitive(java.lang.String name)
Vertex createNewObject(java.lang.String name)
Vertex createAnonymousSpeaker()
Vertex createSpeaker(java.lang.String name)
Vertex createUniqueSpeaker(Primitive id, Primitive type, java.lang.String name)
Vertex createName(java.lang.String name)
void checkReduction(Vertex sentence)
void saveProperty(java.lang.String propertyName, java.lang.String value, boolean startup)
void removeProperty(java.lang.String propertyName)
Bot getBot()
void setBot(Bot Bot)