/** * */ 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 * . * #L% */ import org.restlet.Restlet; import org.restlet.routing.Router; /** * @author casties * */ public class AnnotatorRestlet extends BaseRestlet { public final String version = "AnnotationManagerN4J/Annotator 0.5.0"; /* * (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; } }