annotate src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsUiRestlet.java @ 31:9f653697437e

annotationbrowser
author dwinter
date Tue, 25 Sep 2012 21:47:58 +0200
parents d22d01ba953a
children 8427930c5f88
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
1 /**
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
2 *
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
3 */
23
d22d01ba953a reorganised code for annotations and groups ui. work in progress.
casties
parents: 22
diff changeset
4 package de.mpiwg.itgroup.annotations.restlet.annotations_ui;
18
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
5
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
6 import org.apache.log4j.Logger;
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
7 import org.restlet.Context;
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
8 import org.restlet.Restlet;
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
9 import org.restlet.routing.Router;
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
10
23
d22d01ba953a reorganised code for annotations and groups ui. work in progress.
casties
parents: 22
diff changeset
11 import de.mpiwg.itgroup.annotations.restlet.BaseRestlet;
d22d01ba953a reorganised code for annotations and groups ui. work in progress.
casties
parents: 22
diff changeset
12
18
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
13 /**
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
14 * @author casties
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
15 *
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
16 */
23
d22d01ba953a reorganised code for annotations and groups ui. work in progress.
casties
parents: 22
diff changeset
17 public class AnnotationsUiRestlet extends BaseRestlet {
18
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
18
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
19 public final String version = "AnnotationManagerN4J/AnnotationStore 0.1";
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
20
23
d22d01ba953a reorganised code for annotations and groups ui. work in progress.
casties
parents: 22
diff changeset
21 public static Logger logger = Logger.getLogger(AnnotationsUiRestlet.class);
18
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
22
23
d22d01ba953a reorganised code for annotations and groups ui. work in progress.
casties
parents: 22
diff changeset
23 public AnnotationsUiRestlet(Context context) {
18
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
24 super(context);
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
25 logger.debug("StoreRestlet!");
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
26 }
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
27
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
28 /*
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
29 * (non-Javadoc)
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
30 *
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
31 * @see org.restlet.Application#createInboundRoot()
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
32 */
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
33 @Override
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
34 public Restlet createInboundRoot() {
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
35 // this.authenticator = createAuthenticator();
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
36
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
37 Router router = new Router(getContext());
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
38
23
d22d01ba953a reorganised code for annotations and groups ui. work in progress.
casties
parents: 22
diff changeset
39 router.attach("/groups", GroupsResource.class);
d22d01ba953a reorganised code for annotations and groups ui. work in progress.
casties
parents: 22
diff changeset
40 router.attach("/groups/", GroupsResource.class);
d22d01ba953a reorganised code for annotations and groups ui. work in progress.
casties
parents: 22
diff changeset
41 router.attach("/groups/{id}", GroupResource.class);
d22d01ba953a reorganised code for annotations and groups ui. work in progress.
casties
parents: 22
diff changeset
42 router.attach("/groups/{id}/", GroupResource.class);
d22d01ba953a reorganised code for annotations and groups ui. work in progress.
casties
parents: 22
diff changeset
43 router.attach("/groups/{id}/members", GroupMembersResource.class);
31
9f653697437e annotationbrowser
dwinter
parents: 23
diff changeset
44
23
d22d01ba953a reorganised code for annotations and groups ui. work in progress.
casties
parents: 22
diff changeset
45 router.attach("/", InfoResource.class);
18
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
46 // authenticator.setNext(router);
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
47 // return authenticator;
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
48
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
49 return router;
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
50 }
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
51
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
52
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
53 @Override
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
54 public String getVersion() {
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
55 return version;
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
56 }
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
57
aafa3884b2c4 new AnnotationStore restlet for HTML-UI.
casties
parents:
diff changeset
58 }