source: AnnotationManagerN4J/src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotationStoreRestlet.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.2 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 AnnotationStoreRestlet extends BaseRestlet {
16
17    public final String version = "AnnotationManagerN4J/AnnotationStore 0.1";
18
19    public static Logger logger = Logger.getLogger(AnnotationStoreRestlet.class);
20
21    public AnnotationStoreRestlet(Context context) {
22        super(context);
23        logger.debug("StoreRestlet!");
24    }
25
26    /*
27     * (non-Javadoc)
28     *
29     * @see org.restlet.Application#createInboundRoot()
30     */
31    @Override
32    public Restlet createInboundRoot() {
33        // this.authenticator = createAuthenticator();
34
35        Router router = new Router(getContext());
36
37        router.attach("/groups", AnnotationStoreGroups.class);
38        router.attach("/groups/{id}", AnnotationStoreGroups.class);
39
40        router.attach("/", AnnotationStoreInfo.class);
41        // authenticator.setNext(router);
42        // return authenticator;
43
44        return router;
45    }
46
47   
48    @Override
49    public String getVersion() {
50        return version;
51    }
52
53}
Note: See TracBrowser for help on using the repository browser.