java.lang.Object
com.atomgraph.core.model.impl.ResourceBase
com.atomgraph.core.model.impl.QueriedResourceBase
com.atomgraph.server.model.impl.ResourceBase
com.atomgraph.server.resource.graph.Item
All Implemented Interfaces:
com.atomgraph.core.model.QueriedResource, com.atomgraph.core.model.Resource, QueriedResource, Resource

public class Item extends ResourceBase
Named graph resource. Implements direct graph identification of the SPARQL Graph Store Protocol.
Author:
Martynas Jusevičius <martynas@atomgraph.com>
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Item(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, com.atomgraph.core.MediaTypes mediaTypes, com.atomgraph.core.model.Service service, Application application, Optional<org.apache.jena.ontology.Ontology> ontology, Optional<TemplateCall> templateCall, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.ResourceContext resourceContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javax.ws.rs.core.Response
    Handles DELETE method, deletes the RDF representation of this resource from the application's dataset, and returns response.
    javax.ws.rs.core.Response
    get()
     
    javax.ws.rs.core.Response
    post(org.apache.jena.rdf.model.Model model)
    Handles POST method.
    javax.ws.rs.core.Response
    put(org.apache.jena.rdf.model.Model model)
    Handles PUT method.

    Methods inherited from class com.atomgraph.core.model.impl.QueriedResourceBase

    describe, getQuery, getService

    Methods inherited from class com.atomgraph.core.model.impl.ResourceBase

    getEncodings, getEntityTag, getLastModified, getMediaTypes, getRequest, getResponse, getResponseBuilder, getURI, getUriInfo, getWritableMediaTypes

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.atomgraph.core.model.QueriedResource

    describe
  • Constructor Details

    • Item

      @Inject public Item(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.Request request, @Context com.atomgraph.core.MediaTypes mediaTypes, com.atomgraph.core.model.Service service, Application application, Optional<org.apache.jena.ontology.Ontology> ontology, Optional<TemplateCall> templateCall, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Context javax.ws.rs.container.ResourceContext resourceContext)
  • Method Details

    • get

      public javax.ws.rs.core.Response get()
      Specified by:
      get in interface com.atomgraph.core.model.Resource
      Overrides:
      get in class ResourceBase
    • post

      public javax.ws.rs.core.Response post(org.apache.jena.rdf.model.Model model)
      Description copied from class: ResourceBase
      Handles POST method. Appends the submitted RDF representation to the application's dataset.
      Specified by:
      post in interface com.atomgraph.core.model.Resource
      Overrides:
      post in class ResourceBase
      Parameters:
      model - the RDF payload
      Returns:
      response 200 OK
    • put

      public javax.ws.rs.core.Response put(org.apache.jena.rdf.model.Model model)
      Description copied from class: ResourceBase
      Handles PUT method. Deletes the resource description (if any) and appends the submitted RDF representation to the application's dataset.
      Specified by:
      put in interface com.atomgraph.core.model.Resource
      Overrides:
      put in class ResourceBase
      Parameters:
      model - RDF payload
      Returns:
      response 201 Created if resource did not exist, 200 OK if it did
    • delete

      public javax.ws.rs.core.Response delete()
      Description copied from class: ResourceBase
      Handles DELETE method, deletes the RDF representation of this resource from the application's dataset, and returns response.
      Specified by:
      delete in interface com.atomgraph.core.model.Resource
      Overrides:
      delete in class ResourceBase
      Returns:
      response 204 No Content