Class SchemaProcessor

java.lang.Object
com.sun.xml.analysis.types.SchemaProcessor

public class SchemaProcessor extends Object
A Schema processor that collects the XSD simple types of elements and attributes declarations.

Maps of element/attribute local name to a set of XSDataType are created when a schema is processed.

  • Field Details

  • Constructor Details

    • SchemaProcessor

      public SchemaProcessor(URL schema)
    • SchemaProcessor

      public SchemaProcessor(List<URL> schema)
  • Method Details

    • getElementToXSDataTypeMap

      public Map<String,Set<XSDataType>> getElementToXSDataTypeMap()
    • getAttributeToXSDataTypeMap

      public Map<String,Set<XSDataType>> getAttributeToXSDataTypeMap()
    • process

      public void process() throws Exception
      Process the schema.
      Throws:
      Exception
    • process

      public void process(Set<XSDataType> filter) throws Exception
      Process the schema.
      Parameters:
      filter - if not null only include elements/attributes with simple types if it is present in the Set of XS data type. Otherwise all elements/attributes with simple types are included.
      Throws:
      Exception
    • addToMap

      private void addToMap(Map<String,Set<XSDataType>> map, String localName, String typeName)
    • reset

      private void reset()
    • qname

      private QName qname(com.sun.xml.xsom.XSDeclaration d)
    • print

      private void print()
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception
    • createParserFactory

      private static SAXParserFactory createParserFactory() throws IllegalStateException
      Returns properly configured (e.g. security features) parser factory - namespaceAware == true - securityProcessing == is set based on security processing property, default is true
      Throws:
      IllegalStateException