public Part CreateEndnotesPartObject(String partName) throws InvalidFormatException { return new EndnotesPart(new PartName(partName)); }
@Override public String getMceIgnorable() { return this.getJaxbElement().getIgnorable(); }
public EndnotesPart() throws InvalidFormatException { super(new PartName("/word/endnotes.xml")); 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_ENDNOTES)); // Used when this Part is added to a rels setRelationshipType(Namespaces.ENDNOTES); }
EndnotesPart ep = new EndnotesPart(); CTEndnotes endnotes = Context.getWmlObjectFactory().createCTEndnotes(); ep.setJaxbElement(endnotes); mlPackage.getMainDocumentPart().addTargetPart(ep);
EndnotesPart ep = new EndnotesPart(); endnotes = Context.getWmlObjectFactory().createCTEndnotes(); ep.setJaxbElement(endnotes); wordMLPackage.getMainDocumentPart().addTargetPart(ep); } catch (InvalidFormatException e1) {
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_ENDNOTES)); // Used when this Part is added to a rels setRelationshipType(Namespaces.ENDNOTES); }
@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 CreateEndnotesPartObject(String partName) throws InvalidFormatException { return new EndnotesPart(new PartName(partName)); }
public EndnotesPart() throws InvalidFormatException { super(new PartName("/word/endnotes.xml")); init(); }
/** * Does this package contain an endnotes part, with real endnotes * in it? * @return */ public boolean hasEndnotesPart() { if (getEndNotesPart()==null) { return false; } else { // Word seems to add an endnotes part when it adds a footnotes part, // so existence of part is not determinative CTEndnotes endnotes = getEndNotesPart().getJaxbElement(); if (endnotes.getEndnote().size()<3) { // id's 0 & 1 are: // <w:endnote w:type="separator" w:id="0"> // <w:endnote w:type="continuationSeparator" w:id="1"> return false; } return true; } }
public static Node getEndnotes(AbstractWmlConversionContext context) { return XmlUtils.marshaltoW3CDomDocument( context.getWmlPackage().getMainDocumentPart().getEndNotesPart().getJaxbElement()); }
((EndnotesPart) relPart.getPart(rs)).getJaxbElement().getEndnote() ); } else if (Namespaces.FOOTNOTES.equals(rs.getType())) {
((EndnotesPart) relPart.getPart(rs)).getJaxbElement().getEndnote() ); } else if (Namespaces.FOOTNOTES.equals(rs.getType())) {
@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()); } }
CTEndnotes endnotes= this.getEndNotesPart().getJaxbElement(); finder.walkJAXBElements(endnotes);
CTEndnotes endnotes= this.getEndNotesPart().getJaxbElement(); finder.walkJAXBElements(endnotes);
@Override public String getMceIgnorable() { return this.getJaxbElement().getIgnorable(); }
@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() ); }
/** * Does this package contain an endnotes part, with real endnotes * in it? * @return */ public boolean hasEndnotesPart() { if (getEndNotesPart()==null) { return false; } else { // Word seems to add an endnotes part when it adds a footnotes part, // so existence of part is not determinative CTEndnotes endnotes = getEndNotesPart().getJaxbElement(); if (endnotes.getEndnote().size()<3) { // id's 0 & 1 are: // <w:endnote w:type="separator" w:id="0"> // <w:endnote w:type="continuationSeparator" w:id="1"> return false; } return true; } }