org.apache.poi.xwpf.usermodel
Class XWPFHeaderFooter

java.lang.Object
  extended by org.apache.poi.POIXMLDocumentPart
      extended by org.apache.poi.xwpf.usermodel.XWPFHeaderFooter
Direct Known Subclasses:
XWPFFooter, XWPFHeader

public abstract class XWPFHeaderFooter
extends POIXMLDocumentPart

Parent of XWPF headers and footers


Field Summary
protected  org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr headerFooter
           
 
Fields inherited from class org.apache.poi.POIXMLDocumentPart
DEFAULT_XML_OPTIONS
 
Constructor Summary
protected XWPFHeaderFooter()
           
protected XWPFHeaderFooter(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr hdrFtr)
           
  XWPFHeaderFooter(PackagePart part, PackageRelationship rel)
           
 
Method Summary
 org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr _getHdrFtr()
           
 XWPFParagraph[] getParagraphs()
          Returns the paragraph(s) that holds the text of the header or footer.
 XWPFTable[] getTables()
          Return the table(s) that holds the text of the header or footer, for complex cases where a paragraph isn't used.
 java.lang.String getText()
          Returns the textual content of the header/footer, by flattening out the text of its paragraph(s)
 
Methods inherited from class org.apache.poi.POIXMLDocumentPart
addRelation, commit, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelations, onDocumentCreate, onDocumentRead, onSave, read, removeRelation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

headerFooter

protected org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr headerFooter
Constructor Detail

XWPFHeaderFooter

protected XWPFHeaderFooter(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr hdrFtr)

XWPFHeaderFooter

protected XWPFHeaderFooter()

XWPFHeaderFooter

public XWPFHeaderFooter(PackagePart part,
                        PackageRelationship rel)
                 throws java.io.IOException
Throws:
java.io.IOException
Method Detail

_getHdrFtr

@Internal
public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr _getHdrFtr()

getParagraphs

public XWPFParagraph[] getParagraphs()
Returns the paragraph(s) that holds the text of the header or footer. Normally there is only the one paragraph, but there could be more in certain cases, or a table.


getTables

public XWPFTable[] getTables()
Return the table(s) that holds the text of the header or footer, for complex cases where a paragraph isn't used. Normally there's just one paragraph, but some complex headers/footers have a table or two in addition.


getText

public java.lang.String getText()
Returns the textual content of the header/footer, by flattening out the text of its paragraph(s)



Copyright 2009 The Apache Software Foundation or its licensors, as applicable.