Package org.opencypher.tools.xml
Class XmlGenerator
- java.lang.Object
-
- org.opencypher.tools.xml.XmlGenerator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classXmlGenerator.AttributesBuilder
-
Constructor Summary
Constructors Constructor Description XmlGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected XmlGenerator.AttributesBuilderattribute(String name, String value)protected XmlGenerator.AttributesBuilderattribute(String prefix, String name, String value)protected voidcharacters(char[] ch, int start, int length)protected voidcharacters(CharSequence content)protected voidcomment(CharSequence content)protected voidendDocument()protected voidendElement(String localName)protected voidendElement(String prefix, String localName)protected voidendElementSameLine(String prefix, String localName)protected voidendPrefixMapping(String prefix)protected abstract voidgenerate()protected static Documentgenerate(XmlGenerator generator)protected static voidgenerate(XmlGenerator generator, OutputStream stream)protected static voidgenerate(XmlGenerator generator, Writer writer)ContentHandlergetContentHandler()DTDHandlergetDTDHandler()EntityResolvergetEntityResolver()ErrorHandlergetErrorHandler()booleangetFeature(String name)ObjectgetProperty(String name)voidparse(String systemId)voidparse(InputSource input)protected voidprintln(CharSequence content)voidsetContentHandler(ContentHandler handler)voidsetDTDHandler(DTDHandler handler)voidsetEntityResolver(EntityResolver resolver)voidsetErrorHandler(ErrorHandler handler)voidsetFeature(String name, boolean value)voidsetProperty(String name, Object value)protected voidstartDocument()protected voidstartElement(String localName)protected voidstartElement(String prefix, String localName)protected voidstartElement(String prefix, String localName, Attributes attributes)protected voidstartElement(String localName, Attributes attributes)protected voidstartPrefixMapping(String prefix, String uri)
-
-
-
Method Detail
-
generate
protected static void generate(XmlGenerator generator, Writer writer) throws TransformerException
- Throws:
TransformerException
-
generate
protected static void generate(XmlGenerator generator, OutputStream stream) throws TransformerException
- Throws:
TransformerException
-
generate
protected static Document generate(XmlGenerator generator) throws TransformerException
- Throws:
TransformerException
-
getFeature
public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getFeaturein interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
setFeature
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
setFeaturein interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
getProperty
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getPropertyin interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
setProperty
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
setPropertyin interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
setEntityResolver
public void setEntityResolver(EntityResolver resolver)
- Specified by:
setEntityResolverin interfaceXMLReader
-
getEntityResolver
public EntityResolver getEntityResolver()
- Specified by:
getEntityResolverin interfaceXMLReader
-
setDTDHandler
public void setDTDHandler(DTDHandler handler)
- Specified by:
setDTDHandlerin interfaceXMLReader
-
getDTDHandler
public DTDHandler getDTDHandler()
- Specified by:
getDTDHandlerin interfaceXMLReader
-
setContentHandler
public void setContentHandler(ContentHandler handler)
- Specified by:
setContentHandlerin interfaceXMLReader
-
getContentHandler
public ContentHandler getContentHandler()
- Specified by:
getContentHandlerin interfaceXMLReader
-
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
- Specified by:
setErrorHandlerin interfaceXMLReader
-
getErrorHandler
public ErrorHandler getErrorHandler()
- Specified by:
getErrorHandlerin interfaceXMLReader
-
parse
public void parse(InputSource input) throws IOException, SAXException
- Specified by:
parsein interfaceXMLReader- Throws:
IOExceptionSAXException
-
parse
public void parse(String systemId) throws IOException, SAXException
- Specified by:
parsein interfaceXMLReader- Throws:
IOExceptionSAXException
-
generate
protected abstract void generate() throws SAXException- Throws:
SAXException
-
attribute
protected final XmlGenerator.AttributesBuilder attribute(String name, String value)
-
attribute
protected final XmlGenerator.AttributesBuilder attribute(String prefix, String name, String value)
-
startDocument
protected final void startDocument() throws SAXException- Throws:
SAXException
-
endDocument
protected final void endDocument() throws SAXException- Throws:
SAXException
-
startPrefixMapping
protected final void startPrefixMapping(String prefix, String uri) throws SAXException
- Throws:
SAXException
-
endPrefixMapping
protected final void endPrefixMapping(String prefix) throws SAXException
- Throws:
SAXException
-
startElement
protected final void startElement(String localName) throws SAXException
- Throws:
SAXException
-
startElement
protected final void startElement(String localName, Attributes attributes) throws SAXException
- Throws:
SAXException
-
startElement
protected final void startElement(String prefix, String localName) throws SAXException
- Throws:
SAXException
-
comment
protected final void comment(CharSequence content) throws SAXException
- Throws:
SAXException
-
startElement
protected final void startElement(String prefix, String localName, Attributes attributes) throws SAXException
- Throws:
SAXException
-
endElement
protected final void endElement(String localName) throws SAXException
- Throws:
SAXException
-
endElement
protected final void endElement(String prefix, String localName) throws SAXException
- Throws:
SAXException
-
endElementSameLine
protected final void endElementSameLine(String prefix, String localName) throws SAXException
- Throws:
SAXException
-
println
protected final void println(CharSequence content) throws SAXException
- Throws:
SAXException
-
characters
protected final void characters(CharSequence content) throws SAXException
- Throws:
SAXException
-
characters
protected final void characters(char[] ch, int start, int length) throws SAXException- Throws:
SAXException
-
-