Class RelaxNGDataModel


  • public class RelaxNGDataModel
    extends java.lang.Object
    This class models a RelaxNG schema's data model as described by RelaxNG spec. This model can describe either a XMP packet composed of multiple XMP schemas or a single XMP schema. This class provides functionality to traverse the RelaxNG data model to construct the XMP schemas represeted by the model.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      SchemaDescription constructXMPSchema​(SchemaGenerationHandler handler)
      Gets the schema which is represented by this RelaxNGDataModel
      static RelaxNGDataModel newInstance​(java.net.URI rngFile, org.xml.sax.EntityResolver er)
      Construct a RelaxNGDataModel which models the input RelaxNG schema.
      static RelaxNGDataModel newInstance​(java.net.URI rngFile, org.xml.sax.EntityResolver er, org.xml.sax.ErrorHandler eh)
      Construct a RelaxNGDataModel which models the input RelaxNG schema.
      static RelaxNGDataModel newInstance​(org.xml.sax.InputSource is, org.xml.sax.EntityResolver er)
      Construct a RelaxNGDataModel which models the input RelaxNG schema.
      static RelaxNGDataModel newInstance​(org.xml.sax.InputSource is, org.xml.sax.EntityResolver er, org.xml.sax.ErrorHandler eh)
      Construct a RelaxNGDataModel which models the input RelaxNG schema.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • newInstance

        public static RelaxNGDataModel newInstance​(java.net.URI rngFile,
                                                   org.xml.sax.EntityResolver er)
                                            throws RNGParseException,
                                                   RNGInvalidSchemaException,
                                                   java.net.MalformedURLException,
                                                   java.io.IOException
        Construct a RelaxNGDataModel which models the input RelaxNG schema.
        Parameters:
        rngFile - File representing the RelaxNG schema
        er - A RelaxNG schema references and includes multiple other files. This enity resolver should define how these dependecies should be located by RelaxNG schema parser.
        Returns:
        RelaxNGDataModel
        Throws:
        RNGParseException - If a exception occured while
        RNGInvalidSchemaException - If the input RelaxNg schema voilates RNG spec
        java.io.IOException - if rngFile cannot be resolved or loaded
        java.net.MalformedURLException - If URI is malformed
      • newInstance

        public static RelaxNGDataModel newInstance​(java.net.URI rngFile,
                                                   org.xml.sax.EntityResolver er,
                                                   org.xml.sax.ErrorHandler eh)
                                            throws RNGInvalidSchemaException,
                                                   java.net.MalformedURLException,
                                                   java.io.IOException
        Construct a RelaxNGDataModel which models the input RelaxNG schema.
        Parameters:
        rngFile - File representing the RelaxNG schema
        er - A RelaxNG schema references and includes multiple other files. This entity resolver should define how these dependencies should be located by RelaxNG schema parser.
        eh - ErrorHandler to handle error call backs generated by RelaxNG schema parser
        Returns:
        RelaxNGDataModel
        Throws:
        RNGInvalidSchemaException - If the input RelaxNg schema violates RNG spec
        java.net.MalformedURLException - If URI is malformed
        java.io.IOException - if rngFile cannot be resolved or loaded
      • newInstance

        public static RelaxNGDataModel newInstance​(org.xml.sax.InputSource is,
                                                   org.xml.sax.EntityResolver er)
                                            throws RNGInvalidSchemaException
        Construct a RelaxNGDataModel which models the input RelaxNG schema.
        Parameters:
        is - InputSource representing the RelaxNG schema
        er - A RelaxNG schema references and includes multiple other files. This entity resolver should define how these dependencies should be located by RelaxNG schema parser.
        Returns:
        RelaxNGDataModel
        Throws:
        RNGInvalidSchemaException - If the input RelaxNg schema violates RNG spec
      • newInstance

        public static RelaxNGDataModel newInstance​(org.xml.sax.InputSource is,
                                                   org.xml.sax.EntityResolver er,
                                                   org.xml.sax.ErrorHandler eh)
                                            throws RNGInvalidSchemaException
        Construct a RelaxNGDataModel which models the input RelaxNG schema.
        Parameters:
        is - InputSource representing the RelaxNG schema
        er - A RelaxNG schema references and includes multiple other files. This enity resolver should define how these dependecies should be located by RelaxNG schema parser.
        eh - ErrorHandler to handle error call backs generated by RelaxNG schema parser
        Returns:
        RelaxNGDataModel
        Throws:
        RNGInvalidSchemaException - If the input RelaxNg schema voilates RNG spec