uk.org.ogsadai.common.xml
Class SchemaEntityResolver
java.lang.Object
|
+--uk.org.ogsadai.common.xml.SchemaEntityResolver
- All Implemented Interfaces:
- org.xml.sax.EntityResolver
- class SchemaEntityResolver
- extends java.lang.Object
- implements org.xml.sax.EntityResolver
A custom org.xml.sax.EntityResolver
used by
XMLSchemaUtilities
to map a schema location to a
schema document. This allows a document to be validated against a
schema assembled dynamically in memory, instead of the usual
behaviour where a schema will be loaded from a URL.
- Author:
- The OGSA-DAI Project Team
Constructor Summary |
(package private) |
SchemaEntityResolver(org.w3c.dom.Document schema)
Constructs an instance for the given XML Schema. |
Method Summary |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT_NOTICE
private static final java.lang.String COPYRIGHT_NOTICE
- See Also:
- Constant Field Values
LOG
private static final DAILogger LOG
mNamespace
private final java.lang.String mNamespace
mSchema
private final java.lang.String mSchema
SchemaEntityResolver
SchemaEntityResolver(org.w3c.dom.Document schema)
- Constructs an instance for the given XML Schema. The target
namespace of the XML Schema will be resolved to the schema
document by the
resolveEntity
method.
- Parameters:
schema
- The XML Schema document.
- Throws:
java.lang.IllegalArgumentException
- if schema
is
null
.
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException,
java.io.IOException
- Specified by:
resolveEntity
in interface org.xml.sax.EntityResolver
org.xml.sax.SAXException
java.io.IOException