org.opentox.toxotis.core
Interface IRestOperation

All Superinterfaces:
IOTComponent
All Known Implementing Classes:
RestOperation

public interface IRestOperation
extends IOTComponent

Interface documentation for a web service. OpenTox web services define the supported operations that are available and at the same time provide machine-readable directives for their consumption which can be used to generate human-readable documentation too. Corresponding HTTP method, allowed (mandatory and optional) input parameters for the service and information about them as well as possible status codes that might be thrown by the service are included in the definition of the web service.

Author:
Pantelis Sopasakis, Charalampos Chomenides

Method Summary
 RestOperation addHttpParameters(HttpParameter... httpParameters)
           
 RestOperation addHttpStatusCodes(HttpStatus... httpStatusCodes)
           
 IRestOperation addMediaTypes(HttpMediatype... mediaTypes)
           
 RestOperation addRestClasses(OntologicalClass... restClasses)
           
 IRestOperation addSimpleHeader(String headerName, boolean optional, com.hp.hpl.jena.datatypes.xsd.XSDDatatype xsdType)
           
 IRestOperation addSimpleHeader(String headerName, boolean optional, com.hp.hpl.jena.datatypes.xsd.XSDDatatype xsdType, MetaInfo meta)
           
 IRestOperation addUrlParameter(String urlParameterName, boolean optional, com.hp.hpl.jena.datatypes.xsd.XSDDatatype type)
           
 IRestOperation addUrlParameter(String urlParameterName, boolean optional, com.hp.hpl.jena.datatypes.xsd.XSDDatatype type, MetaInfo meta)
           
 Set<HttpParameter> getHttpParameters()
          Set of input parameters which are expected by the client on POST.
 Set<HttpStatus> getHttpStatusCodes()
          A set of the status codes that might occur when invoking the service, including all redirection, error and success status codes.
 Set<HttpMediatype> getMediaTypes()
           
 HttpMethod getMethod()
          The HTTP method which are supported by the web service.
 Set<OntologicalClass> getRestClasses()
          Return the set of ontological classes that describe the underlying resource and define its REST interface available operations choosing from the collection OTRestClasses .
 RestOperation setHttpParameters(Set<HttpParameter> httpParameters)
           
 RestOperation setHttpStatusCodes(Set<HttpStatus> httpStatusCodes)
           
 IRestOperation setMediaTypes(Set<HttpMediatype> mediaTypes)
           
 RestOperation setMethod(HttpMethod httpMethod)
           
 RestOperation setMethod(HttpMethods.MethodsEnum httpMethod)
           
 IRestOperation setProtectedResource(boolean protectedResource)
           
 RestOperation setRestClasses(Set<OntologicalClass> restClasses)
           
 
Methods inherited from interface org.opentox.toxotis.core.IOTComponent
addOntologicalClasses, asIndividual, asOntModel, getMeta, getOntologicalClasses, getUri, isEnabled, setEnabled, setMeta, setOntologicalClasses
 

Method Detail

addHttpParameters

RestOperation addHttpParameters(HttpParameter... httpParameters)

addHttpStatusCodes

RestOperation addHttpStatusCodes(HttpStatus... httpStatusCodes)

addRestClasses

RestOperation addRestClasses(OntologicalClass... restClasses)

getHttpParameters

Set<HttpParameter> getHttpParameters()
Set of input parameters which are expected by the client on POST. These are either posted as a form or included in the URL as URL parameters.

Returns:
Specifications for the input parameters expected by the client.

getHttpStatusCodes

Set<HttpStatus> getHttpStatusCodes()
A set of the status codes that might occur when invoking the service, including all redirection, error and success status codes. As ontological classes, status codes are found in the colleciton OTRestClasses , and subclass OTRestClasses#HTTPStatus() such as OTRestClasses#STATUS_200() .

Returns:
Set of ontological classes that describe the available status codes.

getMethod

HttpMethod getMethod()
The HTTP method which are supported by the web service.

Returns:
Http Method as element of the enumeration HttpMethods.MethodsEnum.

getRestClasses

Set<OntologicalClass> getRestClasses()
Return the set of ontological classes that describe the underlying resource and define its REST interface available operations choosing from the collection OTRestClasses .

Returns:
Set of ontological classes

setHttpParameters

RestOperation setHttpParameters(Set<HttpParameter> httpParameters)

setHttpStatusCodes

RestOperation setHttpStatusCodes(Set<HttpStatus> httpStatusCodes)

setMethod

RestOperation setMethod(HttpMethod httpMethod)

setMethod

RestOperation setMethod(HttpMethods.MethodsEnum httpMethod)

setRestClasses

RestOperation setRestClasses(Set<OntologicalClass> restClasses)

getMediaTypes

Set<HttpMediatype> getMediaTypes()

setMediaTypes

IRestOperation setMediaTypes(Set<HttpMediatype> mediaTypes)

addMediaTypes

IRestOperation addMediaTypes(HttpMediatype... mediaTypes)

addUrlParameter

IRestOperation addUrlParameter(String urlParameterName,
                               boolean optional,
                               com.hp.hpl.jena.datatypes.xsd.XSDDatatype type)

addUrlParameter

IRestOperation addUrlParameter(String urlParameterName,
                               boolean optional,
                               com.hp.hpl.jena.datatypes.xsd.XSDDatatype type,
                               MetaInfo meta)

addSimpleHeader

IRestOperation addSimpleHeader(String headerName,
                               boolean optional,
                               com.hp.hpl.jena.datatypes.xsd.XSDDatatype xsdType)

addSimpleHeader

IRestOperation addSimpleHeader(String headerName,
                               boolean optional,
                               com.hp.hpl.jena.datatypes.xsd.XSDDatatype xsdType,
                               MetaInfo meta)

setProtectedResource

IRestOperation setProtectedResource(boolean protectedResource)


Copyright © 2011-2012 OpenTox. All Rights Reserved.