public Part CreateFootnotesPartObject(String partName) throws InvalidFormatException { return new FootnotesPart(new PartName(partName)); }
@Override public String getMceIgnorable() { return this.getJaxbElement().getIgnorable(); }
public FootnotesPart(PartName partName) throws InvalidFormatException { super(partName); init(); }
public void init() { // Used if this Part is added to [Content_Types].xml setContentType(new org.docx4j.openpackaging.contenttype.ContentType( org.docx4j.openpackaging.contenttype.ContentTypes.WORDPROCESSINGML_FOOTNOTES)); // Used when this Part is added to a rels setRelationshipType(Namespaces.FOOTNOTES); }
if (footnotesPart == null) { // that'll be the case in this example footnotesPart = new FootnotesPart(); myDocumentPart.addTargetPart(footnotesPart); r2.getContent().add(rcontinuationseparatorWrapped); footnotesPart.setJaxbElement(footnotes);
@Override public RelationshipsPart getRelationshipsPart() { try { return myDocx.getFootnotesPart().getRelationshipsPart(); } catch (Docx4JException e) { e.printStackTrace(); return myDocx.getDocxDocument().getRelationshipsPart(); } }
for (CTFtnEdn ftnEdn : getFootnotesPart().getContents().getFootnote()) { if (ftnEdn.getId().compareTo(footnoteID) == 0) { return ftnEdn; p.getContent().add(r2); getFootnotesPart().getContents().getFootnote().add(ftnEdn); return ftnEdn;
public void init() { // Used if this Part is added to [Content_Types].xml setContentType(new org.docx4j.openpackaging.contenttype.ContentType( org.docx4j.openpackaging.contenttype.ContentTypes.WORDPROCESSINGML_FOOTNOTES)); // Used when this Part is added to a rels setRelationshipType(Namespaces.FOOTNOTES); }
@Override protected void setMceIgnorable(McIgnorableNamespaceDeclarator namespacePrefixMapper) { // NB if you add ignorable content, it is up to you to jaxbElement.setIgnorable correctly; see further McIgnorableNamespaceDeclarator // You don't need to worry about this if you are merely loading an existing part. namespacePrefixMapper.setMcIgnorable( this.getJaxbElement().getIgnorable() ); }
public Part CreateFootnotesPartObject(String partName) throws InvalidFormatException { return new FootnotesPart(new PartName(partName)); }
public FootnotesPart() throws InvalidFormatException { super(new PartName("/word/footnotes.xml")); init(); }
@Deprecated // see instead org.docx4j.convert.out.Converter public static Node getFootnote(WordprocessingMLPackage wmlPackage, String id) { CTFootnotes footnotes = wmlPackage.getMainDocumentPart().getFootnotesPart().getJaxbElement(); int pos = Integer.parseInt(id); // No @XmlRootElement on CTFtnEdn, so .. CTFtnEdn ftn = (CTFtnEdn)footnotes.getFootnote().get(pos); Document d = XmlUtils.marshaltoW3CDomDocument( ftn, Context.jc, Namespaces.NS_WORD12, "footnote", CTFtnEdn.class ); log.debug("Footnote " + id + ": " + XmlUtils.w3CDomNodeToString(d)); return d; }
public FootnotesPart(PartName partName) throws InvalidFormatException { super(partName); init(); }
public static Node getFootnote(AbstractWmlConversionContext context, String id) { WordprocessingMLPackage wmlPackage = context.getWmlPackage(); CTFootnotes footnotes = wmlPackage.getMainDocumentPart().getFootnotesPart().getJaxbElement(); int pos = Integer.parseInt(id); // No @XmlRootElement on CTFtnEdn, so .. CTFtnEdn ftn = (CTFtnEdn)footnotes.getFootnote().get(pos); Document d = XmlUtils.marshaltoW3CDomDocument( ftn, Context.jc, Namespaces.NS_WORD12, "footnote", CTFtnEdn.class ); if (log.isDebugEnabled()) { log.debug("Footnote " + id + ": " + XmlUtils.w3CDomNodeToString(d)); } return d; }
public FootnotesPart() throws InvalidFormatException { super(new PartName("/word/footnotes.xml")); init(); }
public static Node getFootnotes(AbstractWmlConversionContext context) { return XmlUtils.marshaltoW3CDomDocument( context.getWmlPackage().getMainDocumentPart().getFootnotesPart().getJaxbElement()); }
((FootnotesPart) relPart.getPart(rs)).getJaxbElement().getFootnote() ); } else if (Namespaces.COMMENTS.equals(rs.getType())) { elementList = new ArrayList();
((FootnotesPart) relPart.getPart(rs)).getJaxbElement().getFootnote() ); } else if (Namespaces.COMMENTS.equals(rs.getType())) { elementList = new ArrayList();
@Override protected void appendDocumentFooter( HTMLConversionContext conversionContext, Document document, Element documentRoot) throws Docx4JException { MainDocumentPart mainDocumentPart = conversionContext.getWmlPackage().getMainDocumentPart(); if (mainDocumentPart.hasFootnotesPart()) { appendFootnotesEndnotes( conversionContext, document, documentRoot, "footnotes", mainDocumentPart.getFootnotesPart(), mainDocumentPart.getFootnotesPart().getJaxbElement().getFootnote()); } if (mainDocumentPart.hasEndnotesPart()) { appendFootnotesEndnotes( conversionContext, document, documentRoot, "endnotes", mainDocumentPart.getEndNotesPart(), mainDocumentPart.getEndNotesPart().getJaxbElement().getEndnote()); } }
CTFootnotes footnotes= this.getFootnotesPart().getJaxbElement(); finder.walkJAXBElements(footnotes);