org.apache.ode.utils.xsd
Class XSUtils

java.lang.Object
  extended by org.apache.ode.utils.xsd.XSUtils

public class XSUtils
extends java.lang.Object

Various utility methods related to XML Schema processing.


Constructor Summary
XSUtils()
           
 
Method Summary
static java.util.Map<java.net.URI,byte[]> captureSchema(java.lang.String initialUri, org.apache.xerces.xni.parser.XMLEntityResolver resolver)
          Recursively "capture" XSD documents starting at the given URI and using an XMLEntityResolver to obtain document streams.
static java.util.Map<java.net.URI,byte[]> captureSchema(java.net.URI systemURI, java.lang.String schemaData, org.apache.xerces.xni.parser.XMLEntityResolver resolver)
          Capture the schemas supplied by the reader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSUtils

public XSUtils()
Method Detail

captureSchema

public static java.util.Map<java.net.URI,byte[]> captureSchema(java.lang.String initialUri,
                                                               org.apache.xerces.xni.parser.XMLEntityResolver resolver)
                                                        throws XsdException
Recursively "capture" XSD documents starting at the given URI and using an XMLEntityResolver to obtain document streams. The result is a mapping from the XSD URI to a byte array containing the "captured" document stream.

Parameters:
initialUri - URI of the schema
resolver - XMLEntityResolver used to obtain XSD document streams
Returns:
mapping between schema URI and the "captured" schema text (in byte form)
Throws:
XsdException

captureSchema

public static java.util.Map<java.net.URI,byte[]> captureSchema(java.net.URI systemURI,
                                                               java.lang.String schemaData,
                                                               org.apache.xerces.xni.parser.XMLEntityResolver resolver)
                                                        throws XsdException
Capture the schemas supplied by the reader. systemURI is required to resolve any relative uris encountered during the parse.

Parameters:
systemURI - Used to resolve relative uris.
schemaData - the top level schema.
resolver - entity resolver
Returns:
Throws:
XsdException