Class TypedSAXBufferCreator
java.lang.Object
com.sun.xml.stream.buffer.AbstractCreatorProcessor
com.sun.xml.stream.buffer.AbstractCreator
com.sun.xml.fastinfoset.streambuffer.TypedSAXBufferCreator
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,LexicalHandler
public class TypedSAXBufferCreator
extends com.sun.xml.stream.buffer.AbstractCreator
implements EntityResolver, DTDHandler, ContentHandler, ErrorHandler, LexicalHandler
A creator of a
XMLStreamBuffer
that that produces the XML infoset
using a XMLReader
and converts text content and attribute values from
the lexical space to value space.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map
<String, Set<XSDataType>> The map of attribute local names to sets of types.protected Map
<String, Set<XSDataType>> The map of element local names to sets of types.protected String[]
protected int
protected boolean
protected AccessibleStringBuilder
protected Set
<XSDataType> Fields inherited from class com.sun.xml.stream.buffer.AbstractCreator
_buffer
Fields inherited from class com.sun.xml.stream.buffer.AbstractCreatorProcessor
_contentCharactersBuffer, _contentCharactersBufferPtr, _contentObjects, _contentObjectsPtr, _currentContentCharactersBufferFragment, _currentContentObjectFragment, _currentStructureFragment, _currentStructureStringFragment, _structure, _structurePtr, _structureStrings, _structureStringsPtr, CHAR_ARRAY_LENGTH_MEDIUM, CHAR_ARRAY_LENGTH_MEDIUM_SIZE, CHAR_ARRAY_LENGTH_SMALL, CHAR_ARRAY_LENGTH_SMALL_SIZE, CONTENT_TYPE_CHAR_ARRAY, CONTENT_TYPE_CHAR_ARRAY_COPY, CONTENT_TYPE_OBJECT, CONTENT_TYPE_STRING, FLAG_DOCUMENT_FRAGMENT, FLAG_PREFIX, FLAG_QUALIFIED_NAME, FLAG_URI, T_ATTRIBUTE, T_ATTRIBUTE_LN, T_ATTRIBUTE_LN_OBJECT, T_ATTRIBUTE_P_U_LN, T_ATTRIBUTE_P_U_LN_OBJECT, T_ATTRIBUTE_U_LN, T_ATTRIBUTE_U_LN_OBJECT, T_ATTRIBUTE_U_LN_QN, T_ATTRIBUTE_U_LN_QN_OBJECT, T_COMMENT, T_COMMENT_AS_CHAR_ARRAY, T_COMMENT_AS_CHAR_ARRAY_COPY, T_COMMENT_AS_CHAR_ARRAY_MEDIUM, T_COMMENT_AS_CHAR_ARRAY_SMALL, T_COMMENT_AS_STRING, T_DOCUMENT, T_DOCUMENT_FRAGMENT, T_ELEMENT, T_ELEMENT_LN, T_ELEMENT_P_U_LN, T_ELEMENT_U_LN, T_ELEMENT_U_LN_QN, T_END, T_END_OF_BUFFER, T_NAMESPACE_ATTRIBUTE, T_NAMESPACE_ATTRIBUTE_P, T_NAMESPACE_ATTRIBUTE_P_U, T_NAMESPACE_ATTRIBUTE_U, T_PROCESSING_INSTRUCTION, T_TEXT, T_TEXT_AS_CHAR_ARRAY, T_TEXT_AS_CHAR_ARRAY_COPY, T_TEXT_AS_CHAR_ARRAY_MEDIUM, T_TEXT_AS_CHAR_ARRAY_SMALL, T_TEXT_AS_OBJECT, T_TEXT_AS_STRING, T_UNEXPANDED_ENTITY_REFERENCE, TYPE_MASK, VALUE_TYPE_OBJECT, VALUE_TYPE_STRING
-
Constructor Summary
ConstructorsConstructorDescriptionTypedSAXBufferCreator
(Map<String, Set<XSDataType>> elements, Map<String, Set<XSDataType>> attributes) TypedSAXBufferCreator
(Map<String, Set<XSDataType>> elements, Map<String, Set<XSDataType>> attributes, com.sun.xml.stream.buffer.MutableXMLStreamBuffer buffer) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
cacheNamespaceAttribute
(String prefix, String uri) void
characters
(char[] ch, int start, int length) void
comment
(char[] ch, int start, int length) static com.sun.xml.stream.buffer.XMLStreamBuffer
create
(Map<String, Set<XSDataType>> elements, Map<String, Set<XSDataType>> attributes, InputStream in) com.sun.xml.stream.buffer.MutableXMLStreamBuffer
create
(XMLReader reader, InputStream in) com.sun.xml.stream.buffer.MutableXMLStreamBuffer
create
(XMLReader reader, InputStream in, String systemId) static com.sun.xml.stream.buffer.XMLStreamBuffer
createNewBufferFromXMLReader
(Map<String, Set<XSDataType>> elements, Map<String, Set<XSDataType>> attributes, XMLReader reader, InputStream in) static com.sun.xml.stream.buffer.XMLStreamBuffer
createNewBufferFromXMLReader
(Map<String, Set<XSDataType>> elements, Map<String, Set<XSDataType>> attributes, XMLReader reader, InputStream in, String systemId) void
endCDATA()
void
void
endDTD()
void
endElement
(String uri, String localName, String qName) void
void
endPrefixMapping
(String prefix) void
void
void
ignorableWhitespace
(char[] ch, int start, int length) void
notationDecl
(String name, String publicId, String systemId) void
processingInstruction
(String target, String data) void
reset()
resolveEntity
(String publicId, String systemId) void
setDocumentLocator
(Locator locator) void
skippedEntity
(String name) void
void
void
void
startElement
(String uri, String localName, String qName, Attributes attributes) void
startEntity
(String name) void
startPrefixMapping
(String prefix, String uri) private void
storeAttributes
(Attributes attributes) private void
private void
storeQualifiedName
(int item, String uri, String localName, String qName) private void
void
unparsedEntityDecl
(String name, String publicId, String systemId, String notationName) void
Methods inherited from class com.sun.xml.stream.buffer.AbstractCreator
createBuffer, getXMLStreamBuffer, increaseTreeCount, peekAtContentObject, resizeContentCharacters, resizeContentObjects, resizeStructure, resizeStructureStrings, setBuffer, setHasInternedStrings, setXMLStreamBuffer, storeContentCharacters, storeContentCharactersCopy, storeContentObject, storeContentString, storeStructure, storeStructureString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
_elements
The map of element local names to sets of types. -
_attributes
The map of attribute local names to sets of types. -
_namespaceAttributes
-
_namespaceAttributesPtr
protected int _namespaceAttributesPtr -
_textContent
-
_storeTextContent
protected boolean _storeTextContent -
_textContentTypes
-
-
Constructor Details
-
TypedSAXBufferCreator
public TypedSAXBufferCreator(Map<String, Set<XSDataType>> elements, Map<String, Set<XSDataType>> attributes) -
TypedSAXBufferCreator
public TypedSAXBufferCreator(Map<String, Set<XSDataType>> elements, Map<String, Set<XSDataType>> attributes, com.sun.xml.stream.buffer.MutableXMLStreamBuffer buffer)
-
-
Method Details
-
create
public static com.sun.xml.stream.buffer.XMLStreamBuffer create(Map<String, Set<XSDataType>> elements, Map<String, throws SAXException, IOException, ParserConfigurationExceptionSet<XSDataType>> attributes, InputStream in) -
createNewBufferFromXMLReader
public static com.sun.xml.stream.buffer.XMLStreamBuffer createNewBufferFromXMLReader(Map<String, Set<XSDataType>> elements, Map<String, throws SAXException, IOException, ParserConfigurationExceptionSet<XSDataType>> attributes, XMLReader reader, InputStream in) -
createNewBufferFromXMLReader
public static com.sun.xml.stream.buffer.XMLStreamBuffer createNewBufferFromXMLReader(Map<String, Set<XSDataType>> elements, Map<String, throws SAXException, IOException, ParserConfigurationExceptionSet<XSDataType>> attributes, XMLReader reader, InputStream in, String systemId) -
create
public com.sun.xml.stream.buffer.MutableXMLStreamBuffer create(XMLReader reader, InputStream in) throws IOException, SAXException - Throws:
IOException
SAXException
-
create
public com.sun.xml.stream.buffer.MutableXMLStreamBuffer create(XMLReader reader, InputStream in, String systemId) throws IOException, SAXException - Throws:
IOException
SAXException
-
reset
public void reset() -
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstruction
in interfaceContentHandler
- Throws:
SAXException
-
comment
- Specified by:
comment
in interfaceLexicalHandler
- Throws:
SAXException
-
storeTextContent
private void storeTextContent() -
cacheNamespaceAttribute
-
storeNamespaceAttributes
private void storeNamespaceAttributes() -
storeAttributes
-
storeQualifiedName
-
resolveEntity
- Specified by:
resolveEntity
in interfaceEntityResolver
- Throws:
IOException
SAXException
-
notationDecl
- Specified by:
notationDecl
in interfaceDTDHandler
- Throws:
SAXException
-
unparsedEntityDecl
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException - Specified by:
unparsedEntityDecl
in interfaceDTDHandler
- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocator
in interfaceContentHandler
-
endPrefixMapping
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
skippedEntity
- Specified by:
skippedEntity
in interfaceContentHandler
- Throws:
SAXException
-
startDTD
- Specified by:
startDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
endDTD
- Specified by:
endDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
startEntity
- Specified by:
startEntity
in interfaceLexicalHandler
- Throws:
SAXException
-
endEntity
- Specified by:
endEntity
in interfaceLexicalHandler
- Throws:
SAXException
-
startCDATA
- Specified by:
startCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
endCDATA
- Specified by:
endCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
warning
- Specified by:
warning
in interfaceErrorHandler
- Throws:
SAXException
-
error
- Specified by:
error
in interfaceErrorHandler
- Throws:
SAXException
-
fatalError
- Specified by:
fatalError
in interfaceErrorHandler
- Throws:
SAXException
-