Package org.mycore.common.content
Class MCRDOMContent
java.lang.Object
org.mycore.common.content.MCRContent
org.mycore.common.content.MCRXMLContent
org.mycore.common.content.MCRDOMContent
Reads MCRContent from a W3C DOM XML document.
- Author:
- Frank Lützenkichen
-
Field Summary
Fields inherited from class org.mycore.common.content.MCRXMLContent
defaultFormat, format
Fields inherited from class org.mycore.common.content.MCRContent
docType, encoding, lastModified, length, mimeType, name, systemId, usingSession
-
Constructor Summary
-
Method Summary
Methods inherited from class org.mycore.common.content.MCRXMLContent
ensureXML, getETag, getInputStream, getMimeType, length, setEncoding, setFormat
Methods inherited from class org.mycore.common.content.MCRContent
asByteArray, asDataURL, asString, getContentInputStream, getDataURLEncoding, getDocType, getEncoding, getInputSource, getName, getReadableByteChannel, getReusableCopy, getSafeEncoding, getSimpleWeakETag, getSystemId, isReusable, isUsingSession, lastModified, sendTo, sendTo, sendTo, setDocType, setLastModified, setMimeType, setName, setUsingSession
-
Constructor Details
-
MCRDOMContent
- Parameters:
dom
- the W3C DOM XML document to read from
-
-
Method Details
-
getSource
Description copied from class:MCRContent
Return the content as Source- Overrides:
getSource
in classMCRContent
- Returns:
- content as Source
-
sendTo
Description copied from class:MCRContent
Sends content to the given OutputStream. The OutputStream is NOT automatically closed afterwards.- Overrides:
sendTo
in classMCRContent
- Parameters:
out
- the OutputStream to write the content to- Throws:
IOException
-
asXML
Description copied from class:MCRContent
Parses content, assuming it is XML, and returns the parsed document.- Overrides:
asXML
in classMCRContent
- Returns:
- the XML document parsed from content
- Throws:
JDOMException
-