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>
annotationMap
Maps CSS selectors to XMLelementsprotected java.util.Map<org.jsoup.nodes.Node,java.lang.Integer>
beginMap
Maps XML nodes to the character position where they start in the CASprotected java.lang.String[]
blockElements
An array of block elements.protected org.apache.uima.fit.factory.JCasBuilder
builder
protected java.util.function.Function<org.jsoup.nodes.Element,java.lang.Boolean>
ignoreFunction
protected boolean
preserveWhitespace
Whether 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.JCas
getJCas()
void
head(org.jsoup.nodes.Node node, int depth)
protected void
setBlockElements(java.lang.String[] blockElements)
protected void
setIgnoreFunction(java.util.function.Function<org.jsoup.nodes.Element,java.lang.Boolean> ignoreFunction)
void
tail(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. IfpreserveWhitespace
is 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:
head
in interfaceorg.jsoup.select.NodeVisitor
-
tail
public void tail(org.jsoup.nodes.Node node, int depth)- Specified by:
tail
in 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)
-