public class SimpleXsdSchema extends Object implements XsdSchema, org.springframework.beans.factory.InitializingBean
XsdSchema
implementation.
Allows a XSD to be set by the setXsd(Resource)
, or directly in the constructor
.
Constructor and Description |
---|
SimpleXsdSchema()
Create a new instance of the
SimpleXsdSchema class. |
SimpleXsdSchema(org.springframework.core.io.Resource xsdResource)
Create a new instance of the
SimpleXsdSchema class with the specified resource. |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
XmlValidator |
createValidator()
Creates a
XmlValidator based on the schema. |
Source |
getSource()
Returns the
Source of the schema. |
String |
getTargetNamespace()
Returns the target namespace of this schema.
|
void |
setXsd(org.springframework.core.io.Resource xsdResource)
Set the XSD resource to be exposed by calls to this instances'
getSource() method. |
String |
toString() |
public SimpleXsdSchema()
SimpleXsdSchema
class.
A subsequent call to the setXsd(Resource)
method is required.
public SimpleXsdSchema(org.springframework.core.io.Resource xsdResource)
SimpleXsdSchema
class with the specified resource.xsdResource
- the XSD resource; must not be null
IllegalArgumentException
- if the supplied xsdResource
is null
public void setXsd(org.springframework.core.io.Resource xsdResource)
getSource()
method.xsdResource
- the XSD resourcepublic String getTargetNamespace()
XsdSchema
getTargetNamespace
in interface XsdSchema
public Source getSource()
XsdSchema
Source
of the schema.public XmlValidator createValidator()
XsdSchema
XmlValidator
based on the schema.createValidator
in interface XsdSchema
public void afterPropertiesSet() throws ParserConfigurationException, IOException, SAXException
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
ParserConfigurationException
IOException
SAXException