-
Notifications
You must be signed in to change notification settings - Fork 275
Property Graph Model
okram edited this page Sep 14, 2010
·
31 revisions
Blueprints provides a property graph data model. The property graph model is made up of a collection of Java interfaces. In order to connect an application to a graph framework, all that is required is that these interfaces be implemented. This section will describe the interfaces of the property graph model.
There are only four interfaces which are itemized below and in the following sub-sections, their method signatures presented.
- graph: an object that contains vertices and edges.
-
element: an object that maintains properties (i.e. key/value pair map).
- vertex: an object that is connected to other objects by edges.
- edge: an object that connects two vertices.
- index: an object that maintains a index of vertices and edges by their properties.
In order to aid in the understanding of the various methods defined below, the following diagram identifies the names of the different components of a graph.
public Vertex addVertex(Object id);
public Vertex getVertex(Object id);
public Iterable<Vertex> getVertices();
public void removeVertex(Vertex vertex);
public Edge addEdge(Object id, Vertex outVertex, Vertex inVertex, String label);
public Iterable<Edge> getEdges();
public void removeEdge(Edge edge);
public Index getIndex();
public void startTransaction();
public void stopTransaction(boolean success);
public void autoTransactions(boolean auto);
public boolean isAutoTransactions();
public void clear();
public void shutdown();
public Object getProperty(String key);
public Set<String> getPropertyKeys();
public void setProperty(String key, Object value);
public Object getId();
public Iterable<Edge> getOutEdges();
public Iterable<Edge> getInEdges();
public Vertex getOutVertex();
public Vertex getInVertex();
public String getLabel();
public void put(String key, Object value, Element element);
public Iterable<Element> get(String key, Object value);
public void remove(String key, Object value, Element element);
public void indexAll(boolean indexAll);
public void addIndexKey(String key);
public void removeIndexKey(String key);