Class FrequencyHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.sun.xml.analysis.frequency.FrequencyHandler
- All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
A SAX-based handler to collect the frequency of occurences of properties
of information items in one or more infosets.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FrequencySet<QName> private FrequencySet<String> private FrequencySet<QName> private FrequencySet<String> private FrequencySet<String> private StringBuilderprivate charprivate FrequencySet<String> private FrequencySet<String> -
Constructor Summary
ConstructorsConstructorDescriptionThe default frequency handler.A frequency handler initiated with information generated from aSchemaProcessor. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidvoidvoidvoidprivate voidprivate QNamecreateQName(String uri, String localName, String qName) voidGenerate qualified names that have not been processed.private voidgenerateQNamesWithPrefix(Map<String, Set<QName>> m, FrequencySet<QName> fhm, Map<String, String> namespaceURIToPrefix) getLists()Deprecated.private Stringorg.jvnet.fastinfoset.VocabularyGet the vocabularyvoidstartElement(String uri, String localName, String qName, Attributes atts) voidstartPrefixMapping(String prefix, String uri) Methods inherited from class DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, unparsedEntityDecl, warning
-
Field Details
-
namespacesToElements
-
namespacesToAttributes
-
namespaceURIToPrefix
-
prefixes
-
namespaces
-
localNames
-
elements
-
attributes
-
attributeValues
-
textContentValues
-
prefixBuilder
-
prefixCharacter
private char prefixCharacter
-
-
Constructor Details
-
FrequencyHandler
public FrequencyHandler()The default frequency handler. -
FrequencyHandler
A frequency handler initiated with information generated from aSchemaProcessor.- Parameters:
sp- the schema processor.
-
-
Method Details
-
addXsiAttributes
public void addXsiAttributes() -
addQNameToElements
-
addQNameToAttributes
-
getLists
Deprecated.Get the frequency based lists of properties of information items.- Returns:
- the frequency based lists.
-
getVocabulary
public org.jvnet.fastinfoset.Vocabulary getVocabulary()Get the vocabulary- Returns:
- the vocabulary.
-
generateQNamesWithPrefix
public void generateQNamesWithPrefix()Generate qualified names that have not been processed.Prefixes are automatically chosen.
TODO: check for clashes with prefixes generated and prefixes that have already occured.
-
getNamespaceURIToPrefixMap
-
addAll
-
bucketQNamesToNamespace
-
startPrefixMapping
- Specified by:
startPrefixMappingin interfaceContentHandler- Overrides:
startPrefixMappingin classDefaultHandler- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
addQName
-
createQName
-
generateQNamesWithPrefix
-
getNewPrefix
-