source: AnnotationManagerN4J/src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorRestlet.java @ 28:f4ed2ed33e5b

Last change on this file since 28:f4ed2ed33e5b was 28:f4ed2ed33e5b, checked in by dwinter, 12 years ago

Restinterface zur Anzeige von Tags hinzugefuegt-

File size: 1.6 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        router.attach("/tags", AnnotatorTags.class);
45        router.attach("/tags/{id}", AnnotatorTags.class);
46        router.attach("/tags/{id}", AnnotatorTags.class);
47        router.attach("/tags/{id}/annotations", AnnotatorAnnotationsByTags.class);
48        router.attach("/", AnnotatorInfo.class);
49        // authenticator.setNext(router);
50        // return authenticator;
51
52        return router;
53    }
54
55    /* (non-Javadoc)
56     * @see de.mpiwg.itgroup.annotations.restlet.RestletImpl#getVersion()
57     */
58    @Override
59    public String getVersion() {
60        return version;
61    }
62
63}
Note: See TracBrowser for help on using the repository browser.