= AnnotationManagerN4J = AnnotationManagerN4J is an annotation server compatible with the [[http://annotatorjs.org/|Annotator.js]] client implementing the [[http://docs.annotatorjs.org/en/latest/annotation-format.html|Annotator storage API]] (with some extensions). It is written in Java using the [[http://www.restlet.org/|Restlet]] framework and the [[http://neo4j.org/|Neo4J]] graph database. It is built using [[http://maven.apache.org/|Maven]]. == Source == The source code can be browsed [[source:AnnotationManagerN4J|here]] or in the [[http://mercurial.selenic.com/|Mercurial]] repository at https://it-dev.mpiwg-berlin.mpg.de/hg/AnnotationManagerN4J/ == Building == To check out and build AnnotationManagerN4J you need [[http://mercurial.selenic.com/|Mercurial]] and [[http://maven.apache.org/|Maven]]: 1. `hg clone https://it-dev.mpiwg-berlin.mpg.de/hg/AnnotationManagerN4J` 2. `cd AnnotationManagerN4J` 3. `mvn package` (this produces the webapp as a directory `target/AnnotationManager` or war file `target/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.