net.sourceforge.fluxion.spring.endpoint.xml
Class MessageElementHandler

java.lang.Object
  extended by net.sourceforge.fluxion.spring.endpoint.xml.MessageElementHandler

public class MessageElementHandler
extends java.lang.Object

XML handling code to interpret and construct the service message elements, basically a library of static methods used by the endpoints and by the ws client.

Author:
Tom Oinn

Constructor Summary
MessageElementHandler()
           
 
Method Summary
static org.jdom.Element getDataSourceBasedElement(java.lang.String elementName, java.net.URI dataSourceURI)
          Construct a new message element with a single data source URI and with the top level element having the specified local name and fluxion namespace
static org.jdom.Element getDataSourcesBasedElement(java.lang.String elementName, java.lang.Iterable<java.net.URI> dataSourceURIs)
          Construct a new message element containing a list of URIs and with the specified local name (which will be used to create an element in the fluxion namespace)
static java.net.URI getDataSourceURI(org.jdom.Element messageElement)
          Get the dataSourceURI URI property from the specified message element, used by several service endpoint handlers.
static java.util.Set<java.net.URI> getGetDataSourcesResponse(org.jdom.Element messageElement)
          Construct a set of URIs from a getDataSourcesResponse message
static org.semanticweb.owl.model.OWLOntology getGetSchemaResponse(org.jdom.Element messageElement)
          Create an OWLOntology from a getSchemaResponse element
static org.jdom.Element getGetSchemaResponseMessageElement(org.semanticweb.owl.model.OWLOntology ontology)
          Create a getSchemaResponse message element from an OWLOntology
static QueryRequestMessage getQueryRequestMessage(org.jdom.Element messageElement)
          Get a query request message from the message element
static org.jdom.Element getQueryRequestMessageElement(QueryRequestMessage message)
          Create a query request message element from a QueryRequestMessage
static org.jdom.Element getQueryRequestMessageElement(java.net.URI dataSourceURI, java.net.URI queryClassURI, org.semanticweb.owl.model.OWLOntology ontology)
          Create a query request message element from a data source URI, query class URI and ontology.
static org.semanticweb.owl.model.OWLOntology getQueryResponse(org.jdom.Element messageElement)
          Create an OWLOntology from a query response message element
static org.jdom.Element getQueryResponseMessageElement(org.semanticweb.owl.model.OWLOntology response)
          Create a query response message element from an OWLOntology
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageElementHandler

public MessageElementHandler()
Method Detail

getQueryResponseMessageElement

public static org.jdom.Element getQueryResponseMessageElement(org.semanticweb.owl.model.OWLOntology response)
                                                       throws DataSourceException
Create a query response message element from an OWLOntology

Throws:
DataSourceException

getQueryResponse

public static org.semanticweb.owl.model.OWLOntology getQueryResponse(org.jdom.Element messageElement)
                                                              throws DataSourceException
Create an OWLOntology from a query response message element

Throws:
DataSourceException

getQueryRequestMessageElement

public static org.jdom.Element getQueryRequestMessageElement(QueryRequestMessage message)
                                                      throws DataSourceException
Create a query request message element from a QueryRequestMessage

Throws:
DataSourceException

getQueryRequestMessageElement

public static org.jdom.Element getQueryRequestMessageElement(java.net.URI dataSourceURI,
                                                             java.net.URI queryClassURI,
                                                             org.semanticweb.owl.model.OWLOntology ontology)
                                                      throws DataSourceException
Create a query request message element from a data source URI, query class URI and ontology.

Throws:
DataSourceException

getQueryRequestMessage

public static QueryRequestMessage getQueryRequestMessage(org.jdom.Element messageElement)
                                                  throws DataSourceException
Get a query request message from the message element

Throws:
DataSourceException

getDataSourceURI

public static java.net.URI getDataSourceURI(org.jdom.Element messageElement)
                                     throws DataSourceException
Get the dataSourceURI URI property from the specified message element, used by several service endpoint handlers.

Throws:
DataSourceException

getDataSourceBasedElement

public static org.jdom.Element getDataSourceBasedElement(java.lang.String elementName,
                                                         java.net.URI dataSourceURI)
Construct a new message element with a single data source URI and with the top level element having the specified local name and fluxion namespace


getDataSourcesBasedElement

public static org.jdom.Element getDataSourcesBasedElement(java.lang.String elementName,
                                                          java.lang.Iterable<java.net.URI> dataSourceURIs)
Construct a new message element containing a list of URIs and with the specified local name (which will be used to create an element in the fluxion namespace)


getGetDataSourcesResponse

public static java.util.Set<java.net.URI> getGetDataSourcesResponse(org.jdom.Element messageElement)
                                                             throws DataSourceException
Construct a set of URIs from a getDataSourcesResponse message

Throws:
DataSourceException

getGetSchemaResponse

public static org.semanticweb.owl.model.OWLOntology getGetSchemaResponse(org.jdom.Element messageElement)
                                                                  throws DataSourceException
Create an OWLOntology from a getSchemaResponse element

Throws:
DataSourceException

getGetSchemaResponseMessageElement

public static org.jdom.Element getGetSchemaResponseMessageElement(org.semanticweb.owl.model.OWLOntology ontology)
                                                           throws DataSourceException
Create a getSchemaResponse message element from an OWLOntology

Throws:
DataSourceException


Copyright © 2010. All Rights Reserved.