public class RestAPICypherImpl extends Object implements RestAPI
RestAPIInternal.Load
Modifier and Type | Field and Description |
---|---|
static String |
_MATCH_NODE_QUERY |
static String |
_MATCH_REL_QUERY |
static String |
_QUERY_RETURN_NODE |
static String |
_QUERY_RETURN_REL |
static String |
GET_NODE_QUERY |
static String |
GET_REL_QUERY |
static String |
GET_REL_TYPES_QUERY |
Modifier | Constructor and Description |
---|---|
protected |
RestAPICypherImpl(RestAPI restAPI) |
Modifier and Type | Method and Description |
---|---|
void |
addLabels(RestNode node,
Collection<String> labels) |
RestNode |
addToCache(RestNode restNode) |
RestRelationship |
addToCache(RestRelationship rel) |
<T extends org.neo4j.graphdb.PropertyContainer> |
addToIndex(T entity,
RestIndex index,
String key,
Object value) |
protected long |
asLong(Map data,
String idKey) |
RequestResult |
batch(Collection<Map<String,Object>> batchRequestData) |
org.neo4j.graphdb.Transaction |
beginTx() |
void |
close() |
<T extends org.neo4j.graphdb.PropertyContainer> |
createIndex(Class<T> type,
String indexName,
Map<String,String> config) |
void |
createIndex(String type,
String indexName,
Map<String,String> config) |
RestNode |
createNode(Map<String,Object> props) |
RestNode |
createNode(Map<String,Object> props,
Collection<String> labels) |
RestRelationship |
createRelationship(org.neo4j.graphdb.Node startNode,
org.neo4j.graphdb.Node endNode,
org.neo4j.graphdb.RelationshipType type,
Map<String,Object> props) |
RestEntity |
createRestEntity(Map data) |
RestTraversalDescription |
createTraversalDescription() |
void |
delete(RestIndex index) |
void |
deleteEntity(RestEntity entity) |
Collection<String> |
getAllLabelNames() |
Iterable<org.neo4j.graphdb.Node> |
getAllNodes() |
Set<String> |
getAutoIndexedProperties(Class forClass) |
String |
getBaseUri() |
int |
getDegree(RestNode restNode,
org.neo4j.graphdb.RelationshipType type,
org.neo4j.graphdb.Direction direction) |
RestEntityExtractor |
getEntityExtractor() |
<S extends org.neo4j.graphdb.PropertyContainer> |
getIndex(Class<S> entityType,
String indexName,
String key,
Object value) |
<T extends org.neo4j.graphdb.PropertyContainer> |
getIndex(String indexName) |
<S extends org.neo4j.graphdb.PropertyContainer> |
getIndexQuery(Class<S> entityType,
String indexName,
String key,
Object value) |
RestNode |
getNodeById(long id) |
RestNode |
getNodeById(long id,
RestAPIInternal.Load force) |
RestNode |
getNodeFromCache(long id) |
Iterable<RestNode> |
getNodesByLabel(String label) |
Iterable<RestNode> |
getNodesByLabelAndProperty(String label,
String property,
Object value) |
RestNode |
getOrCreateNode(RestIndex<org.neo4j.graphdb.Node> index,
String key,
Object value,
Map<String,Object> properties,
Collection<String> labels) |
org.neo4j.graphdb.Relationship |
getOrCreateRelationship(org.neo4j.graphdb.Node start,
org.neo4j.graphdb.Node end,
org.neo4j.graphdb.RelationshipType type,
org.neo4j.graphdb.Direction direction,
Map<String,Object> props) |
RestRelationship |
getOrCreateRelationship(RestIndex<org.neo4j.graphdb.Relationship> index,
String key,
Object value,
RestNode start,
RestNode end,
String type,
Map<String,Object> properties) |
RestRelationship |
getRelationshipById(long id) |
RestRelationship |
getRelationshipById(long id,
RestAPIInternal.Load force) |
Iterable<org.neo4j.graphdb.Relationship> |
getRelationships(RestNode restNode,
org.neo4j.graphdb.Direction direction,
org.neo4j.graphdb.RelationshipType... types) |
Iterable<org.neo4j.graphdb.RelationshipType> |
getRelationshipTypes() |
Iterable<org.neo4j.graphdb.RelationshipType> |
getRelationshipTypes(RestNode node) |
RestRelationship |
getRelFromCache(long id) |
RestRequest |
getRestRequest() |
RestCypherTransactionManager |
getTxManager() |
boolean |
hasToUpdate(long lastUpdate) |
RestIndexManager |
index() |
IndexInfo |
indexInfo(String indexType) |
boolean |
isAutoIndexingEnabled(Class<? extends org.neo4j.graphdb.PropertyContainer> clazz) |
static String |
MATCH_NODE_QUERY(String name) |
RestNode |
merge(String labelName,
String key,
Object value,
Map<String,Object> nodeProperties,
Collection<String> labels) |
CypherTransaction |
newCypherTransaction() |
Map<String,Object> |
props(Map<String,Object> props) |
<T extends org.neo4j.graphdb.PropertyContainer> |
putIfAbsent(T entity,
RestIndex index,
String key,
Object value) |
CypherResult |
query(String statement,
Map<String,Object> params) |
QueryResult<Map<String,Object>> |
query(String statement,
Map<String,Object> params,
ResultConverter resultConverter) |
<S extends org.neo4j.graphdb.PropertyContainer> |
queryIndex(Class<S> entityType,
String indexName,
String key,
Object value) |
<S extends org.neo4j.graphdb.PropertyContainer> |
queryIndexQuery(Class<S> entityType,
String indexName,
String key,
Object value) |
<T extends org.neo4j.graphdb.PropertyContainer> |
removeFromIndex(RestIndex index,
T entity) |
<T extends org.neo4j.graphdb.PropertyContainer> |
removeFromIndex(RestIndex index,
T entity,
String key) |
<T extends org.neo4j.graphdb.PropertyContainer> |
removeFromIndex(RestIndex index,
T entity,
String key,
Object value) |
void |
removeLabel(RestNode node,
String label) |
void |
removeNodeFromCache(long id) |
void |
removeProperty(RestEntity entity,
String key) |
void |
removeRelFromCache(long id) |
void |
setAutoIndexingEnabled(Class<? extends org.neo4j.graphdb.PropertyContainer> clazz,
boolean enabled) |
void |
setPropertiesOnEntity(RestEntity entity,
Map<String,Object> properties) |
void |
setPropertyOnEntity(RestEntity entity,
String key,
Object value) |
void |
startAutoIndexingProperty(Class forClass,
String s) |
void |
stopAutoIndexingProperty(Class forClass,
String s) |
RestTraverser |
traverse(RestNode restNode,
Map<String,Object> description) |
Iterable<org.neo4j.graphdb.Relationship> |
updateRelationships(org.neo4j.graphdb.Node start,
Collection<org.neo4j.graphdb.Node> endNodes,
org.neo4j.graphdb.RelationshipType type,
org.neo4j.graphdb.Direction direction,
String targetLabel) |
public static final String _QUERY_RETURN_NODE
public static final String _QUERY_RETURN_REL
public static final String _MATCH_NODE_QUERY
public static final String GET_NODE_QUERY
public static final String _MATCH_REL_QUERY
public static final String GET_REL_QUERY
public static final String GET_REL_TYPES_QUERY
protected RestAPICypherImpl(RestAPI restAPI)
public RestNode getNodeById(long id, RestAPIInternal.Load force)
getNodeById
in interface RestAPIInternal
public RestNode addToCache(RestNode restNode)
addToCache
in interface RestAPIInternal
public RestRelationship addToCache(RestRelationship rel)
addToCache
in interface RestAPIInternal
public RestNode getNodeFromCache(long id)
getNodeFromCache
in interface RestAPIInternal
public RestRelationship getRelFromCache(long id)
getRelFromCache
in interface RestAPIInternal
public void removeNodeFromCache(long id)
removeNodeFromCache
in interface RestAPIInternal
public void removeRelFromCache(long id)
removeRelFromCache
in interface RestAPIInternal
public RestNode getNodeById(long id)
getNodeById
in interface RestAPI
public RestRelationship getRelationshipById(long id)
getRelationshipById
in interface RestAPI
public RestRelationship getRelationshipById(long id, RestAPIInternal.Load force)
getRelationshipById
in interface RestAPIInternal
public RestNode createNode(Map<String,Object> props)
createNode
in interface RestAPI
public RestNode createNode(Map<String,Object> props, Collection<String> labels)
createNode
in interface RestAPI
public RestNode merge(String labelName, String key, Object value, Map<String,Object> nodeProperties, Collection<String> labels)
public RestRelationship createRelationship(org.neo4j.graphdb.Node startNode, org.neo4j.graphdb.Node endNode, org.neo4j.graphdb.RelationshipType type, Map<String,Object> props)
createRelationship
in interface RestAPI
public void removeLabel(RestNode node, String label)
removeLabel
in interface RestAPI
public Iterable<RestNode> getNodesByLabel(String label)
getNodesByLabel
in interface RestAPI
public Iterable<RestNode> getNodesByLabelAndProperty(String label, String property, Object value)
getNodesByLabelAndProperty
in interface RestAPI
public Iterable<org.neo4j.graphdb.RelationshipType> getRelationshipTypes(RestNode node)
getRelationshipTypes
in interface RestAPI
public int getDegree(RestNode restNode, org.neo4j.graphdb.RelationshipType type, org.neo4j.graphdb.Direction direction)
public Iterable<org.neo4j.graphdb.Relationship> getRelationships(RestNode restNode, org.neo4j.graphdb.Direction direction, org.neo4j.graphdb.RelationshipType... types)
getRelationships
in interface RestAPI
public void addLabels(RestNode node, Collection<String> labels)
public RestRequest getRestRequest()
getRestRequest
in interface RestAPIInternal
public RestCypherTransactionManager getTxManager()
public <S extends org.neo4j.graphdb.PropertyContainer> org.neo4j.graphdb.index.IndexHits<S> getIndexQuery(Class<S> entityType, String indexName, String key, Object value)
public <S extends org.neo4j.graphdb.PropertyContainer> org.neo4j.graphdb.index.IndexHits<S> queryIndexQuery(Class<S> entityType, String indexName, String key, Object value)
public <S extends org.neo4j.graphdb.PropertyContainer> org.neo4j.graphdb.index.IndexHits<S> getIndex(Class<S> entityType, String indexName, String key, Object value)
getIndex
in interface RestAPIIndex
public <S extends org.neo4j.graphdb.PropertyContainer> org.neo4j.graphdb.index.IndexHits<S> queryIndex(Class<S> entityType, String indexName, String key, Object value)
queryIndex
in interface RestAPIIndex
public RestIndexManager index()
index
in interface RestAPIIndex
public void deleteEntity(RestEntity entity)
deleteEntity
in interface RestAPI
public void setPropertyOnEntity(RestEntity entity, String key, Object value)
setPropertyOnEntity
in interface RestAPI
public void setPropertiesOnEntity(RestEntity entity, Map<String,Object> properties)
setPropertiesOnEntity
in interface RestAPI
public void removeProperty(RestEntity entity, String key)
removeProperty
in interface RestAPI
public RestNode getOrCreateNode(RestIndex<org.neo4j.graphdb.Node> index, String key, Object value, Map<String,Object> properties, Collection<String> labels)
getOrCreateNode
in interface RestAPIIndex
public RestRelationship getOrCreateRelationship(RestIndex<org.neo4j.graphdb.Relationship> index, String key, Object value, RestNode start, RestNode end, String type, Map<String,Object> properties)
getOrCreateRelationship
in interface RestAPIIndex
public CypherResult query(String statement, Map<String,Object> params)
public CypherTransaction newCypherTransaction()
public QueryResult<Map<String,Object>> query(String statement, Map<String,Object> params, ResultConverter resultConverter)
public RestTraverser traverse(RestNode restNode, Map<String,Object> description)
public RequestResult batch(Collection<Map<String,Object>> batchRequestData)
public <T extends org.neo4j.graphdb.PropertyContainer> RestIndex<T> getIndex(String indexName)
getIndex
in interface RestAPIIndex
public void createIndex(String type, String indexName, Map<String,String> config)
createIndex
in interface RestAPIIndex
public <T extends org.neo4j.graphdb.PropertyContainer> RestIndex<T> createIndex(Class<T> type, String indexName, Map<String,String> config)
createIndex
in interface RestAPIIndex
public org.neo4j.graphdb.Relationship getOrCreateRelationship(org.neo4j.graphdb.Node start, org.neo4j.graphdb.Node end, org.neo4j.graphdb.RelationshipType type, org.neo4j.graphdb.Direction direction, Map<String,Object> props)
getOrCreateRelationship
in interface RestAPI
public Iterable<org.neo4j.graphdb.Relationship> updateRelationships(org.neo4j.graphdb.Node start, Collection<org.neo4j.graphdb.Node> endNodes, org.neo4j.graphdb.RelationshipType type, org.neo4j.graphdb.Direction direction, String targetLabel)
updateRelationships
in interface RestAPI
public boolean isAutoIndexingEnabled(Class<? extends org.neo4j.graphdb.PropertyContainer> clazz)
isAutoIndexingEnabled
in interface RestAPIIndex
public void setAutoIndexingEnabled(Class<? extends org.neo4j.graphdb.PropertyContainer> clazz, boolean enabled)
setAutoIndexingEnabled
in interface RestAPIIndex
public Set<String> getAutoIndexedProperties(Class forClass)
getAutoIndexedProperties
in interface RestAPIIndex
public void startAutoIndexingProperty(Class forClass, String s)
startAutoIndexingProperty
in interface RestAPIIndex
public void stopAutoIndexingProperty(Class forClass, String s)
stopAutoIndexingProperty
in interface RestAPIIndex
public void delete(RestIndex index)
delete
in interface RestAPIIndex
public <T extends org.neo4j.graphdb.PropertyContainer> void removeFromIndex(RestIndex index, T entity, String key, Object value)
removeFromIndex
in interface RestAPIIndex
public <T extends org.neo4j.graphdb.PropertyContainer> void removeFromIndex(RestIndex index, T entity, String key)
removeFromIndex
in interface RestAPIIndex
public <T extends org.neo4j.graphdb.PropertyContainer> void removeFromIndex(RestIndex index, T entity)
removeFromIndex
in interface RestAPIIndex
public <T extends org.neo4j.graphdb.PropertyContainer> void addToIndex(T entity, RestIndex index, String key, Object value)
addToIndex
in interface RestAPIIndex
public <T extends org.neo4j.graphdb.PropertyContainer> T putIfAbsent(T entity, RestIndex index, String key, Object value)
putIfAbsent
in interface RestAPIIndex
public IndexInfo indexInfo(String indexType)
indexInfo
in interface RestAPIIndex
public boolean hasToUpdate(long lastUpdate)
hasToUpdate
in interface RestAPIInternal
public Collection<String> getAllLabelNames()
getAllLabelNames
in interface RestAPI
public Iterable<org.neo4j.graphdb.RelationshipType> getRelationshipTypes()
getRelationshipTypes
in interface RestAPI
public RestTraversalDescription createTraversalDescription()
createTraversalDescription
in interface RestAPI
public String getBaseUri()
getBaseUri
in interface RestAPIInternal
public RestEntityExtractor getEntityExtractor()
getEntityExtractor
in interface RestAPIInternal
public RestEntity createRestEntity(Map data)
createRestEntity
in interface RestAPIInternal
public Iterable<org.neo4j.graphdb.Node> getAllNodes()
Copyright © 2011-2015–2016 Pivotal Software, Inc.. All rights reserved.