source: AnnotationManagerN4J/src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorRestlet.java @ 18:aafa3884b2c4

Last change on this file since 18:aafa3884b2c4 was 18:aafa3884b2c4, checked in by casties, 12 years ago

new AnnotationStore? restlet for HTML-UI.
reorganisation of classes.

File size: 1.4 KB
Line 
1/**
2 *
3 */
4package de.mpiwg.itgroup.annotations.restlet;
5
6import org.apache.log4j.Logger;
7import org.restlet.Context;
8import org.restlet.Restlet;
9import org.restlet.routing.Router;
10
11/**
12 * @author casties
13 *
14 */
15public class AnnotatorRestlet extends BaseRestlet {
16
17    public final String version = "AnnotationManagerN4J/Annotator 0.2.1";
18
19    public static Logger logger = Logger.getLogger(AnnotatorRestlet.class);
20
21    /**
22     * @param context
23     */
24    public AnnotatorRestlet(Context context) {
25        super(context);
26        logger.debug("AnnotatorRestlet!");
27    }
28
29    /*
30     * (non-Javadoc)
31     *
32     * @see org.restlet.Application#createInboundRoot()
33     */
34    @Override
35    public Restlet createInboundRoot() {
36        // this.authenticator = createAuthenticator();
37
38        Router router = new Router(getContext());
39
40        router.attach("/annotations", AnnotatorAnnotations.class);
41        router.attach("/annotations/{id}", AnnotatorAnnotations.class);
42        router.attach("/search", AnnotatorSearch.class);
43        router.attach("/groups", AnnotatorGroups.class);
44
45        router.attach("/", AnnotatorInfo.class);
46        // authenticator.setNext(router);
47        // return authenticator;
48
49        return router;
50    }
51
52    /* (non-Javadoc)
53     * @see de.mpiwg.itgroup.annotations.restlet.RestletImpl#getVersion()
54     */
55    @Override
56    public String getVersion() {
57        return version;
58    }
59
60}
Note: See TracBrowser for help on using the repository browser.