org.apache.stanbol.entityhub.jersey.resource
Class EntityhubRootResource

java.lang.Object
  extended by org.apache.stanbol.commons.web.base.resource.BaseStanbolResource
      extended by org.apache.stanbol.entityhub.jersey.resource.EntityhubRootResource

public class EntityhubRootResource
extends org.apache.stanbol.commons.web.base.resource.BaseStanbolResource


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.stanbol.commons.web.base.resource.BaseStanbolResource
org.apache.stanbol.commons.web.base.resource.BaseStanbolResource.MenuItem
 
Field Summary
 
Fields inherited from class org.apache.stanbol.commons.web.base.resource.BaseStanbolResource
LINK_RESOURCES, NAVIGATION_LINKS, ROOT_URL, SCRIPT_RESOURCES, servletContext, STATIC_RESOURCES_ROOT_URL, SYSTEM_CONSOLE, uriInfo
 
Constructor Summary
EntityhubRootResource(javax.servlet.ServletContext servletContext)
           
 
Method Summary
 javax.ws.rs.core.Response createEntity(String id, boolean allowUpdate, Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation> parsed, javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response deleteEntity(String id, javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response findEntity(String name, String parsedField, String language, Integer limit, Integer offset, String select, String ldpath, javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response findEntityByGet(String name, String field, String language, Integer limit, Integer offset, String select, String ldpath, javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response get(javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response getEntityMapping(String entity, javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response getMapping(String reference, javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response getQueryDocumentation(javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response getSymbol(String symbolId, javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response getSymbolMappings(String symbol, javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response handleCorsPreflight(javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response handleCorsPreflightEntity(javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response handleCorsPreflightFind(javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response handleCorsPreflightLDPath(javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response handleCorsPreflightMapping(javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response handleCorsPreflightMappingEntity(javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response handleCorsPreflightMappingSymbol(javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response handleCorsPreflightQuery(javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response handleLDPathGet(Set<String> contexts, String ldpath, javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response handleLDPathPost(Set<String> contexts, String ldpath, javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response lookupSymbol(String reference, boolean create, javax.ws.rs.core.HttpHeaders headers)
           
 javax.ws.rs.core.Response queryEntities(org.apache.stanbol.entityhub.servicesapi.query.FieldQuery query, javax.ws.rs.core.HttpHeaders headers)
          Allows to parse any kind of FieldQuery in its JSON Representation.
 javax.ws.rs.core.Response updateEntity(String id, boolean allowCreate, Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation> parsed, javax.ws.rs.core.HttpHeaders headers)
           
 
Methods inherited from class org.apache.stanbol.commons.web.base.resource.BaseStanbolResource
getConsoleBaseUri, getMainMenuItems, getNavigationLinks, getPublicBaseUri, getRegisteredLinkResources, getRegisteredScriptResources, getRequestUri, getRootUrl, getStaticRootUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityhubRootResource

public EntityhubRootResource(@Context
                             javax.servlet.ServletContext servletContext)
Method Detail

handleCorsPreflight

public javax.ws.rs.core.Response handleCorsPreflight(@Context
                                                     javax.ws.rs.core.HttpHeaders headers)

get

public javax.ws.rs.core.Response get(@Context
                                     javax.ws.rs.core.HttpHeaders headers)

getSymbol

public javax.ws.rs.core.Response getSymbol(String symbolId,
                                           @Context
                                           javax.ws.rs.core.HttpHeaders headers)
                                    throws javax.ws.rs.WebApplicationException
Throws:
javax.ws.rs.WebApplicationException

lookupSymbol

public javax.ws.rs.core.Response lookupSymbol(String reference,
                                              boolean create,
                                              @Context
                                              javax.ws.rs.core.HttpHeaders headers)
                                       throws javax.ws.rs.WebApplicationException
Throws:
javax.ws.rs.WebApplicationException

handleCorsPreflightEntity

public javax.ws.rs.core.Response handleCorsPreflightEntity(@Context
                                                           javax.ws.rs.core.HttpHeaders headers)

createEntity

public javax.ws.rs.core.Response createEntity(String id,
                                              boolean allowUpdate,
                                              Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation> parsed,
                                              @Context
                                              javax.ws.rs.core.HttpHeaders headers)

updateEntity

public javax.ws.rs.core.Response updateEntity(String id,
                                              boolean allowCreate,
                                              Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation> parsed,
                                              @Context
                                              javax.ws.rs.core.HttpHeaders headers)

deleteEntity

public javax.ws.rs.core.Response deleteEntity(String id,
                                              @Context
                                              javax.ws.rs.core.HttpHeaders headers)

handleCorsPreflightFind

public javax.ws.rs.core.Response handleCorsPreflightFind(@Context
                                                         javax.ws.rs.core.HttpHeaders headers)

findEntityByGet

public javax.ws.rs.core.Response findEntityByGet(String name,
                                                 String field,
                                                 String language,
                                                 Integer limit,
                                                 Integer offset,
                                                 String select,
                                                 String ldpath,
                                                 @Context
                                                 javax.ws.rs.core.HttpHeaders headers)

findEntity

public javax.ws.rs.core.Response findEntity(String name,
                                            String parsedField,
                                            String language,
                                            Integer limit,
                                            Integer offset,
                                            String select,
                                            String ldpath,
                                            @Context
                                            javax.ws.rs.core.HttpHeaders headers)

handleCorsPreflightQuery

public javax.ws.rs.core.Response handleCorsPreflightQuery(@Context
                                                          javax.ws.rs.core.HttpHeaders headers)

getQueryDocumentation

public javax.ws.rs.core.Response getQueryDocumentation(@Context
                                                       javax.ws.rs.core.HttpHeaders headers)

queryEntities

public javax.ws.rs.core.Response queryEntities(org.apache.stanbol.entityhub.servicesapi.query.FieldQuery query,
                                               @Context
                                               javax.ws.rs.core.HttpHeaders headers)
Allows to parse any kind of FieldQuery in its JSON Representation.

TODO: as soon as the entityhub supports multiple query types this need to be refactored. The idea is that this dynamically detects query types and than redirects them to the referenced site implementation.

Parameters:
query - The field query in JSON format
headers - the header information of the request
Returns:
the results of the query

handleCorsPreflightMapping

public javax.ws.rs.core.Response handleCorsPreflightMapping(@Context
                                                            javax.ws.rs.core.HttpHeaders headers)

getMapping

public javax.ws.rs.core.Response getMapping(String reference,
                                            @Context
                                            javax.ws.rs.core.HttpHeaders headers)
                                     throws javax.ws.rs.WebApplicationException
Throws:
javax.ws.rs.WebApplicationException

handleCorsPreflightMappingEntity

public javax.ws.rs.core.Response handleCorsPreflightMappingEntity(@Context
                                                                  javax.ws.rs.core.HttpHeaders headers)

getEntityMapping

public javax.ws.rs.core.Response getEntityMapping(String entity,
                                                  @Context
                                                  javax.ws.rs.core.HttpHeaders headers)
                                           throws javax.ws.rs.WebApplicationException
Throws:
javax.ws.rs.WebApplicationException

handleCorsPreflightMappingSymbol

public javax.ws.rs.core.Response handleCorsPreflightMappingSymbol(@Context
                                                                  javax.ws.rs.core.HttpHeaders headers)

getSymbolMappings

public javax.ws.rs.core.Response getSymbolMappings(String symbol,
                                                   @Context
                                                   javax.ws.rs.core.HttpHeaders headers)
                                            throws javax.ws.rs.WebApplicationException
Throws:
javax.ws.rs.WebApplicationException

handleCorsPreflightLDPath

public javax.ws.rs.core.Response handleCorsPreflightLDPath(@Context
                                                           javax.ws.rs.core.HttpHeaders headers)

handleLDPathGet

public javax.ws.rs.core.Response handleLDPathGet(Set<String> contexts,
                                                 String ldpath,
                                                 @Context
                                                 javax.ws.rs.core.HttpHeaders headers)

handleLDPathPost

public javax.ws.rs.core.Response handleLDPathPost(Set<String> contexts,
                                                  String ldpath,
                                                  @Context
                                                  javax.ws.rs.core.HttpHeaders headers)


Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.