Modified: 
incubator/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/SessionsResource.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/SessionsResource.java?rev=1236809&r1=1236808&r2=1236809&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/SessionsResource.java
 (original)
+++ 
incubator/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/SessionsResource.java
 Fri Jan 27 18:31:24 2012
@@ -65,125 +65,6 @@ public class SessionsResource extends Ba
             servletContext);
     }
 
-    // @POST
-    // @Consumes(MULTIPART_FORM_DATA)
-    // public Response addOntology(@FormDataParam("scope") String scope,
-    // @FormDataParam("import") InputStream importOntology,
-    // @FormDataParam("session") String session,
-    // @Context UriInfo uriInfo,
-    // @Context HttpHeaders headers,
-    // @Context ServletContext servletContext) {
-    //
-    // IRI scopeIRI = IRI.create(scope);
-    // IRI sessionIRI = IRI.create(session);
-    //
-    // OWLOntology ontology;
-    // try {
-    // ontology = 
onm.getOwlCacheManager().loadOntologyFromOntologyDocument(importOntology);
-    //
-    // ScopeRegistry scopeRegistry = onm.getScopeRegistry();
-    //
-    // // OntologyScope ontologyScope = scopeRegistry.getScope(scope);
-    // // SessionOntologySpace sos = ontologyScope.getSessionSpace(sessionIRI);
-    // // try {
-    // // sos.addOntology(new RootOntologySource(ontology));
-    // return Response.ok().build();
-    // // } catch (UnmodifiableOntologySpaceException e) {
-    // // return Response.status(INTERNAL_SERVER_ERROR).build();
-    // // }
-    // } catch (OWLOntologyCreationException e1) {
-    // return Response.status(NOT_FOUND).build();
-    // }
-    //
-    // }
-
-    // /**
-    // *
-    // * If the session param is missing, this method creates a new session, 
ignoring other params
-    // *
-    // * @param scope
-    // * @param session
-    // * @param location
-    // * @param uriInfo
-    // * @param headers
-    // * @param servletContext
-    // * @return
-    // */
-    // @POST
-    // @Consumes(APPLICATION_FORM_URLENCODED)
-    // @Produces(value = {RDF_XML, OWL_XML, TURTLE, FUNCTIONAL_OWL, 
MANCHESTER_OWL, RDF_JSON})
-    // public Response addOntology(@FormParam("scope") String scope,
-    // @FormParam("session") String session,
-    // @FormParam("location") String location,
-    // @Context UriInfo uriInfo,
-    // @Context HttpHeaders headers,
-    // @Context ServletContext servletContext) {
-    // if (session == null || session.equals("")) {
-    // return createSession(scope, uriInfo, headers);
-    // } else {
-    // IRI scopeIRI = IRI.create(scope);
-    // IRI ontologyIRI = IRI.create(location);
-    // ScopeRegistry scopeRegistry = onm.getScopeRegistry();
-    //
-    // OntologyScope ontologyScope = scopeRegistry.getScope(scope);
-    // SessionOntologySpace sos = ontologyScope.getSessionSpace(session);
-    // try {
-    // sos.addOntology(new RootOntologyIRISource(ontologyIRI));
-    // return Response.ok().build();
-    // } catch (UnmodifiableOntologyCollectorException e) {
-    // return Response.status(INTERNAL_SERVER_ERROR).build();
-    // } catch (OWLOntologyCreationException e) {
-    // return Response.status(INTERNAL_SERVER_ERROR).build();
-    // }
-    // }
-    // }
-
-    // /**
-    // * This method creates a session.
-    // *
-    // * @param scope
-    // * @param uriInfo
-    // * @param headers
-    // * @return
-    // */
-    // private Response createSession(String scope, UriInfo uriInfo, 
HttpHeaders headers) {
-    // if (scope == null || scope.equals("")) {
-    // return Response.status(INTERNAL_SERVER_ERROR).build();
-    // }
-    // Session ses = null;
-    // SessionManager mgr = onm.getSessionManager();
-    //
-    // /*
-    // * Create the KReS session to associate to the scope.
-    // */
-    // ses = mgr.createSession();
-    //
-    // /*
-    // * First get the scope registry.
-    // */
-    // ScopeRegistry scopeRegistry = onm.getScopeRegistry();
-    //
-    // /*
-    // * Then retrieve the ontology scope.
-    // */
-    // IRI scopeIRI = IRI.create(scope);
-    // OntologyScope ontologyScope = scopeRegistry.getScope(scope);
-    //
-    // /*
-    // * Finally associate the KReS session to the scope.
-    // */
-    // OntologySpaceFactory ontologySpaceFactory = 
onm.getOntologySpaceFactory();
-    // SessionOntologySpace sessionOntologySpace = 
ontologySpaceFactory.createSessionOntologySpace(scope);
-    // try {
-    // ontologyScope.addSessionSpace(sessionOntologySpace, ses.getID());
-    // } catch (UnmodifiableOntologyCollectorException e) {
-    // throw new WebApplicationException(e);
-    // }
-    //
-    // return 
Response.ok(SessionRenderer.getSessionMetadataRDFasOntology(ses)).build();
-    //
-    // }
-
     @GET
     @Produces(value = {KRFormat.RDF_XML, KRFormat.OWL_XML, KRFormat.TURTLE, 
KRFormat.FUNCTIONAL_OWL,
                        KRFormat.MANCHESTER_OWL, KRFormat.RDF_JSON})
@@ -210,51 +91,6 @@ public class SessionsResource extends Ba
         return Response.ok(o).build();
     }
 
-    // /**
-    // * FIXME what are these path params anyway?
-    // *
-    // * @param scope
-    // * @param session
-    // * @param deleteOntology
-    // * @param uriInfo
-    // * @param headers
-    // * @return
-    // */
-    // @DELETE
-    // public Response deleteSession(@QueryParam("scope") String scope,
-    // @QueryParam("session") String session,
-    // @QueryParam("delete") String deleteOntology,
-    // @Context UriInfo uriInfo,
-    // @Context HttpHeaders headers) {
-    //
-    // IRI scopeID = IRI.create(scope);
-    //
-    // if (deleteOntology != null) {
-    // IRI ontologyIRI = IRI.create(deleteOntology);
-    //
-    // ScopeRegistry scopeRegistry = onm.getScopeRegistry();
-    //
-    // OntologyScope ontologyScope = scopeRegistry.getScope(scope);
-    // SessionOntologySpace sos = ontologyScope.getSessionSpace(session);
-    //
-    // try {
-    // /*
-    // * TODO : previous implementation reloaded the whole ontology before 
deleting it, thus
-    // * treating this as a physical IRI. See if it still works this way
-    // */
-    // OWLOntology o = sos.getOntology(ontologyIRI);
-    // if (o != null) sos.removeOntology(ontologyIRI);
-    // return Response.ok().build();
-    // } catch (OntologyCollectorModificationException e) {
-    // return Response.status(INTERNAL_SERVER_ERROR).build();
-    // }
-    // } else {
-    // onm.getSessionManager().destroySession(session);
-    // return Response.ok().build();
-    // }
-    //
-    // }
-
     @GET
     @Produces(TEXT_HTML)
     public Response getView() {


Reply via email to