|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pandora.knowledge.AbstractNetwork
org.pandora.knowledge.BasicNetwork
public class BasicNetwork
An interconnected set of vertices, representing and knowledge-space. Basic implementation to allow subclasses to avoid defining some of the basic stuff.
Field Summary |
---|
Fields inherited from class org.pandora.knowledge.AbstractNetwork |
---|
MAX_SIZE, MAX_TEXT |
Constructor Summary | |
---|---|
BasicNetwork()
|
|
BasicNetwork(boolean isShortTerm)
|
|
BasicNetwork(Network parent)
|
Method Summary | |
---|---|
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. |
java.util.List<Vertex> |
findAll()
Return all vertices. |
java.util.List<Vertex> |
findAllLike(java.lang.String filter)
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<Relationship> |
findAllRelationshipsTo(Vertex vertex)
Find all relationships related to the vertex or of 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. |
Pandora |
getPandora()
Return the associated Pandora instance. |
Network |
getParent()
Return the parent network. |
java.util.Map<java.lang.Number,Vertex> |
getVerticiesById()
|
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 |
setPandora(Pandora pandora)
Set the associated Pandora instance. |
void |
setParent(Network parent)
Set the parent network. |
void |
setVerticiesById(java.util.Map<java.lang.Number,Vertex> verticiesById)
|
int |
size()
Return the total number of vertices stored. |
java.lang.String |
toString()
|
Methods inherited from class org.pandora.knowledge.AbstractNetwork |
---|
associateCaseInsensitivity, createInstance, createInstance, createNewObject, createObject, createSentence, createSpeaker, createTimestamp, createVertex, createVertex, createVertex, createWord, importMerge, importVertex, isShortTerm, merge, merge, removeRelationship, setShortTerm |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicNetwork()
public BasicNetwork(boolean isShortTerm)
public BasicNetwork(Network parent)
Method Detail |
---|
public void resume()
Network
resume
in interface Network
public void save()
save
in interface Network
public BasicNetwork clone()
clone
in class AbstractNetwork
public void clear()
clear
in interface Network
public void addVertex(Vertex vertex)
public Network getParent()
Network
getParent
in interface Network
public void setParent(Network parent)
Network
setParent
in interface Network
public int size()
Network
size
in interface Network
public void removeVertexAndReferences(Vertex vertex)
removeVertexAndReferences
in interface Network
public void removeVertex(Vertex vertex)
removeVertex
in interface Network
public java.util.List<Vertex> findAll()
findAll
in interface Network
public java.util.List<Vertex> findAllQuery(java.lang.String query)
findAllQuery
in interface Network
public java.util.List<Vertex> findAllQuery(java.lang.String query, int max)
findAllQuery
in interface Network
public java.util.List<Vertex> findAllLike(java.lang.String filter)
findAllLike
in interface Network
public Vertex findByData(java.lang.Object data)
findByData
in interface Network
public Vertex findByName(java.lang.String name)
findByName
in interface Network
public Vertex findById(java.lang.Number id)
findById
in interface Network
public java.util.List<Relationship> findAllRelationshipsTo(Vertex vertex)
findAllRelationshipsTo
in interface Network
public java.util.Map<java.lang.Number,Vertex> getVerticiesById()
public void setVerticiesById(java.util.Map<java.lang.Number,Vertex> verticiesById)
public java.lang.String toString()
toString
in class AbstractNetwork
public Pandora getPandora()
getPandora
in interface Network
getPandora
in class AbstractNetwork
public void setPandora(Pandora pandora)
setPandora
in interface Network
setPandora
in class AbstractNetwork
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |