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 aXMLStreamBufferthat that produces the XML infoset using aXMLReaderand converts text content and attribute values from the lexical space to value space.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Set<XSDataType>>_attributesThe map of attribute local names to sets of types.protected Map<String,Set<XSDataType>>_elementsThe map of element local names to sets of types.protected String[]_namespaceAttributesprotected int_namespaceAttributesPtrprotected boolean_storeTextContentprotected AccessibleStringBuilder_textContentprotected Set<XSDataType>_textContentTypes-
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
Constructors Constructor Description TypedSAXBufferCreator(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)voidcomment(char[] ch, int start, int length)static com.sun.xml.stream.buffer.XMLStreamBuffercreate(Map<String,Set<XSDataType>> elements, Map<String,Set<XSDataType>> attributes, InputStream in)com.sun.xml.stream.buffer.MutableXMLStreamBuffercreate(XMLReader reader, InputStream in)com.sun.xml.stream.buffer.MutableXMLStreamBuffercreate(XMLReader reader, InputStream in, String systemId)static com.sun.xml.stream.buffer.XMLStreamBuffercreateNewBufferFromXMLReader(Map<String,Set<XSDataType>> elements, Map<String,Set<XSDataType>> attributes, XMLReader reader, InputStream in)static com.sun.xml.stream.buffer.XMLStreamBuffercreateNewBufferFromXMLReader(Map<String,Set<XSDataType>> elements, Map<String,Set<XSDataType>> attributes, XMLReader reader, InputStream in, String systemId)voidendCDATA()voidendDocument()voidendDTD()voidendElement(String uri, String localName, String qName)voidendEntity(String name)voidendPrefixMapping(String prefix)voiderror(SAXParseException e)voidfatalError(SAXParseException e)voidignorableWhitespace(char[] ch, int start, int length)voidnotationDecl(String name, String publicId, String systemId)voidprocessingInstruction(String target, String data)voidreset()InputSourceresolveEntity(String publicId, String systemId)voidsetDocumentLocator(Locator locator)voidskippedEntity(String name)voidstartCDATA()voidstartDocument()voidstartDTD(String name, String publicId, String systemId)voidstartElement(String uri, String localName, String qName, Attributes attributes)voidstartEntity(String name)voidstartPrefixMapping(String prefix, String uri)voidunparsedEntityDecl(String name, String publicId, String systemId, String notationName)voidwarning(SAXParseException e)-
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
-
-
-
-
Field Detail
-
_elements
protected Map<String,Set<XSDataType>> _elements
The map of element local names to sets of types.
-
_attributes
protected Map<String,Set<XSDataType>> _attributes
The map of attribute local names to sets of types.
-
_namespaceAttributes
protected String[] _namespaceAttributes
-
_namespaceAttributesPtr
protected int _namespaceAttributesPtr
-
_textContent
protected AccessibleStringBuilder _textContent
-
_storeTextContent
protected boolean _storeTextContent
-
_textContentTypes
protected Set<XSDataType> _textContentTypes
-
-
Constructor Detail
-
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 Detail
-
create
public static com.sun.xml.stream.buffer.XMLStreamBuffer create(Map<String,Set<XSDataType>> elements, Map<String,Set<XSDataType>> attributes, InputStream in) throws SAXException, IOException, ParserConfigurationException
-
createNewBufferFromXMLReader
public static com.sun.xml.stream.buffer.XMLStreamBuffer createNewBufferFromXMLReader(Map<String,Set<XSDataType>> elements, Map<String,Set<XSDataType>> attributes, XMLReader reader, InputStream in) throws SAXException, IOException, ParserConfigurationException
-
createNewBufferFromXMLReader
public static com.sun.xml.stream.buffer.XMLStreamBuffer createNewBufferFromXMLReader(Map<String,Set<XSDataType>> elements, Map<String,Set<XSDataType>> attributes, XMLReader reader, InputStream in, String systemId) throws SAXException, IOException, ParserConfigurationException
-
create
public com.sun.xml.stream.buffer.MutableXMLStreamBuffer create(XMLReader reader, InputStream in) throws IOException, SAXException
- Throws:
IOExceptionSAXException
-
create
public com.sun.xml.stream.buffer.MutableXMLStreamBuffer create(XMLReader reader, InputStream in, String systemId) throws IOException, SAXException
- Throws:
IOExceptionSAXException
-
reset
public void reset()
-
startDocument
public void startDocument() throws SAXException- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException- Specified by:
charactersin interfaceContentHandler- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
comment
public void comment(char[] ch, int start, int length) throws SAXException- Specified by:
commentin interfaceLexicalHandler- Throws:
SAXException
-
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException
- Specified by:
resolveEntityin interfaceEntityResolver- Throws:
IOExceptionSAXException
-
notationDecl
public void notationDecl(String name, String publicId, String systemId) throws SAXException
- Specified by:
notationDeclin interfaceDTDHandler- Throws:
SAXException
-
unparsedEntityDecl
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException
- Specified by:
unparsedEntityDeclin interfaceDTDHandler- Throws:
SAXException
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocatorin interfaceContentHandler
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
skippedEntity
public void skippedEntity(String name) throws SAXException
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-
startDTD
public void startDTD(String name, String publicId, String systemId) throws SAXException
- Specified by:
startDTDin interfaceLexicalHandler- Throws:
SAXException
-
endDTD
public void endDTD() throws SAXException- Specified by:
endDTDin interfaceLexicalHandler- Throws:
SAXException
-
startEntity
public void startEntity(String name) throws SAXException
- Specified by:
startEntityin interfaceLexicalHandler- Throws:
SAXException
-
endEntity
public void endEntity(String name) throws SAXException
- Specified by:
endEntityin interfaceLexicalHandler- Throws:
SAXException
-
startCDATA
public void startCDATA() throws SAXException- Specified by:
startCDATAin interfaceLexicalHandler- Throws:
SAXException
-
endCDATA
public void endCDATA() throws SAXException- Specified by:
endCDATAin interfaceLexicalHandler- Throws:
SAXException
-
warning
public void warning(SAXParseException e) throws SAXException
- Specified by:
warningin interfaceErrorHandler- Throws:
SAXException
-
error
public void error(SAXParseException e) throws SAXException
- Specified by:
errorin interfaceErrorHandler- Throws:
SAXException
-
fatalError
public void fatalError(SAXParseException e) throws SAXException
- Specified by:
fatalErrorin interfaceErrorHandler- Throws:
SAXException
-
-