org.dom4j.jaxb
public class JAXBModifier extends JAXBSupport
See Also: SAXModifier
Constructor Summary | |
---|---|
JAXBModifier(String contextPath)
Creates a new JAXBModifier for the given JAXB context path. | |
JAXBModifier(String contextPath, ClassLoader classloader)
Creates a new JAXBModifier for the given JAXB context path, using the
given {@link java.lang.ClassLoader}. | |
JAXBModifier(String contextPath, OutputFormat outputFormat)
Creates a new JAXBModifier for the given JAXB context path. | |
JAXBModifier(String contextPath, ClassLoader classloader, OutputFormat outputFormat)
Creates a new JAXBModifier for the given JAXB context path, using the
specified {@link java.lang.Classloader}. |
Method Summary | |
---|---|
void | addObjectModifier(String path, JAXBObjectModifier mod)
Adds the {@link JAXBObjectModifier}to be called when the specified xml
path is encounted while parsing the source.
|
boolean | isPruneElements()
Returns true when the modified {@link org.dom4j.Document}is not kept in
memory.
|
Document | modify(File source)
Parses the specified {@link java.io.File}with SAX
|
Document | modify(File source, Charset charset)
Parses the specified {@link java.io.File}with SAX, using the given
{@link java.nio.charset.Charset}.
|
Document | modify(InputSource source)
Parses the specified {@link org.xml.sax.InputSource}with SAX.
|
Document | modify(InputStream source)
Parses the specified {@link java.io.InputStream}with SAX.
|
Document | modify(InputStream source, String systemId)
Parses the specified {@link java.io.InputStream}with SAX.
|
Document | modify(Reader r)
Parses the specified {@link java.io.Reader}with SAX.
|
Document | modify(Reader source, String systemId)
Parses the specified {@link java.io.Reader}with SAX.
|
Document | modify(String url)
Parses the the given URL or filename.
|
Document | modify(URL source)
Parses the the given URL.
|
void | removeObjectModifier(String path)
Removes the {@link JAXBObjectModifier}from the event based processor,
for the specified element path.
|
void | resetObjectModifiers()
Removes all registered {@link JAXBObjectModifier}instances from the
event based processor. |
void | setOutput(File file)
Sets the Output to write the (modified) xml document to.
|
void | setOutput(OutputStream outputStream)
Sets the Output to write the (modified) xml document to.
|
void | setOutput(Writer writer)
Sets the Output to write the (modified) xml document to.
|
void | setPruneElements(boolean pruneElements)
Define whether the modified {@link org.dom4j.Document}must only be
written to the output and pruned from the DOM4J tree.
|
Parameters: contextPath JAXB context path to be used
See Also: javax.xml.bind.JAXBContext
Parameters: contextPath JAXB context path to be used classloader the classloader to use
See Also: javax.xml.bind.JAXBContext
Parameters: contextPath JAXB context path to be used outputFormat the DOM4J {@link org.dom4j.io.OutputFormat}to be used
See Also: javax.xml.bind.JAXBContext
Parameters: contextPath JAXB context path to be used classloader the class loader to be used to load JAXB outputFormat the DOM4J {@link org.dom4j.io.OutputFormat}to be used
See Also: javax.xml.bind.JAXBContext
Parameters: path the element path to listen for mod the modifier to register
Returns: Returns true if elements are pruned.
Parameters: source the file to parse
Returns: the resulting DOM4J document
Throws: DocumentException when an error occurs while parsing IOException when an error occurs while writing to the {@link org.dom4j.io.XMLWriter}
Parameters: source the file to parse charset the character set to use
Returns: the resulting DOM4J document
Throws: DocumentException when an error occurs while parsing IOException when an error occurs while writing to the {@link org.dom4j.io.XMLWriter}
Parameters: source the input source to parse
Returns: the resulting DOM4J document
Throws: DocumentException when an error occurs while parsing IOException when an error occurs while writing to the {@link org.dom4j.io.XMLWriter}
Parameters: source the inputstream to parse
Returns: the resulting DOM4J document
Throws: DocumentException when an error occurs while parsing IOException when an error occurs while writing to the {@link org.dom4j.io.XMLWriter}
Parameters: source the inputstream to parse systemId the URI of the given inputstream
Returns: the resulting DOM4J document
Throws: DocumentException when an error occurs while parsing IOException when an error occurs while writing to the {@link org.dom4j.io.XMLWriter}
Parameters: r the reader to use for parsing
Returns: the resulting DOM4J document
Throws: DocumentException when an error occurs while parsing IOException when an error occurs while writing to the {@link org.dom4j.io.XMLWriter}
Parameters: source the reader to parse systemId the URI of the given reader
Returns: the resulting DOM4J document
Throws: DocumentException when an error occurs while parsing IOException when an error occurs while writing to the {@link org.dom4j.io.XMLWriter}
Parameters: url the URL or filename to parse
Returns: the resulting DOM4J document
Throws: DocumentException when an error occurs while parsing IOException when an error occurs while writing to the {@link org.dom4j.io.XMLWriter}
Parameters: source the URL to parse
Returns: the resulting DOM4J document
Throws: DocumentException when an error occurs while parsing IOException when an error occurs while writing to the {@link org.dom4j.io.XMLWriter}
Parameters: path the xml path to remove the modifier for
Parameters: file the {@link java.io.File}to write to
Throws: IOException when the file cannot be found or when the outputformat
Parameters: outputStream the {@link java.io.OutputStream}to write to
Throws: IOException when an error occurs
Parameters: writer the {@link java.io.Writer}to write to
Throws: IOException when an error occurs
Parameters: pruneElements When true, elements will not be kept in memory