Class CommonsXsdSchema

java.lang.Object
org.springframework.xml.xsd.commons.CommonsXsdSchema
All Implemented Interfaces:
XsdSchema

public class CommonsXsdSchema extends Object implements XsdSchema
Implementation of the XsdSchema interface that uses Apache WS-Commons XML Schema.
Since:
1.5.0
Author:
Arjen Poutsma
See Also:
  • Constructor Details

    • CommonsXsdSchema

      protected CommonsXsdSchema(org.apache.ws.commons.schema.XmlSchema schema)
      Create a new instance of the CommonsXsdSchema class with the specified XmlSchema reference.
      Parameters:
      schema - the Commons XmlSchema object; must not be null
      Throws:
      IllegalArgumentException - if the supplied schema is null
    • CommonsXsdSchema

      protected CommonsXsdSchema(org.apache.ws.commons.schema.XmlSchema schema, org.apache.ws.commons.schema.XmlSchemaCollection collection)
      Create a new instance of the CommonsXsdSchema class with the specified XmlSchema and XmlSchemaCollection reference.
      Parameters:
      schema - the Commons XmlSchema object; must not be null
      collection - the Commons XmlSchemaCollection object; can be null
      Throws:
      IllegalArgumentException - if the supplied schema is null
  • Method Details

    • getTargetNamespace

      public String getTargetNamespace()
      Description copied from interface: XsdSchema
      Returns the target namespace of this schema.
      Specified by:
      getTargetNamespace in interface XsdSchema
      Returns:
      the target namespace
    • getElementNames

      public QName[] getElementNames()
    • getSource

      public Source getSource()
      Description copied from interface: XsdSchema
      Returns the Source of the schema.
      Specified by:
      getSource in interface XsdSchema
      Returns:
      the source of this XSD schema
    • createValidator

      public XmlValidator createValidator()
      Description copied from interface: XsdSchema
      Creates a XmlValidator based on the schema.
      Specified by:
      createValidator in interface XsdSchema
      Returns:
      a validator for this schema
    • getSchema

      public org.apache.ws.commons.schema.XmlSchema getSchema()
      Returns the wrapped Commons XmlSchema object.
    • toString

      public String toString()
      Overrides:
      toString in class Object