public class RestAPIImpl extends Object implements RestAPI
RestAPIInternal.Load| Modifier and Type | Field and Description |
|---|---|
static String |
_QUERY_RETURN_NODE |
static String |
GET_REL_TYPES_QUERY |
protected RestRequest |
restRequest |
| Constructor and Description |
|---|
RestAPIImpl(String uri) |
RestAPIImpl(String uri,
String user,
String password) |
| 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) |
RestNode |
createRestNode(RequestResult result) |
RestRelationship |
createRestRelationship(RequestResult requestResult,
org.neo4j.graphdb.PropertyContainer element) |
protected RestRequest |
createRestRequest(String uri,
String user,
String password) |
RestTraversalDescription |
createTraversalDescription() |
void |
delete(RestIndex index) |
void |
deleteEntity(RestEntity entity) |
Collection<String> |
getAllLabelNames() |
Set<String> |
getAutoIndexedProperties(Class forClass) |
String |
getBaseUri() |
int |
getDegree(RestNode restNode,
org.neo4j.graphdb.RelationshipType type,
org.neo4j.graphdb.Direction direction) |
RestEntityExtractor |
getEntityExtractor() |
long |
getEntityRefetchTimeInMillis() |
<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) |
RestNode |
getNodeById(long id) |
RestNode |
getNodeById(long id,
RestAPIInternal.Load force) |
RestNode |
getNodeFromCache(long id) |
Collection<String> |
getNodeLabels(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() |
boolean |
hasToUpdate(long lastUpdate) |
RestIndexManager |
index() |
IndexInfo |
indexInfo(String indexType) |
boolean |
isAutoIndexingEnabled(Class<? extends org.neo4j.graphdb.PropertyContainer> clazz) |
RestNode |
merge(String labelName,
String key,
Object value,
Map<String,Object> nodeProperties,
Collection<String> labels) |
<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) |
<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) |
protected Collection<org.neo4j.graphdb.Node> |
removeMissingRelationships(org.neo4j.graphdb.Node node,
Collection<org.neo4j.graphdb.Node> targetNodes,
org.neo4j.graphdb.RelationshipType type,
org.neo4j.graphdb.Direction direction,
org.neo4j.graphdb.Label targetLabel) |
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 |
setEntityRefetchTimeInMillis(long entityRefetchTimeInMillis) |
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 targetLabelName) |
Iterable<org.neo4j.graphdb.Relationship> |
wrapRelationships(RequestResult requestResult) |
public static final String _QUERY_RETURN_NODE
public static final String GET_REL_TYPES_QUERY
protected RestRequest restRequest
public RestAPIImpl(String uri)
protected RestRequest createRestRequest(String uri, String user, String password)
public RestIndexManager index()
index in interface RestAPIIndexpublic RestNode getNodeById(long id, RestAPIInternal.Load force)
getNodeById in interface RestAPIInternalpublic RestRelationship getRelationshipById(long id, RestAPIInternal.Load force)
getRelationshipById in interface RestAPIInternalpublic RestNode addToCache(RestNode restNode)
addToCache in interface RestAPIInternalpublic RestRelationship addToCache(RestRelationship rel)
addToCache in interface RestAPIInternalpublic RestNode getNodeFromCache(long id)
getNodeFromCache in interface RestAPIInternalpublic RestRelationship getRelFromCache(long id)
getRelFromCache in interface RestAPIInternalpublic void removeNodeFromCache(long id)
removeNodeFromCache in interface RestAPIInternalpublic void removeRelFromCache(long id)
removeRelFromCache in interface RestAPIInternalpublic RestNode getNodeById(long id)
getNodeById in interface RestAPIpublic RestRelationship getRelationshipById(long id)
getRelationshipById in interface RestAPIpublic RestNode createNode(Map<String,Object> props)
createNode in interface RestAPIpublic RestNode createNode(Map<String,Object> props, Collection<String> labels)
createNode in interface RestAPIpublic RestNode createRestNode(RequestResult result)
public RestRelationship createRestRelationship(RequestResult requestResult, org.neo4j.graphdb.PropertyContainer element)
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 RestAPIpublic 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 RestAPIprotected Collection<org.neo4j.graphdb.Node> removeMissingRelationships(org.neo4j.graphdb.Node node, Collection<org.neo4j.graphdb.Node> targetNodes, org.neo4j.graphdb.RelationshipType type, org.neo4j.graphdb.Direction direction, org.neo4j.graphdb.Label targetLabel)
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 targetLabelName)
updateRelationships in interface RestAPIpublic RestNode merge(String labelName, String key, Object value, Map<String,Object> nodeProperties, Collection<String> labels)
public void removeLabel(RestNode node, String label)
removeLabel in interface RestAPIpublic Collection<String> getNodeLabels(long id)
public Collection<String> getAllLabelNames()
getAllLabelNames in interface RestAPIpublic Iterable<RestNode> getNodesByLabel(String label)
getNodesByLabel in interface RestAPIpublic Iterable<RestNode> getNodesByLabelAndProperty(String label, String property, Object value)
getNodesByLabelAndProperty in interface RestAPIpublic Iterable<org.neo4j.graphdb.RelationshipType> getRelationshipTypes(RestNode node)
getRelationshipTypes in interface RestAPIpublic int getDegree(RestNode restNode, org.neo4j.graphdb.RelationshipType type, org.neo4j.graphdb.Direction direction)
public Iterable<org.neo4j.graphdb.RelationshipType> getRelationshipTypes()
getRelationshipTypes in interface RestAPIpublic void addLabels(RestNode node, Collection<String> labels)
public RestTraversalDescription createTraversalDescription()
createTraversalDescription in interface RestAPIpublic long getEntityRefetchTimeInMillis()
public String getBaseUri()
getBaseUri in interface RestAPIInternalpublic void setEntityRefetchTimeInMillis(long entityRefetchTimeInMillis)
public Iterable<org.neo4j.graphdb.Relationship> wrapRelationships(RequestResult requestResult)
public RestEntityExtractor getEntityExtractor()
getEntityExtractor in interface RestAPIInternalpublic void deleteEntity(RestEntity entity)
deleteEntity in interface RestAPIpublic void setPropertyOnEntity(RestEntity entity, String key, Object value)
setPropertyOnEntity in interface RestAPIpublic void setPropertiesOnEntity(RestEntity entity, Map<String,Object> properties)
setPropertiesOnEntity in interface RestAPIpublic boolean hasToUpdate(long lastUpdate)
hasToUpdate in interface RestAPIInternalpublic void removeProperty(RestEntity entity, String key)
removeProperty in interface RestAPIpublic CypherResult query(String statement, Map<String,Object> params)
public Iterable<org.neo4j.graphdb.Relationship> getRelationships(RestNode restNode, org.neo4j.graphdb.Direction direction, org.neo4j.graphdb.RelationshipType... types)
getRelationships in interface RestAPIpublic RestTraverser traverse(RestNode restNode, Map<String,Object> description)
public QueryResult<Map<String,Object>> query(String statement, Map<String,Object> params, ResultConverter resultConverter)
public RestEntity createRestEntity(Map data)
createRestEntity in interface RestAPIInternalpublic RestRequest getRestRequest()
getRestRequest in interface RestAPIInternalpublic RequestResult batch(Collection<Map<String,Object>> batchRequestData)
public IndexInfo indexInfo(String indexType)
indexInfo in interface RestAPIIndexpublic void stopAutoIndexingProperty(Class forClass, String s)
stopAutoIndexingProperty in interface RestAPIIndexpublic void startAutoIndexingProperty(Class forClass, String s)
startAutoIndexingProperty in interface RestAPIIndexpublic Set<String> getAutoIndexedProperties(Class forClass)
getAutoIndexedProperties in interface RestAPIIndexpublic void setAutoIndexingEnabled(Class<? extends org.neo4j.graphdb.PropertyContainer> clazz, boolean enabled)
setAutoIndexingEnabled in interface RestAPIIndexpublic boolean isAutoIndexingEnabled(Class<? extends org.neo4j.graphdb.PropertyContainer> clazz)
isAutoIndexingEnabled in interface RestAPIIndexpublic <T extends org.neo4j.graphdb.PropertyContainer> RestIndex<T> createIndex(Class<T> type, String indexName, Map<String,String> config)
createIndex in interface RestAPIIndexpublic void createIndex(String type, String indexName, Map<String,String> config)
createIndex in interface RestAPIIndexpublic <T extends org.neo4j.graphdb.PropertyContainer> RestIndex<T> getIndex(String indexName)
getIndex in interface RestAPIIndexpublic 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 RestAPIIndexpublic RestNode getOrCreateNode(RestIndex<org.neo4j.graphdb.Node> index, String key, Object value, Map<String,Object> properties, Collection<String> labels)
getOrCreateNode in interface RestAPIIndexpublic <T extends org.neo4j.graphdb.PropertyContainer> T putIfAbsent(T entity,
RestIndex index,
String key,
Object value)
putIfAbsent in interface RestAPIIndexpublic <T extends org.neo4j.graphdb.PropertyContainer> void addToIndex(T entity,
RestIndex index,
String key,
Object value)
addToIndex in interface RestAPIIndexpublic <T extends org.neo4j.graphdb.PropertyContainer> void removeFromIndex(RestIndex index, T entity)
removeFromIndex in interface RestAPIIndexpublic <T extends org.neo4j.graphdb.PropertyContainer> void removeFromIndex(RestIndex index, T entity, String key)
removeFromIndex in interface RestAPIIndexpublic <T extends org.neo4j.graphdb.PropertyContainer> void removeFromIndex(RestIndex index, T entity, String key, Object value)
removeFromIndex in interface RestAPIIndexpublic void delete(RestIndex index)
delete in interface RestAPIIndexpublic <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 RestAPIIndexCopyright © 2011-2015–2015 Pivotal Software, Inc.. All rights reserved.