Collection of plug-ins and extensions to simplify access to the ontology-related properties and the annotation set hierarchy
Content:
For the sake of concision I assume that Neo4J has been installed in /neo4j/
. Make sure to adjust it to your set-up accordingly.
-
Stop Neo4J
neo4j stop $ neo4j start
-
Download or compile the JAR and copy it to Neo4J's plug-in directory.
cp ./dist/ontology.jar /neo4j/plugins/
-
Enable unmanaged JAX-RS extensions. Open
/neo4j/conf/neo4j-server.properties
and ensure that the line starting with:org.neo4j.server.thirdparty_jaxrs_classes=
looks like this:
org.neo4j.server.thirdparty_jaxrs_classes=org.neo4j.ontology.server.unmanaged=/ontology/unmanaged
-
Start Neo4J
neo4j start
-
OPTIONAL: Open
http://localhost:7474
to check if everything works. In case nothing shows up check/path/to/neo4j/data/log/console.log
and file an issue. Cheers.
Travis-CI is automatically compiling the JAR for every release and attaches it to the release but you can surely compile the JAR yourself.
Requirements:
Compile:
gradlew build
HTTP: GET
URL: http://localhost:7474/ontology/unmanaged/annotations/<USER_NAME>
Parameters:
objectification
: Iftrue
the responsenodes
property will be an object with the keys being the ontology term's URI. Default return type is an Array, i.e.false
.
Description: Returns an object with all terms (or classes) directly or indirectly related to annotations of user's accessible data sets.
HTTP: POST
URL: http://localhost:7474/ontology/unmanaged/annotations/[<USER_NAME>]
Description: Labels ontology terms that belong to all (or a specific user's) annotation set hierarchy.
HTTP: DELETE
URL: http://localhost:7474/ontology/unmanaged/annotations/
Description: Remove all annotation set-related labels.
URL: http://localhost:7474/db/data/ext/Annotations/graphdb/getNumAnnoPerDataSet
Description: A GET
request returns the possible parameters and a POST
request returns the actual results. The results could be used to draw a histogram to quickly confirm whether the annotations follow a Gaussian distribution or are biased.
-
Send a POST request to
http://localhost:7474/ontology/unmanaged/annotations/
to prepare annotation sets for all users. Note, this step needs to be done whenever a user uploads, deletes or shares a data set. -
Send a GET request to
http://localhost:7474/ontology/unmanaged/annotations/<USER_NAME>
to get the user's annotation set hierarchy.