JAXBObjectHandlerobjects can be registered to automatically receive
unmarshalled XML fragments. Registered org.dom4j.ElementHandler
implementations are notified when a certain element path is encountered
org.dom4j.io.SAXReader , javax.xml.bind.JAXBContext
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private SAXReader |
| Access | Constructor and Description |
|---|---|
| public | JAXBReader(String
context path to be used contextPath)Creates a new JAXBReader for the given JAXB context path. |
| public | JAXBReader(String
to be used contextPath, ClassLoader to be used classloader)Creates a new JAXBReader for the given JAXB context path, using the
specified |
| Modifier and Type | Method and Description |
|---|---|
| public void | addHandler(String
is the path to be handled path, ElementHandler is the handler)ElementHandler to be called by the event
based processor.Adds the |
| public void | addObjectHandler(String
the path to listen for path, JAXBObjectHandler the handler to be notified handler)Registers a |
| private SAXReader | |
| public boolean | Returns: Returns the pruneElements.When 'true', the DOM4J document will not be kept in memory while parsing. |
| public Document | Returns: the resulting DOM4J documentthe file to parse source)Parses the specified |
| public Document | Returns: the resulting DOM4J documentthe file to parse file, Charset the charset to be used charset)Parses the specified |
| public Document | Returns: the resulting DOM4J documentthe source to parse source)Parses the specified |
| public Document | Returns: the resulting DOM4J documentthe input stream to parse source)Parses the specified |
| public Document | Returns: the resulting DOM4J documentthe input stream to parse source, String is the URI for the input systemId)Parses the specified |
| public Document | Returns: the resulting DOM4J documentthe input reader to use source)Parses the specified |
| public Document | Returns: the resulting DOM4J documentthe input reader to parse source, String is the URI for the input systemId)Parses the specified |
| public Document | |
| public Document | |
| public void | removeHandler(String
is the path to remove the path)ElementHandler for.Removes the |
| public void | removeObjectHandler(String
The path to remove the path)JAXBObjectHandlerforRemoves the |
| public void | resetHandlers()
Removes all registered |
| public void | setPruneElements(boolean
DOCUMENT ME! pruneElements)Set to true when DOM4J elements must immediately be pruned from the tree. |
| pruneElements | back to summary |
|---|---|
| private boolean pruneElements | |
| reader | back to summary |
|---|---|
| private SAXReader reader | |
| JAXBReader | back to summary |
|---|---|
| public JAXBReader(String contextPath) Creates a new JAXBReader for the given JAXB context path. This is the Java package where JAXB can find the generated XML classes. This package MUST contain jaxb.properties!
| |
| JAXBReader | back to summary |
|---|---|
| public JAXBReader(String contextPath, ClassLoader classloader) Creates a new JAXBReader for the given JAXB context path, using the
specified
| |
| addHandler | back to summary |
|---|---|
| public void addHandler(String path, ElementHandler handler) Adds the
| |
| addObjectHandler | back to summary |
|---|---|
| public void addObjectHandler(String path, JAXBObjectHandler handler) Registers a
| |
| getReader | back to summary |
|---|---|
| private SAXReader getReader() | |
| isPruneElements | back to summary |
|---|---|
| public boolean isPruneElements() When 'true', the DOM4J document will not be kept in memory while parsing.
| |
| read | back to summary |
|---|---|
| public Document read(File source) throws DocumentException Parses the specified
| |
| read | back to summary |
|---|---|
| public Document read(File file, Charset charset) throws DocumentException Parses the specified
| |
| read | back to summary |
|---|---|
| public Document read(InputSource source) throws DocumentException Parses the specified
| |
| read | back to summary |
|---|---|
| public Document read(InputStream source) throws DocumentException Parses the specified
| |
| read | back to summary |
|---|---|
| public Document read(InputStream source, String systemId) throws DocumentException Parses the specified
| |
| read | back to summary |
|---|---|
| public Document read(Reader source) throws DocumentException Parses the specified
| |
| read | back to summary |
|---|---|
| public Document read(Reader source, String systemId) throws DocumentException Parses the specified
| |
| read | back to summary |
|---|---|
| public Document read(String source) throws DocumentException Parses the the given URL or filename.
| |
| read | back to summary |
|---|---|
| public Document read(URL source) throws DocumentException Parses the the given URL.
| |
| removeHandler | back to summary |
|---|---|
| public void removeHandler(String path) Removes the
| |
| removeObjectHandler | back to summary |
|---|---|
| public void removeObjectHandler(String path) Removes the
| |
| resetHandlers | back to summary |
|---|---|
| public void resetHandlers() Removes all registered | |
| setPruneElements | back to summary |
|---|---|
| public void setPruneElements(boolean pruneElements) Set to true when DOM4J elements must immediately be pruned from the tree.
The
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | onEnd(ElementPath
is the current elementPath)ElementPath to processImplements org. |
| public void | onStart(ElementPath
is the current parm1)ElementPath to processImplements org. |
| PruningElementHandler | back to summary |
|---|---|
| public PruningElementHandler() | |
| onEnd | back to summary |
|---|---|
| public void onEnd(ElementPath elementPath) Implements org. Doc from org. Called by an event based processor when an elements closing tag is encountered.
| |
| onStart | back to summary |
|---|---|
| public void onStart(ElementPath parm1) Implements org. Doc from org. Called by an event based processor when an elements openning tag is encountered.
| |
| Modifier and Type | Field and Description |
|---|---|
| private JAXBObjectHandler | |
| private JAXBReader |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | onEnd(ElementPath
is the current elementPath)ElementPath to processImplements org. |
| public void | onStart(ElementPath
is the current elementPath)ElementPath to processImplements org. |
| handler | back to summary |
|---|---|
| private JAXBObjectHandler handler | |
| jaxbReader | back to summary |
|---|---|
| private JAXBReader jaxbReader | |
| UnmarshalElementHandler | back to summary |
|---|---|
| public UnmarshalElementHandler(JAXBReader documentReader, JAXBObjectHandler handler) | |
| onEnd | back to summary |
|---|---|
| public void onEnd(ElementPath elementPath) Implements org. Doc from org. Called by an event based processor when an elements closing tag is encountered.
| |
| onStart | back to summary |
|---|---|
| public void onStart(ElementPath elementPath) Implements org. Doc from org. Called by an event based processor when an elements openning tag is encountered.
| |