AnnotationManagerN4J
AnnotationManagerN4J is an annotation server compatible with the Annotator.js client implementing the Annotator storage API (with some extensions).
It is written in Java using the Restlet framework and the Neo4J graph database. It is built using Maven.
Source
The source code can be browsed here or in the Mercurial repository at https://it-dev.mpiwg-berlin.mpg.de/hg/AnnotationManagerN4J/
Building
To check out and build AnnotationManagerN4J you need Mercurial and Maven:
hg clone https://it-dev.mpiwg-berlin.mpg.de/hg/AnnotationManagerN4J
cd AnnotationManagerN4J
mvn package
(this produces the webapp as a directorytarget/AnnotationManager
or war filetarget/AnnotationManager.war
)
Configuration
The server is configured through the file serverconfig.property
in the WEB-INF
folder in the webapp directory.
The file is in Java property file syntax and might look like this:
# directory where Neo4J keeps its files (otherwise the files will be put in the webapp directory) annotationmanager.graphdb.path = /usr/local/neo4j/dbs/AnnotationManager # LDAP server URL for getting full names for IDs (otherwise no full names) annotationmanager.ldapserver.url = ldap://ldap.mpiwg-berlin.mpg.de/dc=mpiwg-berlin,dc=mpg,dc=de # user name and password for the admin frontend for Persons and Groups annotationmanager.admin.user = superuser annotationmanager.admin.password = superpassword # use authorization with token server (default false) annotationmanager.authorization = true # prefixes for entity uris in the store annotationmanager.uris.tags = http://entities.mpiwg-berlin.mpg.de/tags/ annotationmanager.uris.persons = http://entities.mpiwg-berlin.mpg.de/persons/ annotationmanager.uris.groups = http://entities.mpiwg-berlin.mpg.de/groups/ annotationmanager.uris.annotations = http://entities.mpiwg-berlin.mpg.de/annotations/
The server also has a list of API consumer keys that are used to authenticate Tokens from the token servers. On the annotation server the keys and secrets are in the file consumerkeys.property
in the WEB-INF
folder in the webapp directory.
The file is in Java property file syntax and might look like this:
# format: consumerKey = consumerSecret # consumerKey.label = Label test1 = abcdef test1.label = TEST
The same consumer key and consumer secret has to be provided to the token server.