public class Neo4jServerImpl extends Object implements Neo4jServer
Neo4jServer| Constructor and Description |
|---|
Neo4jServerImpl()
Node.Index = relative index of node in its hierarchical sequence
Node.Id = Neo4j numerical Id
Node.rdfAbout = hexadecimal rdf:about collection/item identifier
Note: initial "/" prefixed here again, it was taken out of the rdfAbout to avoid path separator problems
|
Neo4jServerImpl(String serverPath,
String index,
String customPath)
Neo4j contructor
|
| Modifier and Type | Method and Description |
|---|---|
List<CustomNode> |
getChildren(org.neo4j.graphdb.Node node,
int offset,
int limit)
Retrieve the children nodes of a parent node (parent-child relation
dcterms:hasPart).
|
List<CustomNode> |
getChildren(String rdfAbout,
int offset,
int limit)
Convenience override
|
long |
getChildrenCount(org.neo4j.graphdb.Node node)
Retrieve the number of children for a specific node
|
String |
getCustomPath()
The URI path for the REST cal to initial structure
|
List<CustomNode> |
getFollowingSiblings(org.neo4j.graphdb.Node node,
int limit)
Retrieve ordered list of siblings using a specific node as a start
following outbound edm:isNextInSequence or isFakeOrder relations
|
List<CustomNode> |
getFollowingSiblings(String rdfAbout,
int limit)
Retrieve ordered list of siblings using a specific node as a start
following outbound edm:isNextInSequence or isFakeOrder relations
|
Hierarchy |
getInitialStruct(String rdfAbout)
Get the initial hierachy for a specific Europeana id
|
org.neo4j.graphdb.Node |
getNode(String rdfAbout)
get node by its rdfAbout
|
long |
getNodeIndex(org.neo4j.graphdb.Node node)
Get the order of the node within its hierarchy (local index)
|
long |
getNodeIndex(String nodeId)
Get the order of the node within its hierarchy (local index)
|
long |
getNodeIndexByRdfAbout(String rdfAbout)
Get the order of the node within its hierarchy (local index)
|
org.neo4j.graphdb.Node |
getParent(org.neo4j.graphdb.Node node)
Retrieve the parent node of a node (parent relation dcterms:isPartOf)
|
List<CustomNode> |
getPrecedingSiblings(org.neo4j.graphdb.Node node,
int limit)
Convenience override
Retrieve ordered list of siblings using a specific node as a start
following inbound edm:isNextInSequence or isFakeOrder relations
|
List<CustomNode> |
getPrecedingSiblings(String rdfAbout,
int limit)
Retrieve ordered list of siblings using a specific node as a start
following inbound edm:isNextInSequence or isFakeOrder relations
|
boolean |
isHierarchy(String rdfAbout)
Check if the specified id belongs to a hierarchy
|
boolean |
isHierarchyTimeLimited(String rdfAbout,
int timeOutMillis)
Check if the specified id belongs to a hierarchy
|
public Neo4jServerImpl(String serverPath, String index, String customPath)
serverPath - The path of the Neo4j serverindex - The name of the index to search oncustomPath - The path of the custom Europeana Neo4j pluginspublic Neo4jServerImpl()
public org.neo4j.graphdb.Node getNode(String rdfAbout) throws Neo4JException
Neo4jServergetNode in interface Neo4jServerrdfAbout - the rdfAbout (id) to search onNeo4JExceptionpublic long getNodeIndex(org.neo4j.graphdb.Node node)
Neo4jServergetNodeIndex in interface Neo4jServernode - A specific neo4j nodepublic long getNodeIndex(String nodeId)
Neo4jServergetNodeIndex in interface Neo4jServernodeId - the numerical id of the nodepublic long getNodeIndexByRdfAbout(String rdfAbout) throws Neo4JException
Neo4jServergetNodeIndexByRdfAbout in interface Neo4jServerrdfAbout - the rdf:about string of a specific neo4j nodeNeo4JExceptionpublic boolean isHierarchy(String rdfAbout) throws Neo4JException
Neo4jServerisHierarchy in interface Neo4jServerrdfAbout - The Europeana idNeo4JExceptionpublic boolean isHierarchyTimeLimited(String rdfAbout, int timeOutMillis) throws Neo4JException, InterruptedException, ExecutionException, TimeoutException
Neo4jServerisHierarchyTimeLimited in interface Neo4jServerrdfAbout - The Europeana idtimeOutMillis - seconds to wait until forcing a time-out (working around Neo4j issues)Neo4JExceptionInterruptedExceptionExecutionExceptionTimeoutExceptionpublic List<CustomNode> getChildren(String rdfAbout, int offset, int limit)
Neo4jServergetChildren in interface Neo4jServerrdfAbout - The node with this rdf:about to start fromoffset - from which child to start receiving fromlimit - how many children to receivepublic List<CustomNode> getChildren(org.neo4j.graphdb.Node node, int offset, int limit)
Neo4jServergetChildren in interface Neo4jServernode - The node for which to retrieve the childrenoffset - from which child to start receiving fromlimit - how many children to receivepublic org.neo4j.graphdb.Node getParent(org.neo4j.graphdb.Node node)
Neo4jServergetParent in interface Neo4jServernode - The node for which to retrieve the parentpublic List<CustomNode> getFollowingSiblings(String rdfAbout, int limit)
Neo4jServergetFollowingSiblings in interface Neo4jServerrdfAbout - The node with this rdf:about to start fromlimit - the number of siblings to retrievepublic List<CustomNode> getFollowingSiblings(org.neo4j.graphdb.Node node, int limit)
Neo4jServergetFollowingSiblings in interface Neo4jServernode - The node to start fromlimit - the number of nodes to retrievepublic List<CustomNode> getPrecedingSiblings(String rdfAbout, int limit)
Neo4jServergetPrecedingSiblings in interface Neo4jServerrdfAbout - The node with this rdf:about to start fromlimit - the number of nodes to retrievepublic List<CustomNode> getPrecedingSiblings(org.neo4j.graphdb.Node node, int limit)
Neo4jServergetPrecedingSiblings in interface Neo4jServernode - The node to start fromlimit - the number of nodes to retrievepublic long getChildrenCount(org.neo4j.graphdb.Node node)
Neo4jServergetChildrenCount in interface Neo4jServernode - The node to search onpublic Hierarchy getInitialStruct(String rdfAbout) throws Neo4JException
Neo4jServergetInitialStruct in interface Neo4jServerrdfAbout - The id to search onNeo4JExceptionpublic String getCustomPath()
Neo4jServergetCustomPath in interface Neo4jServerCopyright © 2017 Europeana Foundation. All rights reserved.