public class BasicNetwork extends AbstractNetwork
MAX_SIZE, MAX_TEXT| Constructor and Description |
|---|
BasicNetwork() |
BasicNetwork(boolean isShortTerm) |
BasicNetwork(Network parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRelationship(Relationship relationship) |
void |
addVertex(Vertex vertex)
Add the existing vertex to the network.
|
void |
clear()
Clear all vertices from the network.
|
BasicNetwork |
clone()
Return a thread safe copy of the network.
|
int |
countAll()
Return count of all vertices.
|
int |
countAllLike(java.lang.String filter)
Return count of all vertices matching the query.
|
Vertex |
createVertex(Vertex source)
Create a new vertex from the source.
|
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<Vertex> |
findAllQuery(java.lang.String query)
Return all vertices matching the query.
|
java.util.List<Vertex> |
findAllQuery(java.lang.String query,
int max)
Return all vertices matching the query.
|
java.util.List<Vertex> |
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 vertex type.
|
java.util.List<Relationship> |
findAllRelationshipsTo(Vertex vertex,
Vertex type,
java.util.Date date)
Find all relationships related to the vertex by the vertex 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 name.
|
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.
|
javax.persistence.criteria.CriteriaBuilder |
getCriteriaBuilder()
Return a query builder.
|
java.util.Map<java.lang.Number,Data> |
getDataById() |
Network |
getParent()
Return the parent network.
|
java.util.Set<Vertex> |
getVertices() |
java.util.Map<java.lang.Number,Vertex> |
getVerticesById() |
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.
|
java.util.List |
search(javax.persistence.criteria.CriteriaQuery criteria,
int page,
int max)
Execute the criteria query.
|
void |
setDataById(java.util.Map<java.lang.Number,Data> dataById) |
void |
setParent(Network parent)
Set the parent network.
|
void |
setVerticesById(java.util.Map<java.lang.Number,Vertex> verticesById) |
int |
size()
Return the total number of vertices stored.
|
java.lang.String |
toString() |
associateCaseInsensitivity, associateCaseInsensitivity, checkReduction, createAnonymousSpeaker, createFormula, createFragment, createInstance, createInstance, createMeta, createName, createNewObject, createObject, createParagraph, createParagraph, createPattern, createPattern, createPrimitive, createSentence, createSentence, createSentence, createSentence, createSpeaker, createTemplate, createTemporyVertex, createTimestamp, createUniqueSpeaker, createVertex, createVertex, createWord, getBot, getVerticesByData, importMerge, importVertex, isReadOnly, isShortTerm, merge, merge, parseFragment, removeProperty, removeRelationship, saveProperty, setBot, setShortTermpublic BasicNetwork()
public BasicNetwork(boolean isShortTerm)
public BasicNetwork(Network parent)
public void addRelationship(Relationship relationship)
public void resume()
Networkpublic void save()
public BasicNetwork clone()
clone in class AbstractNetworkpublic void clear()
public void addVertex(Vertex vertex)
addVertex in interface NetworkaddVertex in class AbstractNetworkpublic Vertex createVertex(Vertex source)
createVertex in interface NetworkcreateVertex in class AbstractNetworkpublic java.util.Set<Vertex> getVertices()
public Network getParent()
Networkpublic void setParent(Network parent)
Networkpublic int size()
Networkpublic void removeVertexAndReferences(Vertex vertex)
public void removeVertex(Vertex vertex)
public int countAll()
public int countAllLike(java.lang.String filter)
public java.util.List<Vertex> findAll()
public java.util.List<Vertex> findAll(int pageSize, int page)
public java.util.List<Vertex> findAllQuery(java.lang.String query)
public java.util.List<Vertex> findAllQuery(java.lang.String query, java.util.Map parameters, int pageSize, int page)
public java.util.List<Vertex> findAllQuery(java.lang.String query, int max)
public java.util.List findByNativeQuery(java.lang.String sql,
java.lang.Class type,
int max)
public int executeNativeQuery(java.lang.String sql)
public int executeQuery(java.lang.String jpql)
public java.util.List<Vertex> findAllLike(java.lang.String filter)
public java.util.List<Vertex> findAllLike(java.lang.String filter, int pageSize, int page)
public Vertex findByData(java.lang.Object data)
public Vertex findByName(java.lang.String name)
public Vertex findById(java.lang.Number id)
public javax.persistence.criteria.CriteriaBuilder getCriteriaBuilder()
public java.util.List<Vertex> findAllInstances(Vertex type, Vertex relationship, java.util.Calendar start)
public java.util.List search(javax.persistence.criteria.CriteriaQuery criteria,
int page,
int max)
public java.util.List<Relationship> findAllRelationshipsTo(Vertex vertex)
public java.util.List<Relationship> findAllRelationshipsTo(Vertex vertex, Vertex type)
public java.util.List<Relationship> findAllRelationshipsTo(Vertex vertex, Vertex type, java.util.Date date)
public java.util.Map<java.lang.Number,Vertex> getVerticesById()
public void setVerticesById(java.util.Map<java.lang.Number,Vertex> verticesById)
public java.util.Map<java.lang.Number,Data> getDataById()
public void setDataById(java.util.Map<java.lang.Number,Data> dataById)
public java.lang.String toString()
toString in class AbstractNetwork