Mercurial > hg > AnnotationManagerN4J
diff src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorResourceImpl.java @ 18:aafa3884b2c4
new AnnotationStore restlet for HTML-UI.
reorganisation of classes.
author | casties |
---|---|
date | Wed, 05 Sep 2012 18:05:54 +0200 |
parents | 794077e6288c |
children | f0f55ab768c9 |
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorResourceImpl.java Wed Sep 05 11:30:22 2012 +0200 +++ b/src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorResourceImpl.java Wed Sep 05 18:05:54 2012 +0200 @@ -37,11 +37,11 @@ import de.mpiwg.itgroup.annotations.Actor; import de.mpiwg.itgroup.annotations.Annotation; +import de.mpiwg.itgroup.annotations.NS; import de.mpiwg.itgroup.annotations.Annotation.FragmentTypes; import de.mpiwg.itgroup.annotations.Group; import de.mpiwg.itgroup.annotations.Person; import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore; -import de.mpiwg.itgroup.annotations.old.NS; /** * Base class for Annotator resource classes. @@ -64,7 +64,7 @@ ServletContext sc = (ServletContext) getContext().getServerDispatcher().getContext().getAttributes() .get("org.restlet.ext.servlet.ServletContext"); logger.debug("Getting AnnotationStore from Context"); - store = (AnnotationStore) sc.getAttribute(RestServer.ANNSTORE_KEY); + store = (AnnotationStore) sc.getAttribute(BaseRestlet.ANNSTORE_KEY); } return store; } @@ -148,7 +148,7 @@ String userId = token.getParamAsPrimitive("userId").getAsString(); String consumerKey = token.getParamAsPrimitive("consumerKey").getAsString(); // get stored consumer secret for key - RestServer restServer = (RestServer) getApplication(); + BaseRestlet restServer = (BaseRestlet) getApplication(); String consumerSecret = restServer.getConsumerSecret(consumerKey); logger.debug("requested consumer key=" + consumerKey + " secret=" + consumerSecret); if (consumerSecret == null) { @@ -207,7 +207,7 @@ // get full name String userName = creator.getName(); if (userName == null) { - RestServer restServer = (RestServer) getApplication(); + BaseRestlet restServer = (BaseRestlet) getApplication(); userName = restServer.getFullNameFromLdap(userId); } userObject.put("name", userName); @@ -499,7 +499,7 @@ } // try to get full name if (creator.getName() == null && username != null) { - RestServer restServer = (RestServer) getApplication(); + BaseRestlet restServer = (BaseRestlet) getApplication(); String fullName = restServer.getFullNameFromLdap(username); creator.setName(fullName); }