Index: rc/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotationStoreGroups.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotationStoreGroups.java	(revision 22)
+++ 	(revision )
@@ -1,134 +1,0 @@
-/**
- * 
- */
-package de.mpiwg.itgroup.annotations.restlet;
-
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.restlet.data.Form;
-import org.restlet.data.MediaType;
-import org.restlet.data.Reference;
-import org.restlet.data.Status;
-import org.restlet.representation.Representation;
-import org.restlet.representation.StringRepresentation;
-import org.restlet.resource.Get;
-import org.restlet.resource.Post;
-import org.restlet.resource.ServerResource;
-
-import de.mpiwg.itgroup.annotations.Actor;
-import de.mpiwg.itgroup.annotations.Group;
-import de.mpiwg.itgroup.annotations.Person;
-import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore;
-
-/**
- * @author casties
- * 
- */
-public class AnnotationStoreGroups extends ServerResource {
-
-    public static Logger logger = Logger.getLogger(AnnotationStoreGroups.class);
-
-    private AnnotationStore store;
-
-    /**
-     * GET with HTML content type. Lists all groups.
-     * 
-     * @param entity
-     * @return
-     */
-    @Get("html")
-    public Representation doGetHTML(Representation entity) {
-        // id from URI /annotations/groups/{id}
-        String id = (String) getRequest().getAttributes().get("id");
-        logger.debug("group-id=" + id);
-        String result = null;
-        store = getAnnotationStore();
-        if (id == null) {
-            // list all groups
-            result = "<html><body>\n<h1>Groups</h1>\n<table>";
-            result += "<tr><th>id</th><th>name</th><th>uri</th></tr>";
-            List<Group> groups = store.getGroups("uri", "*");
-            for (Group group : groups) {
-                Reference groupUrl = this.getReference();
-                groupUrl.addSegment(group.getId());
-                result += String.format("<tr><td><a href=\"%s\">%s</a></td><td>%s</td><td>%s</td></tr>\n", groupUrl,
-                        group.getId(), group.getName(), group.getUri());
-            }
-            result += "</table>\n</body>\n</html>";
-        } else {
-            // just one group
-            Reference groupsUrl = this.getReference().getParentRef();
-            result = "<html><body>\n<h1>Group</h1>\n";
-            result += String.format("<p><a href=\"%s\">All groups</a></p>", groupsUrl);
-            Group group = new Group(id);
-            group = (Group) store.getActor(group);
-            result += "<table>";
-            result += String.format("<tr><td><b>id</b></td><td>%s</td></tr>\n", group.getId());
-            result += String.format("<tr><td><b>name</b></td><td>%s</td></tr>\n", group.getName());
-            result += String.format("<tr><td><b>uri</b></td><td>%s</td></tr>\n", group.getUri());
-            result += "<tr><td><b>members</b></td><td>";
-            List<Person> members = store.getMembersOfGroup(group);
-            for (Person p : members) {
-                result += String.format("%s (%s)\n", p.getName(), p.getIdString());                
-            }
-            result += "</td></tr>\n";
-            result += "</table>\n</body>\n</html>";
-        }
-
-        logger.debug("sending:");
-        logger.debug(result);
-        return new StringRepresentation(result, MediaType.TEXT_HTML);
-    }
-
-    /**
-     * POST with HTML content-type. Creates a new Group.
-     * 
-     * @return
-     */
-    @Post
-    public Representation doPostHTML(Representation entity) {
-        logger.debug("AnnotationStoreGroups doPostHTML!");
-        // TODO: do authentication
-        Form form = new Form(entity);
-        String id = form.getFirstValue("id");
-        String name = form.getFirstValue("name");
-        if (id == null || id.isEmpty()) {
-            // invalid id
-            setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
-            return null;
-        }
-        String gid = makeGroupId(id);
-        Group newGroup = new Group(gid, null, name);
-        store = getAnnotationStore();
-        Actor storedGroup = store.storeActor(newGroup);
-        gid = storedGroup.getId();
-        // return 303: see other
-        setStatus(Status.REDIRECTION_SEE_OTHER);
-        // go GET URL for this group
-        Reference groupUrl = this.getReference();
-        groupUrl.addSegment(gid);
-        this.getResponse().setLocationRef(groupUrl);
-        return null;
-    }
-
-    /**
-     * Returns a group id based on the given id.
-     * 
-     * @param id
-     * @return
-     */
-    protected String makeGroupId(String id) {
-        // TODO: should we use different ids?
-        id = id.replaceAll("\\W", "_");
-        id = id.toLowerCase();
-        return id;
-    }
-
-    protected AnnotationStore getAnnotationStore() {
-        if (store == null) {
-            store = ((BaseRestlet) getApplication()).getAnnotationStore();
-        }
-        return store;
-    }
-}
Index: rc/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotationStoreInfo.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotationStoreInfo.java	(revision 18)
+++ 	(revision )
@@ -1,24 +1,0 @@
-package de.mpiwg.itgroup.annotations.restlet;
-
-import java.io.InputStream;
-
-import org.restlet.data.MediaType;
-import org.restlet.representation.InputRepresentation;
-import org.restlet.representation.Representation;
-import org.restlet.resource.Get;
-import org.restlet.resource.ServerResource;
-
-
-public class AnnotationStoreInfo extends ServerResource {
-
-	@Get("html")
-	public Representation getHTML(){
-		InputStream is = getClass().getResourceAsStream("/de/mpiwg/itgroup/annotations/annotationstore-info.html");
-		
-		Representation rep = new InputRepresentation(is,MediaType.TEXT_HTML);
-		return rep;
-		
-	}
-	
-}
-
Index: rc/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotationStoreRestlet.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotationStoreRestlet.java	(revision 22)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/**
- * 
- */
-package de.mpiwg.itgroup.annotations.restlet;
-
-import org.apache.log4j.Logger;
-import org.restlet.Context;
-import org.restlet.Restlet;
-import org.restlet.routing.Router;
-
-/**
- * @author casties
- * 
- */
-public class AnnotationStoreRestlet extends BaseRestlet {
-
-    public final String version = "AnnotationManagerN4J/AnnotationStore 0.1";
-
-    public static Logger logger = Logger.getLogger(AnnotationStoreRestlet.class);
-
-    public AnnotationStoreRestlet(Context context) {
-        super(context);
-        logger.debug("StoreRestlet!");
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.restlet.Application#createInboundRoot()
-     */
-    @Override
-    public Restlet createInboundRoot() {
-        // this.authenticator = createAuthenticator();
-
-        Router router = new Router(getContext());
-
-        router.attach("/groups", AnnotationStoreGroups.class);
-        router.attach("/groups/", AnnotationStoreGroups.class);
-        router.attach("/groups/{id}", AnnotationStoreGroups.class);
-
-        router.attach("/", AnnotationStoreInfo.class);
-        // authenticator.setNext(router);
-        // return authenticator;
-
-        return router;
-    }
-
-    
-    @Override
-    public String getVersion() {
-        return version;
-    }
-
-}
Index: src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsUiRestlet.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsUiRestlet.java	(revision 23)
+++ src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsUiRestlet.java	(revision 23)
@@ -0,0 +1,58 @@
+/**
+ * 
+ */
+package de.mpiwg.itgroup.annotations.restlet.annotations_ui;
+
+import org.apache.log4j.Logger;
+import org.restlet.Context;
+import org.restlet.Restlet;
+import org.restlet.routing.Router;
+
+import de.mpiwg.itgroup.annotations.restlet.BaseRestlet;
+
+/**
+ * @author casties
+ * 
+ */
+public class AnnotationsUiRestlet extends BaseRestlet {
+
+    public final String version = "AnnotationManagerN4J/AnnotationStore 0.1";
+
+    public static Logger logger = Logger.getLogger(AnnotationsUiRestlet.class);
+
+    public AnnotationsUiRestlet(Context context) {
+        super(context);
+        logger.debug("StoreRestlet!");
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.restlet.Application#createInboundRoot()
+     */
+    @Override
+    public Restlet createInboundRoot() {
+        // this.authenticator = createAuthenticator();
+
+        Router router = new Router(getContext());
+
+        router.attach("/groups", GroupsResource.class);
+        router.attach("/groups/", GroupsResource.class);
+        router.attach("/groups/{id}", GroupResource.class);
+        router.attach("/groups/{id}/", GroupResource.class);
+        router.attach("/groups/{id}/members", GroupMembersResource.class);
+
+        router.attach("/", InfoResource.class);
+        // authenticator.setNext(router);
+        // return authenticator;
+
+        return router;
+    }
+
+    
+    @Override
+    public String getVersion() {
+        return version;
+    }
+
+}
Index: src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/GroupMembersResource.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/GroupMembersResource.java	(revision 23)
+++ src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/GroupMembersResource.java	(revision 23)
@@ -0,0 +1,115 @@
+/**
+ * 
+ */
+package de.mpiwg.itgroup.annotations.restlet.annotations_ui;
+
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.restlet.data.Form;
+import org.restlet.data.MediaType;
+import org.restlet.data.Reference;
+import org.restlet.data.Status;
+import org.restlet.representation.Representation;
+import org.restlet.representation.StringRepresentation;
+import org.restlet.resource.Get;
+import org.restlet.resource.Post;
+import org.restlet.resource.ServerResource;
+
+import de.mpiwg.itgroup.annotations.Actor;
+import de.mpiwg.itgroup.annotations.Group;
+import de.mpiwg.itgroup.annotations.Person;
+import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore;
+import de.mpiwg.itgroup.annotations.restlet.BaseRestlet;
+
+/**
+ * Resource class for the members of an annotation group.
+ * 
+ * @author casties
+ * 
+ */
+public class GroupMembersResource extends ServerResource {
+
+    public static Logger logger = Logger.getLogger(GroupMembersResource.class);
+
+    private AnnotationStore store;
+
+    /**
+     * GET with HTML content type. Shows the members of the group.
+     * 
+     * @param entity
+     * @return
+     */
+    @Get("html")
+    public Representation doGetHTML(Representation entity) {
+        // id from URI /annotations/groups/{id}/members
+        String id = (String) getRequest().getAttributes().get("id");
+        logger.debug("group-id=" + id);
+        if (id == null || id.isEmpty()) {
+            // invalid id
+            setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
+            return null;
+        }
+        String result = null;
+        store = getAnnotationStore();
+        Reference groupsUrl = this.getReference().getParentRef();
+        result = "<html><body>\n<h1>Members of group</h1>\n";
+        Group group = new Group(id);
+        group = (Group) store.getActor(group);
+        result += String.format("<p>Group: %s <a href=\"%s\">(%s)</a></p>\n", group.getName(), groupsUrl, group.getId());
+        result += "<p>Members:</p>\n";
+        result += "<table>";
+        List<Person> members = store.getMembersOfGroup(group);
+        for (Person p : members) {
+            result += String.format("<tr><td>%s</td><td>(%s)</td></tr>\n", p.getName(), p.getIdString());
+        }
+        result += "</table>\n";
+        result += "<form method=\"post\" action=\"\">\n";
+        result += "<p>Add new member: <select name=\"new_member\">\n";
+        result += String.format("<option value=\"%s\">%s</option>\n", "casties", "casties");
+        result += "</select>\n";
+        result += "<input type=\"submit\"/>\n";
+        result += "</form>\n";
+        result += "</body>\n</html>";
+
+        return new StringRepresentation(result, MediaType.TEXT_HTML);
+    }
+
+    /**
+     * POST creates a new Group.
+     * 
+     * @return
+     */
+    @Post
+    public Representation doPost(Representation entity) {
+        logger.debug("AnnotationsUiGroup doPost!");
+        // TODO: do authentication
+        Form form = new Form(entity);
+        String id = form.getFirstValue("id");
+        String name = form.getFirstValue("name");
+        if (id == null || id.isEmpty()) {
+            // invalid id
+            setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
+            return null;
+        }
+        String gid = null;
+        Group newGroup = new Group(gid, null, name);
+        store = getAnnotationStore();
+        Actor storedGroup = store.storeActor(newGroup);
+        gid = storedGroup.getId();
+        // return 303: see other
+        setStatus(Status.REDIRECTION_SEE_OTHER);
+        // go GET URL for this group
+        Reference groupUrl = this.getReference();
+        groupUrl.addSegment(gid);
+        this.getResponse().setLocationRef(groupUrl);
+        return null;
+    }
+
+    protected AnnotationStore getAnnotationStore() {
+        if (store == null) {
+            store = ((BaseRestlet) getApplication()).getAnnotationStore();
+        }
+        return store;
+    }
+}
Index: src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/GroupResource.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/GroupResource.java	(revision 23)
+++ src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/GroupResource.java	(revision 23)
@@ -0,0 +1,107 @@
+/**
+ * 
+ */
+package de.mpiwg.itgroup.annotations.restlet.annotations_ui;
+
+import org.apache.log4j.Logger;
+import org.restlet.data.Form;
+import org.restlet.data.MediaType;
+import org.restlet.data.Reference;
+import org.restlet.data.Status;
+import org.restlet.representation.Representation;
+import org.restlet.representation.StringRepresentation;
+import org.restlet.resource.Get;
+import org.restlet.resource.Post;
+import org.restlet.resource.ServerResource;
+
+import de.mpiwg.itgroup.annotations.Actor;
+import de.mpiwg.itgroup.annotations.Group;
+import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore;
+import de.mpiwg.itgroup.annotations.restlet.BaseRestlet;
+
+/**
+ * Resource class for a single group.
+ * 
+ * @author casties
+ * 
+ */
+public class GroupResource extends ServerResource {
+
+    public static Logger logger = Logger.getLogger(GroupResource.class);
+
+    private AnnotationStore store;
+
+    /**
+     * GET with HTML content type. Shows the group.
+     * 
+     * @param entity
+     * @return
+     */
+    @Get("html")
+    public Representation doGetHTML(Representation entity) {
+        // id from URI /annotations/groups/{id}
+        String id = (String) getRequest().getAttributes().get("id");
+        logger.debug("group-id=" + id);
+        if (id == null || id.isEmpty()) {
+            // invalid id
+            setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
+            return null;
+        }
+        String result = null;
+        store = getAnnotationStore();
+        Reference groupsUrl = this.getReference().getParentRef();
+        result = "<html><body>\n<h1>Group</h1>\n";
+        result += String.format("<p><a href=\"%s\">All groups</a></p>", groupsUrl);
+        Group group = new Group(id);
+        group = (Group) store.getActor(group);
+        result += "<table>";
+        result += String.format("<tr><td><b>id</b></td><td>%s</td></tr>\n", group.getId());
+        result += String.format("<tr><td><b>name</b></td><td>%s</td></tr>\n", group.getName());
+        result += String.format("<tr><td><b>uri</b></td><td>%s</td></tr>\n", group.getUri());
+        result += String.format("<tr><td><b>members</b></td><td><a href=\"%s\">view members</a></td></tr>\n", this.getReference()
+                .addSegment("members"));
+        result += "</table>\n</body>\n</html>";
+
+        logger.debug("sending:");
+        logger.debug(result);
+        return new StringRepresentation(result, MediaType.TEXT_HTML);
+    }
+
+    /**
+     * POST creates a new Group.
+     * 
+     * @return
+     */
+    @Post
+    public Representation doPost(Representation entity) {
+        logger.debug("AnnotationsUiGroup doPost!");
+        // TODO: do authentication
+        Form form = new Form(entity);
+        String id = form.getFirstValue("id");
+        String name = form.getFirstValue("name");
+        if (id == null || id.isEmpty()) {
+            // invalid id
+            setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
+            return null;
+        }
+        String gid = null;
+        Group newGroup = new Group(gid, null, name);
+        store = getAnnotationStore();
+        Actor storedGroup = store.storeActor(newGroup);
+        gid = storedGroup.getId();
+        // return 303: see other
+        setStatus(Status.REDIRECTION_SEE_OTHER);
+        // go GET URL for this group
+        Reference groupUrl = this.getReference();
+        groupUrl.addSegment(gid);
+        this.getResponse().setLocationRef(groupUrl);
+        return null;
+    }
+
+    protected AnnotationStore getAnnotationStore() {
+        if (store == null) {
+            store = ((BaseRestlet) getApplication()).getAnnotationStore();
+        }
+        return store;
+    }
+}
Index: src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/GroupsResource.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/GroupsResource.java	(revision 23)
+++ src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/GroupsResource.java	(revision 23)
@@ -0,0 +1,112 @@
+/**
+ * 
+ */
+package de.mpiwg.itgroup.annotations.restlet.annotations_ui;
+
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.restlet.data.Form;
+import org.restlet.data.MediaType;
+import org.restlet.data.Reference;
+import org.restlet.data.Status;
+import org.restlet.representation.Representation;
+import org.restlet.representation.StringRepresentation;
+import org.restlet.resource.Get;
+import org.restlet.resource.Post;
+import org.restlet.resource.ServerResource;
+
+import de.mpiwg.itgroup.annotations.Actor;
+import de.mpiwg.itgroup.annotations.Group;
+import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore;
+import de.mpiwg.itgroup.annotations.restlet.BaseRestlet;
+
+/**
+ * Resource class for the list of annotation groups.
+ * 
+ * @author casties
+ * 
+ */
+public class GroupsResource extends ServerResource {
+
+    public static Logger logger = Logger.getLogger(GroupsResource.class);
+
+    private AnnotationStore store;
+
+    /**
+     * GET with HTML content type. Lists all groups.
+     * 
+     * @param entity
+     * @return
+     */
+    @Get("html")
+    public Representation doGetHTML(Representation entity) {
+        String result = null;
+        store = getAnnotationStore();
+        // list all groups
+        result = "<html><body>\n<h1>Groups</h1>\n<table>";
+        result += "<tr><th>id</th><th>name</th><th>uri</th></tr>";
+        List<Group> groups = store.getGroups("uri", "*");
+        for (Group group : groups) {
+            Reference groupUrl = this.getReference();
+            groupUrl.addSegment(group.getId());
+            result += String.format("<tr><td><a href=\"%s\">%s</a></td><td>%s</td><td>%s</td></tr>\n", groupUrl, group.getId(),
+                    group.getName(), group.getUri());
+        }
+        result += "</table>\n</body>\n</html>";
+        logger.debug("sending:");
+        logger.debug(result);
+        return new StringRepresentation(result, MediaType.TEXT_HTML);
+    }
+
+    /**
+     * POST creates a new Group.
+     * 
+     * @return
+     */
+    @Post
+    public Representation doPost(Representation entity) {
+        logger.debug("AnnotationsUiGroups doPost!");
+        // TODO: do authentication
+        Form form = new Form(entity);
+        String id = form.getFirstValue("id");
+        String name = form.getFirstValue("name");
+        if (id == null || id.isEmpty()) {
+            // invalid id
+            setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
+            return null;
+        }
+        String gid = makeGroupId(id);
+        Group newGroup = new Group(gid, null, name);
+        store = getAnnotationStore();
+        Actor storedGroup = store.storeActor(newGroup);
+        gid = storedGroup.getId();
+        // return 303: see other
+        setStatus(Status.REDIRECTION_SEE_OTHER);
+        // go GET URL for this group
+        Reference groupUrl = this.getReference();
+        groupUrl.addSegment(gid);
+        this.getResponse().setLocationRef(groupUrl);
+        return null;
+    }
+
+    /**
+     * Returns a group id based on the given id.
+     * 
+     * @param id
+     * @return
+     */
+    protected String makeGroupId(String id) {
+        // TODO: should we use different ids?
+        id = id.replaceAll("\\W", "_");
+        id = id.toLowerCase();
+        return id;
+    }
+
+    protected AnnotationStore getAnnotationStore() {
+        if (store == null) {
+            store = ((BaseRestlet) getApplication()).getAnnotationStore();
+        }
+        return store;
+    }
+}
Index: src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/InfoResource.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/InfoResource.java	(revision 23)
+++ src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/InfoResource.java	(revision 23)
@@ -0,0 +1,24 @@
+package de.mpiwg.itgroup.annotations.restlet.annotations_ui;
+
+import java.io.InputStream;
+
+import org.restlet.data.MediaType;
+import org.restlet.representation.InputRepresentation;
+import org.restlet.representation.Representation;
+import org.restlet.resource.Get;
+import org.restlet.resource.ServerResource;
+
+
+public class InfoResource extends ServerResource {
+
+	@Get("html")
+	public Representation getHTML(){
+		InputStream is = getClass().getResourceAsStream("/de/mpiwg/itgroup/annotations/annotationstore-info.html");
+		
+		Representation rep = new InputRepresentation(is,MediaType.TEXT_HTML);
+		return rep;
+		
+	}
+	
+}
+
Index: src/main/webapp/WEB-INF/web.xml
===================================================================
--- src/main/webapp/WEB-INF/web.xml	(revision 18)
+++ src/main/webapp/WEB-INF/web.xml	(revision 23)
@@ -25,5 +25,5 @@
 		<init-param>
 			<param-name>org.restlet.application</param-name>
-			<param-value>de.mpiwg.itgroup.annotations.restlet.AnnotationStoreRestlet</param-value>
+			<param-value>de.mpiwg.itgroup.annotations.restlet.annotations_ui.AnnotationsUiRestlet</param-value>
 		</init-param>
         <!-- Load this servlet at server startup time -->
