T
- Rules are specific for a UIMA typepublic static class GenericXmlReader.Rule<T extends org.apache.uima.jcas.cas.TOP> extends Object
Constructor | Description |
---|---|
Rule(String selector,
Class<T> targetClass,
java.util.function.BiConsumer<T,org.jsoup.nodes.Element> callback) |
|
Rule(String selector,
Class<T> targetClass,
java.util.function.BiConsumer<T,org.jsoup.nodes.Element> callback,
boolean global) |
Modifier and Type | Method | Description |
---|---|---|
java.util.function.BiConsumer<T,org.jsoup.nodes.Element> |
getCallback() |
|
String |
getSelector() |
|
Class<T> |
getTargetClass() |
|
boolean |
isUnique() |
|
void |
setUnique(boolean singleton) |
|
String |
toString() |
public Rule(String selector, Class<T> targetClass, java.util.function.BiConsumer<T,org.jsoup.nodes.Element> callback, boolean global)
selector
- The CSS selectortargetClass
- The target classcallback
- A function to be called for every instance. Can be null.global
- Whether to apply the rule globally or just for the text partcreateFeatureStructures
- Whether to create new feature structurespublic Rule(String selector, Class<T> targetClass, java.util.function.BiConsumer<T,org.jsoup.nodes.Element> callback)
public String getSelector()
public java.util.function.BiConsumer<T,org.jsoup.nodes.Element> getCallback()
public boolean isUnique()
public void setUnique(boolean singleton)
Copyright © 2018. All rights reserved.