Index: src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java	(revision 48)
+++ src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java	(revision 59)
@@ -56,5 +56,5 @@
     }
 
-    public static String ANNOTATION_URI_BASE = "http://entities.mpiwg-berlin.mpg.de/annotations/";
+    public static String ANNOTATION_URI_PREFIX = "";
 
     public AnnotationStore(GraphDatabaseService graphDb) {
@@ -80,7 +80,5 @@
      */
     public Node getPersonNodeByUri(String userUri) {
-        if (userUri == null) return null;
-        Node person = getNodeIndex(NodeTypes.PERSON).get("uri", userUri).getSingle();
-        return person;
+        return getNodeFromIndex("uri", userUri, NodeTypes.PERSON);
     }
 
@@ -90,7 +88,5 @@
      */
     public Node getTagNodeByUri(String tagUri) {
-        if (tagUri == null) return null;
-        Node person = getNodeIndex(NodeTypes.TAG).get("uri", tagUri).getSingle();
-        return person;
+        return getNodeFromIndex("uri", tagUri, NodeTypes.TAG);
     }
 
@@ -112,6 +108,5 @@
 
     /**
-     * Returns the Node with the given key and value.
-     * Key has to be indexed.
+     * Returns the Node with the given key and value. Key has to be indexed.
      * 
      * @param key
@@ -122,11 +117,11 @@
     public Node getNodeFromIndex(String key, String value, NodeTypes type) {
         if (key == null || value == null) return null;
-        Node person = getNodeIndex(type).get(key, value).getSingle();
-        return person;
-    }
-
-    /**
-     * Returns list of Actors of given type (Group or Person).
-     * Key has to be indexed.
+        Node node = getNodeIndex(type).get(key, value).getSingle();
+        return node;
+    }
+
+    /**
+     * Returns list of Actors of given type (Group or Person). Key has to be
+     * indexed.
      * 
      * @param key
@@ -150,7 +145,8 @@
         return actors;
     }
-    
+
     /**
      * Returns list of groups. Key has to be indexed.
+     * 
      * @param key
      * @param query
@@ -161,7 +157,8 @@
         return groups;
     }
-    
+
     /**
      * Returns list of Persons. Key has to be indexed.
+     * 
      * @param key
      * @param query
@@ -172,8 +169,8 @@
         return persons;
     }
-    
-    /**
-     * Returns list of uri-like objects of given type (Target or Resource).
-     * Key has to be indexed.
+
+    /**
+     * Returns list of uri-like objects of given type (Target or Resource). Key
+     * has to be indexed.
      * 
      * @param key
@@ -198,7 +195,7 @@
     }
 
-    
     /**
      * Returns list of Targets. Key has to be indexed.
+     * 
      * @param key
      * @param query
@@ -209,7 +206,8 @@
         return targets;
     }
-    
+
     /**
      * Returns list of Resources. Key has to be indexed.
+     * 
      * @param key
      * @param query
@@ -220,8 +218,7 @@
         return targets;
     }
-    
-    /**
-     * Returns List of Annotations.
-     * Key has to be indexed.
+
+    /**
+     * Returns List of Annotations. Key has to be indexed.
      * 
      * @param key
@@ -244,9 +241,6 @@
     }
 
- 
-    
-    /**
-     * Returns List of Tags.
-     * Key has to be indexed.
+    /**
+     * Returns List of Tags. Key has to be indexed.
      * 
      * @param key
@@ -596,5 +590,5 @@
         return (Resource) createUriFromNode(resourceNode);
     }
-    
+
     /**
      * @param targetNode
@@ -604,6 +598,5 @@
         return (Target) createUriFromNode(targetNode);
     }
-    
-    
+
     protected Uri createUriFromNode(Node uriNode) {
         if (uriNode == null) return null;
@@ -1083,24 +1076,18 @@
      */
     private String createRessourceURI(String prefix) {
-
         Calendar cal = Calendar.getInstance();
-
         long time = cal.getTimeInMillis();
-
-        return String.format("%s%s%s", ANNOTATION_URI_BASE, prefix, time);
-
+        return String.format("%s%s%s", ANNOTATION_URI_PREFIX, prefix, time);
     }
 
     public List<Annotation> getAnnotationsByTag(String tagUri) {
-
         ArrayList<Annotation> ret = new ArrayList<Annotation>();
         Node tag = getTagNodeByUri(tagUri);
-
-        Iterable<Relationship> rels = tag.getRelationships(Direction.INCOMING, RelationTypes.HAS_TAG);
-
-        for (Relationship rel : rels) {
-            Node node = rel.getStartNode();
-            ret.add(createAnnotationFromNode(node));
-
+        if (tag != null) {
+            Iterable<Relationship> rels = tag.getRelationships(Direction.INCOMING, RelationTypes.HAS_TAG);
+            for (Relationship rel : rels) {
+                Node node = rel.getStartNode();
+                ret.add(createAnnotationFromNode(node));
+            }
         }
         return ret;
@@ -1109,13 +1096,15 @@
     public List<Annotation> getAnnotationsByResource(String resourceUri) {
         ArrayList<Annotation> ret = new ArrayList<Annotation>();
-        Node tag = getNodeFromIndex("uri", resourceUri, NodeTypes.RESOURCE);
-        Iterable<Relationship> rels = tag.getRelationships(Direction.INCOMING, RelationTypes.ANNOTATES);
-        for (Relationship rel : rels) {
-            Node an = rel.getStartNode();
-            Node rn = rel.getEndNode();
-            if (rn.getProperty("TYPE", "").equals("RESOURCE")) {
-                logger.error("getAnnotationsByResource got ANNOTATES != RESOURCE");
-            }
-            ret.add(createAnnotationFromNode(an));
+        Node res = getNodeFromIndex("uri", resourceUri, NodeTypes.RESOURCE);
+        if (res != null) {
+            Iterable<Relationship> rels = res.getRelationships(Direction.INCOMING, RelationTypes.ANNOTATES);
+            for (Relationship rel : rels) {
+                Node an = rel.getStartNode();
+                Node rn = rel.getEndNode();
+                if (rn.getProperty("TYPE", "").equals("RESOURCE")) {
+                    logger.error("getAnnotationsByResource got ANNOTATES != RESOURCE");
+                }
+                ret.add(createAnnotationFromNode(an));
+            }
         }
         return ret;
Index: src/main/java/de/mpiwg/itgroup/annotations/restlet/BaseRestlet.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/BaseRestlet.java	(revision 58)
+++ src/main/java/de/mpiwg/itgroup/annotations/restlet/BaseRestlet.java	(revision 59)
@@ -99,4 +99,6 @@
     public static String GROUPS_URI_PREFIX = ""; 
     public static final String GROUPS_URI_KEY = "annotationmanager.uris.groups";
+
+    public static final String ANNOTATIONS_URI_KEY = "annotationmanager.uris.annotations";
 
     /**
@@ -218,4 +220,8 @@
                 BaseRestlet.TAGS_URI_PREFIX = tup;
             }
+            String aup = (String) sc.getAttribute(ANNOTATIONS_URI_KEY);
+            if (aup != null) {
+                AnnotationStore.ANNOTATION_URI_PREFIX = aup;
+            }
         } else {
             logger.error("Unable to get ServletContext!");
Index: src/main/webapp/WEB-INF/serverconfig.property.template
===================================================================
--- src/main/webapp/WEB-INF/serverconfig.property.template	(revision 58)
+++ src/main/webapp/WEB-INF/serverconfig.property.template	(revision 59)
@@ -9,2 +9,3 @@
 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/
