Spring Web Services Framework

org.springframework.xml.xsd.commons
Class CommonsXsdSchema

java.lang.Object
  extended by 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:
Commons XML Schema

Constructor Summary
protected CommonsXsdSchema(XmlSchema schema)
          Create a new instance of the CommonsXsdSchema class with the specified XmlSchema reference.
protected CommonsXsdSchema(XmlSchema schema, XmlSchemaCollection collection)
          Create a new instance of the CommonsXsdSchema class with the specified XmlSchema and XmlSchemaCollection reference.
 
Method Summary
 XmlValidator createValidator()
          Creates a XmlValidator based on the schema.
 QName[] getElementNames()
           
 XmlSchema getSchema()
          Returns the wrapped Commons XmlSchema object.
 Source getSource()
          Returns the Source of the schema.
 String getTargetNamespace()
          Returns the target namespace of this schema.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommonsXsdSchema

protected CommonsXsdSchema(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(XmlSchema 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 Detail

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()
                             throws IOException
Description copied from interface: XsdSchema
Creates a XmlValidator based on the schema.

Specified by:
createValidator in interface XsdSchema
Returns:
a validator for this schema
Throws:
IOException - in case of I/O errors

getSchema

public XmlSchema getSchema()
Returns the wrapped Commons XmlSchema object.


toString

public String toString()
Overrides:
toString in class Object

Spring Web Services Framework

Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.