Package com.sun.xml.analysis.frequency
Class SchemaProcessor
java.lang.Object
com.sun.xml.analysis.frequency.SchemaProcessor
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private class
private static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private String
private boolean
private SchemaProcessor.QNameComparator
private SchemaProcessor.StringComparator
The set of attributes declared in the schemaThe set of default values and enum values for attributes declared in the schemaThe set of elements declared in the schemaThe set of local names declared in the schemaThe set of namespaces declared in the schemaThe set of generated prefixesThe set of default values and enums values for text content declared in the schema -
Constructor Summary
ConstructorsConstructorDescriptionSchemaProcessor
(URL schema) SchemaProcessor
(URL schema, boolean collectValues, boolean generatePrefixes) SchemaProcessor
(List<URL> schema) SchemaProcessor
(List<URL> schema, boolean collectValues, boolean generatePrefixes) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addAttribute
(com.sun.xml.xsom.XSDeclaration d) private void
private void
addElement
(com.sun.xml.xsom.XSDeclaration d) private void
private void
private QName
getQName
(com.sun.xml.xsom.XSDeclaration d) private boolean
hasProcessibleNamespaceURI
(String namespaceURI) static void
private void
private void
print()
void
process()
Process the schema to produce the set of properties of information items.
-
Field Details
-
_stringComparator
-
_qNameComparator
-
elements
The set of elements declared in the schema -
attributes
The set of attributes declared in the schema -
localNames
The set of local names declared in the schema -
namespaces
The set of namespaces declared in the schema -
prefixes
The set of generated prefixes -
attributeValues
The set of default values and enum values for attributes declared in the schema -
textContentValues
The set of default values and enums values for text content declared in the schema -
_schema
-
_collectValues
private boolean _collectValues -
_generatePrefixes
private boolean _generatePrefixes -
_namespaceToPrefix
-
_generatedPrefix
-
-
Constructor Details
-
SchemaProcessor
-
SchemaProcessor
-
SchemaProcessor
-
SchemaProcessor
-
-
Method Details
-
process
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
-
addAttributeValue
-
addTextContentValue
-
getQName
-
nextGeneratedPrefix
private void nextGeneratedPrefix() -
hasProcessibleNamespaceURI
-
print
private void print() -
main
- Throws:
Exception
-