edu.uga.cs.lsdis.wsdl20.util
Class SAWSDLUtil

java.lang.Object
  extended by edu.uga.cs.lsdis.wsdl20.util.SAWSDLUtil

public class SAWSDLUtil
extends java.lang.Object

A utility class that handles the creation of SAWSDL descriptions and provides other utility methods to easily obtain the modelrefs, schema mappings etc.

Author:
Doug Brewer, Ajith Ranabahu

Nested Class Summary
static class SAWSDLUtil.ModelRefExtractionException
          Exception for model ref extraction faults
static class SAWSDLUtil.SAWSDLCreatorException
          Exception thrown for any fault in creation fault
static class SAWSDLUtil.SchemaMappingExtractionException
           
 
Constructor Summary
SAWSDLUtil()
           
 
Method Summary
static org.apache.ws.commons.schema.XmlSchemaAttribute[] getAttributes(TypeDefinition typeDefinition)
          Convenient method to get an array of attributes given the type
static Description getDescription(java.lang.String url)
          Creates a SAWSDLDescription given the URL A convenience method to get description
static SchemaMapping getLifingMapping(ElementDeclaration elementDeclaration)
          A utility method to extract the schema mappings (lifting) from the element definitions
static SchemaMapping getLifingMapping(TypeDefinition typeDefinition)
          A utility method to extract the schema mappings (lifting) from the element definitions
static SchemaMapping getLoweringMapping(ElementDeclaration elementDeclaration)
          A utility method to extract the schema mappings (lowering) from the element definitions
static SchemaMapping getLoweringMapping(TypeDefinition typeDefinition)
          A utility method to extract the schema mappings (lowering) from the element definitions
static ModelReference getModelRef(ElementDeclaration elementDeclaration)
          A utility method to extract the model references from the element definitions
static ModelReference getModelRef(TypeDefinition typeDefinition)
          A utility method to extract the model references from the type definitions
static ModelReference getModelRef(WSDLComponent sawsdlComponent)
          A utility method to extract the model references from the sawsdl components
static ModelReference getSchemaModelRef(org.apache.ws.commons.schema.XmlSchemaAttribute attribute)
          Convenient method to get an array of attributes given the type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAWSDLUtil

public SAWSDLUtil()
Method Detail

getDescription

public static Description getDescription(java.lang.String url)
                                  throws SAWSDLUtil.SAWSDLCreatorException
Creates a SAWSDLDescription given the URL A convenience method to get description

Parameters:
url - - url of the WSDL to load
Returns:
the description object
Throws:
SAWSDLUtil.SAWSDLCreatorException - - if the creation fails

getModelRef

public static ModelReference getModelRef(WSDLComponent sawsdlComponent)
                                  throws SAWSDLUtil.ModelRefExtractionException
A utility method to extract the model references from the sawsdl components

Parameters:
sawsdlComponent - to be used (ex. interface,opertaion, fault)
Returns:
ModelReference or null if not found
Throws:
SAWSDLUtil.ModelRefExtractionException - - if there is a fault in getting the model reference

getModelRef

public static ModelReference getModelRef(TypeDefinition typeDefinition)
                                  throws SAWSDLUtil.ModelRefExtractionException
A utility method to extract the model references from the type definitions

Parameters:
typeDefinition - to be used
Returns:
ModelReference
Throws:
SAWSDLUtil.ModelRefExtractionException - - if there is a fault in getting the model reference

getModelRef

public static ModelReference getModelRef(ElementDeclaration elementDeclaration)
                                  throws SAWSDLUtil.ModelRefExtractionException
A utility method to extract the model references from the element definitions

Parameters:
elementDeclaration - to be used
Returns:
ModelReference
Throws:
SAWSDLUtil.ModelRefExtractionException - - if there is a fault in getting the model reference

getLifingMapping

public static SchemaMapping getLifingMapping(ElementDeclaration elementDeclaration)
                                      throws SAWSDLUtil.SchemaMappingExtractionException
A utility method to extract the schema mappings (lifting) from the element definitions

Parameters:
elementDeclaration - to be used
Returns:
ModelReference
Throws:
SAWSDLUtil.SchemaMappingExtractionException - - if there is a fault in getting the SchemaMapping

getSchemaModelRef

public static ModelReference getSchemaModelRef(org.apache.ws.commons.schema.XmlSchemaAttribute attribute)
Convenient method to get an array of attributes given the type

Parameters:
attribute -
Returns:
The ModelReference for XmlSchemaAttribute

getAttributes

public static org.apache.ws.commons.schema.XmlSchemaAttribute[] getAttributes(TypeDefinition typeDefinition)
Convenient method to get an array of attributes given the type

Parameters:
typeDefinition -
Returns:
All XmlSchemaAttributes defined in a ComplexType.

getLoweringMapping

public static SchemaMapping getLoweringMapping(ElementDeclaration elementDeclaration)
                                        throws SAWSDLUtil.SchemaMappingExtractionException
A utility method to extract the schema mappings (lowering) from the element definitions

Parameters:
elementDeclaration - to be used
Returns:
ModelReference
Throws:
SAWSDLUtil.SchemaMappingExtractionException - - if there is a fault in getting the SchemaMapping

getLifingMapping

public static SchemaMapping getLifingMapping(TypeDefinition typeDefinition)
                                      throws SAWSDLUtil.SchemaMappingExtractionException
A utility method to extract the schema mappings (lifting) from the element definitions

Parameters:
typeDefinition - to be used
Returns:
ModelReference
Throws:
SAWSDLUtil.SchemaMappingExtractionException - - if there is a fault in getting the SchemaMapping

getLoweringMapping

public static SchemaMapping getLoweringMapping(TypeDefinition typeDefinition)
                                        throws SAWSDLUtil.SchemaMappingExtractionException
A utility method to extract the schema mappings (lowering) from the element definitions

Parameters:
typeDefinition - to be used
Returns:
ModelReference
Throws:
SAWSDLUtil.SchemaMappingExtractionException - - if there is a fault in getting the SchemaMapping


Copyright © 2007. All Rights Reserved.