org.apache.cxf.common.xmlschema
Class XmlSchemaTools

java.lang.Object
  extended by org.apache.cxf.common.xmlschema.XmlSchemaTools

public final class XmlSchemaTools
extends java.lang.Object

Some functions that avoid problems with Commons XML Schema.


Method Summary
static java.util.List<java.lang.String> enumeratorValues(org.apache.ws.commons.schema.XmlSchemaSimpleType type)
          Retrieve the string values for an enumeration.
static boolean isEumeration(org.apache.ws.commons.schema.XmlSchemaSimpleType type)
          Return true if a simple type is a straightforward XML Schema representation of an enumeration.
static void setElementName(org.apache.ws.commons.schema.XmlSchemaElement element, java.lang.String name)
          Wrapper around XmlSchemaElement.setName that checks for inconsistency with refName.
static void setElementQName(org.apache.ws.commons.schema.XmlSchemaElement element, javax.xml.namespace.QName name)
          Wrapper around XmlSchemaElement.setQName that checks for inconsistency with refName.
static void setElementRefName(org.apache.ws.commons.schema.XmlSchemaElement element, javax.xml.namespace.QName name)
          Wrapper around XmlSchemaElement.setRefName that checks for inconsistency with name and QName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setElementQName

public static void setElementQName(org.apache.ws.commons.schema.XmlSchemaElement element,
                                   javax.xml.namespace.QName name)
Wrapper around XmlSchemaElement.setQName that checks for inconsistency with refName.

Parameters:
element -
name -

setElementName

public static void setElementName(org.apache.ws.commons.schema.XmlSchemaElement element,
                                  java.lang.String name)
Wrapper around XmlSchemaElement.setName that checks for inconsistency with refName.

Parameters:
element -
name -

setElementRefName

public static void setElementRefName(org.apache.ws.commons.schema.XmlSchemaElement element,
                                     javax.xml.namespace.QName name)
Wrapper around XmlSchemaElement.setRefName that checks for inconsistency with name and QName.

Parameters:
element -
name -

isEumeration

public static boolean isEumeration(org.apache.ws.commons.schema.XmlSchemaSimpleType type)
Return true if a simple type is a straightforward XML Schema representation of an enumeration. If we discover schemas that are 'enum-like' with more complex structures, we might make this deal with them.

Parameters:
type - Simple type, possible an enumeration.
Returns:
true for an enumeration.

enumeratorValues

public static java.util.List<java.lang.String> enumeratorValues(org.apache.ws.commons.schema.XmlSchemaSimpleType type)
Retrieve the string values for an enumeration.

Parameters:
type -
Returns:


Apache CXF