Mercurial > hg > AnnotationManagerN4J
view src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorRestlet.java @ 75:25eb2e1df106
change logging to java.util.logging.
author | casties |
---|---|
date | Fri, 21 Mar 2014 13:32:41 +0100 |
parents | 4c2cea836bc0 |
children | 4466194a4eae |
line wrap: on
line source
/** * */ package de.mpiwg.itgroup.annotations.restlet; /* * #%L * AnnotationManager * %% * Copyright (C) 2012 - 2014 MPIWG Berlin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. * * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. * #L% */ import org.restlet.Restlet; import org.restlet.routing.Router; /** * @author casties * */ public class AnnotatorRestlet extends BaseRestlet { public final String version = "AnnotationManagerN4J/Annotator 0.3.2"; /* * (non-Javadoc) * * @see org.restlet.Application#createInboundRoot() */ @Override public Restlet createInboundRoot() { // this.authenticator = createAuthenticator(); Router router = new Router(getContext()); router.attach("/annotations", AnnotatorAnnotations.class); router.attach("/annotations/{id}", AnnotatorAnnotations.class); router.attach("/search", AnnotatorSearch.class); router.attach("/groups", AnnotatorGroups.class); router.attach("/tags", AnnotatorTags.class); router.attach("/tags/{id}", AnnotatorTags.class); router.attach("/tags/{id}/annotations", AnnotatorAnnotationsByTags.class); router.attach("/resources", AnnotatorResources.class); router.attach("/resources/{id}", AnnotatorResources.class); router.attach("/resources/{id}/annotations", AnnotatorAnnotationsByResources.class); router.attach("/", AnnotatorInfo.class); // authenticator.setNext(router); // return authenticator; return router; } /* (non-Javadoc) * @see de.mpiwg.itgroup.annotations.restlet.RestletImpl#getVersion() */ @Override public String getVersion() { return version; } }