org.docx4j.openpackaging.parts
Class Dom4jXmlPart

java.lang.Object
  extended by org.docx4j.openpackaging.Base
      extended by org.docx4j.openpackaging.parts.Part
          extended by org.docx4j.openpackaging.parts.Dom4jXmlPart
Direct Known Subclasses:
AlternativeFormatInputPart, CommentsPart, CustomXmlPropertiesPart, DefaultXmlPart, DocumentSettingsPart, EndnotesPart, FooterPart, FootnotesPart, HeaderPart, RelationshipsPart, WebSettingsPart

public abstract class Dom4jXmlPart
extends Part

OPC Parts are either XML, or binary (or text) documents. Most are XML documents. docx4j aims to represent XML parts using JAXB. However, at present we only have a JAXB representation for the main document part. Until such time as a JAXB representation for an XML Part exists, the Part should extend this class.


Field Summary
 org.dom4j.Document document
          This part's XML contents.
 
Fields inherited from class org.docx4j.openpackaging.Base
partName
 
Constructor Summary
Dom4jXmlPart(PartName partName)
           
 
Method Summary
abstract  org.dom4j.Document getDocument()
           
 org.w3c.dom.Document getW3cDocument()
           
 void setDocument(java.io.InputStream in)
           
 
Methods inherited from class org.docx4j.openpackaging.parts.Part
getOwningRelationshipPart, getPackage, getRelationshipType, setOwningRelationshipPart, setPackage, setPartShortcut, setRelationshipType
 
Methods inherited from class org.docx4j.openpackaging.Base
addTargetPart, getContentType, getPartName, getRelationshipsPart, setContentType, setRelationships
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

document

public org.dom4j.Document document
This part's XML contents. Not guaranteed to be up to date. Whether it is or not will depend on how the class which extends Part chooses to treat it. It may be that the class uses some other internal representation for its data.

Constructor Detail

Dom4jXmlPart

public Dom4jXmlPart(PartName partName)
             throws InvalidFormatException
Throws:
InvalidFormatException
Method Detail

getDocument

public abstract org.dom4j.Document getDocument()

getW3cDocument

public org.w3c.dom.Document getW3cDocument()

setDocument

public void setDocument(java.io.InputStream in)