org.docx4j.finders.RangeFinder Maven / Gradle / Ivy
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