org.docx4j.finders.RangeFinder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docx4j-core Show documentation
Show all versions of docx4j-core Show documentation
docx4j is a library which helps you to work with the Office Open
XML file format as used in docx
documents, pptx presentations, and xlsx spreadsheets.
package org.docx4j.finders;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import org.docx4j.XmlUtils;
import org.docx4j.TraversalUtil.CallbackImpl;
import org.docx4j.wml.CTBookmark;
import org.docx4j.wml.CTMarkupRange;
import org.docx4j.wml.Text;
import org.jvnet.jaxb2_commons.ppp.Child;
/**
* This is a simplified version of
* org.docx4j.model.datastorage.BookmarkRenumber.RangeTraverser
*/
public class RangeFinder extends CallbackImpl {
List starts = new ArrayList();
/**
* @return the starts
*/
public List getStarts() {
return starts;
}
List ends = new ArrayList();
/**
* @return the ends
*/
public List getEnds() {
return ends;
}
List refs = new ArrayList();
/**
* @return the refs
*/
public List getRefs() {
return refs;
}
String startElement;
String endElement;
public RangeFinder(String startElement, String endElement) {
this.startElement = "org.docx4j.wml." + startElement;
this.endElement = "org.docx4j.wml." + endElement;
}
@Override
public List