Mercurial > hg > AnnotationManagerN4J
annotate src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorRestlet.java @ 72:4c2cea836bc0
restlet 2.1 works now. (it's the start() method, stupid!)
author | casties |
---|---|
date | Tue, 11 Mar 2014 17:43:00 +0100 |
parents | 2b1e6df5e21a |
children | 25eb2e1df106 |
rev | line source |
---|---|
18 | 1 /** |
2 * | |
3 */ | |
4 package de.mpiwg.itgroup.annotations.restlet; | |
5 | |
70 | 6 /* |
7 * #%L | |
8 * AnnotationManager | |
9 * %% | |
10 * Copyright (C) 2012 - 2014 MPIWG Berlin | |
11 * %% | |
12 * This program is free software: you can redistribute it and/or modify | |
13 * it under the terms of the GNU Lesser General Public License as | |
14 * published by the Free Software Foundation, either version 3 of the | |
15 * License, or (at your option) any later version. | |
16 * | |
17 * This program is distributed in the hope that it will be useful, | |
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 * GNU General Lesser Public License for more details. | |
21 * | |
22 * You should have received a copy of the GNU General Lesser Public | |
23 * License along with this program. If not, see | |
24 * <http://www.gnu.org/licenses/lgpl-3.0.html>. | |
25 * #L% | |
26 */ | |
27 | |
18 | 28 import org.apache.log4j.Logger; |
29 import org.restlet.Restlet; | |
30 import org.restlet.routing.Router; | |
31 | |
32 /** | |
33 * @author casties | |
34 * | |
35 */ | |
36 public class AnnotatorRestlet extends BaseRestlet { | |
37 | |
68
39bc52f9b102
(hopefully) fixed issues with neo4j 2.0 transactions.
casties
parents:
63
diff
changeset
|
38 public final String version = "AnnotationManagerN4J/Annotator 0.3.2"; |
18 | 39 |
40 public static Logger logger = Logger.getLogger(AnnotatorRestlet.class); | |
41 | |
42 /* | |
43 * (non-Javadoc) | |
44 * | |
45 * @see org.restlet.Application#createInboundRoot() | |
46 */ | |
47 @Override | |
48 public Restlet createInboundRoot() { | |
49 // this.authenticator = createAuthenticator(); | |
50 | |
51 Router router = new Router(getContext()); | |
52 | |
53 router.attach("/annotations", AnnotatorAnnotations.class); | |
54 router.attach("/annotations/{id}", AnnotatorAnnotations.class); | |
55 router.attach("/search", AnnotatorSearch.class); | |
56 router.attach("/groups", AnnotatorGroups.class); | |
28 | 57 router.attach("/tags", AnnotatorTags.class); |
58 router.attach("/tags/{id}", AnnotatorTags.class); | |
59 router.attach("/tags/{id}/annotations", AnnotatorAnnotationsByTags.class); | |
44 | 60 router.attach("/resources", AnnotatorResources.class); |
61 router.attach("/resources/{id}", AnnotatorResources.class); | |
62 router.attach("/resources/{id}/annotations", AnnotatorAnnotationsByResources.class); | |
18 | 63 router.attach("/", AnnotatorInfo.class); |
64 // authenticator.setNext(router); | |
65 // return authenticator; | |
66 | |
67 return router; | |
68 } | |
69 | |
70 /* (non-Javadoc) | |
71 * @see de.mpiwg.itgroup.annotations.restlet.RestletImpl#getVersion() | |
72 */ | |
73 @Override | |
74 public String getVersion() { | |
75 return version; | |
76 } | |
77 | |
78 } |