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
See Also:
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    CommonsXsdSchema(org.apache.ws.commons.schema.XmlSchema schema)
    Create a new instance of the CommonsXsdSchema class with the specified XmlSchema reference.
    protected
    CommonsXsdSchema(org.apache.ws.commons.schema.XmlSchema schema, @Nullable org.apache.ws.commons.schema.XmlSchemaCollection collection)
    Create a new instance of the CommonsXsdSchema class with the specified XmlSchema and XmlSchemaCollection reference.
    protected
    CommonsXsdSchema(org.apache.ws.commons.schema.XmlSchema schema, @Nullable org.apache.ws.commons.schema.XmlSchemaCollection collection, @Nullable String name)
    Create a new instance of the CommonsXsdSchema class with the specified XmlSchema, XmlSchemaCollection reference, and name.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a XmlValidator based on the schema.
     
    @Nullable String
    Return the name of the schema, if known.
    org.apache.ws.commons.schema.XmlSchema
    Returns the wrapped Commons XmlSchema object.
    Returns the Source of the schema.
    Returns the target namespace of this schema.
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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, @Nullable 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
    • CommonsXsdSchema

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

    • getName

      public @Nullable String getName()
      Description copied from interface: XsdSchema
      Return the name of the schema, if known.
      Specified by:
      getName in interface XsdSchema
    • 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