Package de.unistuttgart.ims.uima.io.xml
Class Visitor
java.lang.Object
de.unistuttgart.ims.uima.io.xml.Visitor
- All Implemented Interfaces:
org.jsoup.select.NodeVisitor
public class Visitor
extends java.lang.Object
implements org.jsoup.select.NodeVisitor
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,XMLElement>annotationMapMaps CSS selectors to XMLelementsprotected java.util.Map<org.jsoup.nodes.Node,java.lang.Integer>beginMapMaps XML nodes to the character position where they start in the CASprotected java.lang.String[]blockElementsAn array of block elements.protected org.apache.uima.fit.factory.JCasBuilderbuilderprotected java.util.function.Function<org.jsoup.nodes.Element,java.lang.Boolean>ignoreFunctionprotected booleanpreserveWhitespaceWhether to preserve the whitespace exactly as it is in the original. -
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected java.util.Map<java.lang.String,XMLElement>getAnnotationMap()protected java.lang.String[]getBlockElements()protected java.util.function.Function<org.jsoup.nodes.Element,java.lang.Boolean>getIgnoreFunction()protected org.apache.uima.jcas.JCasgetJCas()voidhead(org.jsoup.nodes.Node node, int depth)protected voidsetBlockElements(java.lang.String[] blockElements)protected voidsetIgnoreFunction(java.util.function.Function<org.jsoup.nodes.Element,java.lang.Boolean> ignoreFunction)voidtail(org.jsoup.nodes.Node node, int depth)
-
Field Details
-
builder
protected org.apache.uima.fit.factory.JCasBuilder builder -
beginMap
protected java.util.Map<org.jsoup.nodes.Node,java.lang.Integer> beginMapMaps XML nodes to the character position where they start in the CAS -
annotationMap
Maps CSS selectors to XMLelements -
blockElements
protected java.lang.String[] blockElementsAn array of block elements. IfpreserveWhitespaceis not true, newline characters are introduced at the end of each block element -
preserveWhitespace
protected boolean preserveWhitespaceWhether to preserve the whitespace exactly as it is in the original. This is needed for the XML->CAS->XML roundtrip. Defaults to false. -
ignoreFunction
protected java.util.function.Function<org.jsoup.nodes.Element,java.lang.Boolean> ignoreFunction
-
-
Constructor Details
-
Method Details
-
head
public void head(org.jsoup.nodes.Node node, int depth)- Specified by:
headin interfaceorg.jsoup.select.NodeVisitor
-
tail
public void tail(org.jsoup.nodes.Node node, int depth)- Specified by:
tailin interfaceorg.jsoup.select.NodeVisitor
-
getJCas
protected org.apache.uima.jcas.JCas getJCas() -
getAnnotationMap
-
getBlockElements
protected java.lang.String[] getBlockElements() -
setBlockElements
protected void setBlockElements(java.lang.String[] blockElements) -
getIgnoreFunction
protected java.util.function.Function<org.jsoup.nodes.Element,java.lang.Boolean> getIgnoreFunction() -
setIgnoreFunction
protected void setIgnoreFunction(java.util.function.Function<org.jsoup.nodes.Element,java.lang.Boolean> ignoreFunction)
-