Class SchemaProcessor

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

public class SchemaProcessor extends Object
A Schema processor that collects the namespaces, local names, elements and attributes declared in a set of schema. TODO: add default values for attribute/element simple content. : enums used for attribute/element simple content
  • Field Details

    • _stringComparator

      private SchemaProcessor.StringComparator _stringComparator
    • _qNameComparator

      private SchemaProcessor.QNameComparator _qNameComparator
    • elements

      Set<QName> elements
      The set of elements declared in the schema
    • attributes

      Set<QName> attributes
      The set of attributes declared in the schema
    • localNames

      Set<String> localNames
      The set of local names declared in the schema
    • namespaces

      Set<String> namespaces
      The set of namespaces declared in the schema
    • prefixes

      Set<String> prefixes
      The set of generated prefixes
    • attributeValues

      Set<String> attributeValues
      The set of default values and enum values for attributes declared in the schema
    • textContentValues

      Set<String> textContentValues
      The set of default values and enums values for text content declared in the schema
    • _schema

      private List<URL> _schema
    • _collectValues

      private boolean _collectValues
    • _generatePrefixes

      private boolean _generatePrefixes
    • _namespaceToPrefix

      private Map<String,String> _namespaceToPrefix
    • _generatedPrefix

      private String _generatedPrefix
  • Constructor Details

    • SchemaProcessor

      public SchemaProcessor(URL schema)
    • SchemaProcessor

      public SchemaProcessor(URL schema, boolean collectValues, boolean generatePrefixes)
    • SchemaProcessor

      public SchemaProcessor(List<URL> schema)
    • SchemaProcessor

      public SchemaProcessor(List<URL> schema, boolean collectValues, boolean generatePrefixes)
  • Method Details

    • process

      public void process() throws Exception
      Process the schema to produce the set of properties of information items.
      Throws:
      Exception
    • addAttribute

      private void addAttribute(com.sun.xml.xsom.XSDeclaration d)
    • addElement

      private void addElement(com.sun.xml.xsom.XSDeclaration d)
    • addNamespaceLocalNameAndPrefix

      private void addNamespaceLocalNameAndPrefix(QName q)
    • addAttributeValue

      private void addAttributeValue(String s)
    • addTextContentValue

      private void addTextContentValue(String s)
    • getQName

      private QName getQName(com.sun.xml.xsom.XSDeclaration d)
    • nextGeneratedPrefix

      private void nextGeneratedPrefix()
    • hasProcessibleNamespaceURI

      private boolean hasProcessibleNamespaceURI(String namespaceURI)
    • print

      private void print()
    • main

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