Skip to content

Latest commit

 

History

History
94 lines (73 loc) · 3.19 KB

Property-Graph-Model.textile

File metadata and controls

94 lines (73 loc) · 3.19 KB

Blueprints provides a set of interfaces for the property graph data model. An example instance is diagrammed above. In order to make a data management system “Blueprints-enabled,” these interfaces must be implemented. Any applications that bind to the Blueprints property graph model API can make use of different data management systems (i.e. plug and play graph backends).

The property graph interfaces are itemized below and in the following sub-sections, their method signatures presented.

  1. graph: an object that contains vertices and edges.
    • transactional graph: a graph that supports transactions
    • indexable graph: a graph that supports indices
  2. 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.
  3. index: an object that maintains a map structure of key/value pairs to elements.
    • automatic index: an index that manages itself as elements are updated.

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.

Graph

```java
public Vertex addVertex(Object id);
public Vertex getVertex(Object id);
public Iterable getVertices();
public void removeVertex(Vertex vertex);
public Edge addEdge(Object id, Vertex outVertex, Vertex inVertex, String label);
public Iterable getEdges();
public void removeEdge(Edge edge);
public void clear();
public void shutdown();
```

TransactionalGraph (extends Graph)

```java
public void startTransaction();
public void stopTransaction(Conclusion conclusion);
public void setMaxBufferSize(int bufferSize);
public int getMaxBufferSize();
public int getCurrentBufferSize();
```

IndexableGraph (extends Graph)

```java
public Index createManualIndex(String indexName, Class indexClass);
public AutomaticIndex createAutomaticIndex(String name, Class indexClass);
public Index getIndex(String indexName, Class indexClass);
public Iterable getIndices();
public void dropIndex(String indexName);
```

Element

```java
public Object getProperty(String key);
public Set getPropertyKeys();
public void setProperty(String key, Object value);
public Object getId();
```

Vertex (extends Element)

```java
public Iterable getOutEdges(String… labels);
public Iterable getInEdges(String… labels);
```

Edge (extends Element)

```java
public Vertex getOutVertex();
public Vertex getInVertex();
public String getLabel();
```

Index [T extends Element]

```java
public long count(String key, Object value);
public String getIndexName();
public Class getIndexClass();
public Type getIndexType();
public void put(String key, Object value, T element);
public Iterable get(String key, Object value);
public void remove(String key, Object value, T element);
```

AutomaticIndex (extends Index)

```java
public Set getAutoIndexKeys();
```