public class Proximity extends SemanticProcessor implements com.exalead.util.Checkable, java.io.Serializable
SemanticProcessor.Transformer<T>, SemanticProcessor.Visitor
Modifier and Type | Field and Description |
---|---|
boolean |
allowElementOverlap |
java.lang.String |
annotation |
static boolean |
DEFAULT_ALLOW_ELEMENT_OVERLAP |
static java.lang.String |
DEFAULT_ANNOTATION |
static java.lang.String |
DEFAULT_DISPLAY_FORM |
static int |
DEFAULT_MAX_DISTANCE |
static int |
DEFAULT_MIN_DISTANCE |
static boolean |
DEFAULT_ORDERED |
static boolean |
DEFAULT_PARAGRAPH_SCOPE |
static boolean |
DEFAULT_SENTENCE_SCOPE |
static int |
DEFAULT_WINDOW_SIZE |
java.lang.String |
displayForm |
int |
maxDistance |
int |
minDistance |
boolean |
ordered |
boolean |
paragraphScope |
java.util.List<ProximityElement> |
proximityElement |
java.lang.String |
resourceFile |
boolean |
sentenceScope |
int |
windowSize |
contexts, name, src
Constructor and Description |
---|
Proximity() |
Proximity(Proximity o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(SemanticProcessor.Transformer<T> transformer,
T[] t) |
void |
accept(SemanticProcessor.Visitor visitor) |
void |
check(boolean deep,
java.lang.String errorContext)
Checks this Proximity.
|
static Proximity |
fromString(java.lang.String s)
String representation of this Proximity.
|
java.lang.String |
getAnnotation()
Output annotation
|
java.lang.String |
getDisplayForm()
Optional format for the output annotation display form: elements can be referred to using their $names
|
int |
getMaxDistance()
The maximum distance between two elements in terms of token
|
int |
getMinDistance()
The minimum distance between two elements in terms of token
|
java.util.List<ProximityElement> |
getProximityElement()
The set of annotations to search for
|
java.lang.String |
getResourceFile()
URL for the resource if not inline (data://, file:// or resource:// )
|
int |
getWindowSize()
Maximum size of a match in terms of token
|
boolean |
isAllowElementOverlap()
If TRUE, reports also matches where annotations overlap
|
boolean |
isOrdered()
If TRUE, forces the processor to match the annotations in definition order
|
boolean |
isParagraphScope()
If TRUE, each match is to be contained in a paragraph, no match will span several paragraphs
|
boolean |
isSentenceScope()
If TRUE, each match is to be contained in a sentence, no match will span several sentences
|
Proximity |
makeCopy()
Creates and returns a deep copy of this Proximity.
|
static Proximity |
readFrom(java.io.InputStream is)
Read this Proximity from an XML fragment.
|
void |
setAllowElementOverlap(boolean allowElementOverlap)
If TRUE, reports also matches where annotations overlap
|
void |
setAnnotation(java.lang.String annotation)
Output annotation
|
void |
setDisplayForm(java.lang.String displayForm)
Optional format for the output annotation display form: elements can be referred to using their $names
|
void |
setMaxDistance(int maxDistance)
The maximum distance between two elements in terms of token
|
void |
setMinDistance(int minDistance)
The minimum distance between two elements in terms of token
|
void |
setOrdered(boolean ordered)
If TRUE, forces the processor to match the annotations in definition order
|
void |
setParagraphScope(boolean paragraphScope)
If TRUE, each match is to be contained in a paragraph, no match will span several paragraphs
|
void |
setResourceFile(java.lang.String resourceFile)
URL for the resource if not inline (data://, file:// or resource:// )
|
void |
setSentenceScope(boolean sentenceScope)
If TRUE, each match is to be contained in a sentence, no match will span several sentences
|
void |
setWindowSize(int windowSize)
Maximum size of a match in terms of token
|
java.lang.String |
toString()
String representation of this Proximity.
|
Proximity |
withAllowElementOverlap(boolean allowElementOverlap) |
Proximity |
withAllowElementOverlap(java.lang.Boolean allowElementOverlap) |
Proximity |
withAnnotation(java.lang.String annotation) |
Proximity |
withContexts(java.lang.String contexts) |
Proximity |
withDisplayForm(java.lang.String displayForm) |
Proximity |
withMaxDistance(int maxDistance) |
Proximity |
withMaxDistance(java.lang.Integer maxDistance) |
Proximity |
withMinDistance(int minDistance) |
Proximity |
withMinDistance(java.lang.Integer minDistance) |
Proximity |
withName(java.lang.String name) |
Proximity |
withOrdered(boolean ordered) |
Proximity |
withOrdered(java.lang.Boolean ordered) |
Proximity |
withParagraphScope(boolean paragraphScope) |
Proximity |
withParagraphScope(java.lang.Boolean paragraphScope) |
Proximity |
withProximityElement(java.util.Collection<ProximityElement> __values) |
Proximity |
withProximityElement(ProximityElement... __values)
The set of annotations to search for
|
Proximity |
withResourceFile(java.lang.String resourceFile) |
Proximity |
withSentenceScope(boolean sentenceScope) |
Proximity |
withSentenceScope(java.lang.Boolean sentenceScope) |
Proximity |
withSrc(java.lang.String src)
Deprecated.
|
Proximity |
withWindowSize(int windowSize) |
Proximity |
withWindowSize(java.lang.Integer windowSize) |
void |
writeTo(java.io.OutputStream os)
Write this Proximity as an XML fragment
|
getContexts, getName, getSrc, setContexts, setName, setSrc
public java.lang.String resourceFile
public java.lang.String annotation
public static final java.lang.String DEFAULT_ANNOTATION
public java.lang.String displayForm
public static final java.lang.String DEFAULT_DISPLAY_FORM
public java.util.List<ProximityElement> proximityElement
public boolean ordered
public static final boolean DEFAULT_ORDERED
public boolean sentenceScope
public static final boolean DEFAULT_SENTENCE_SCOPE
public boolean paragraphScope
public static final boolean DEFAULT_PARAGRAPH_SCOPE
public int windowSize
public static final int DEFAULT_WINDOW_SIZE
public int minDistance
public static final int DEFAULT_MIN_DISTANCE
public int maxDistance
public static final int DEFAULT_MAX_DISTANCE
public boolean allowElementOverlap
public static final boolean DEFAULT_ALLOW_ELEMENT_OVERLAP
public Proximity()
public Proximity(Proximity o)
public Proximity withName(java.lang.String name)
withName
in class SemanticProcessor
public Proximity withContexts(java.lang.String contexts)
withContexts
in class SemanticProcessor
@Deprecated public Proximity withSrc(java.lang.String src)
withSrc
in class SemanticProcessor
public void setResourceFile(java.lang.String resourceFile)
public java.lang.String getResourceFile()
public Proximity withResourceFile(java.lang.String resourceFile)
public void setAnnotation(java.lang.String annotation)
public java.lang.String getAnnotation()
public Proximity withAnnotation(java.lang.String annotation)
public void setDisplayForm(java.lang.String displayForm)
public java.lang.String getDisplayForm()
public Proximity withDisplayForm(java.lang.String displayForm)
public java.util.List<ProximityElement> getProximityElement()
public Proximity withProximityElement(ProximityElement... __values)
public Proximity withProximityElement(java.util.Collection<ProximityElement> __values)
public void setOrdered(boolean ordered)
public boolean isOrdered()
public Proximity withOrdered(boolean ordered)
public Proximity withOrdered(java.lang.Boolean ordered)
public void setSentenceScope(boolean sentenceScope)
public boolean isSentenceScope()
public Proximity withSentenceScope(boolean sentenceScope)
public Proximity withSentenceScope(java.lang.Boolean sentenceScope)
public void setParagraphScope(boolean paragraphScope)
public boolean isParagraphScope()
public Proximity withParagraphScope(boolean paragraphScope)
public Proximity withParagraphScope(java.lang.Boolean paragraphScope)
public void setWindowSize(int windowSize)
public int getWindowSize()
public Proximity withWindowSize(int windowSize)
public Proximity withWindowSize(java.lang.Integer windowSize)
public void setMinDistance(int minDistance)
public int getMinDistance()
public Proximity withMinDistance(int minDistance)
public Proximity withMinDistance(java.lang.Integer minDistance)
public void setMaxDistance(int maxDistance)
public int getMaxDistance()
public Proximity withMaxDistance(int maxDistance)
public Proximity withMaxDistance(java.lang.Integer maxDistance)
public void setAllowElementOverlap(boolean allowElementOverlap)
public boolean isAllowElementOverlap()
public Proximity withAllowElementOverlap(boolean allowElementOverlap)
public Proximity withAllowElementOverlap(java.lang.Boolean allowElementOverlap)
public Proximity makeCopy()
makeCopy
in class SemanticProcessor
public static Proximity readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
writeTo
in class SemanticProcessor
javax.xml.bind.JAXBException
java.io.IOException
public static Proximity fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class SemanticProcessor
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
check
in class SemanticProcessor
com.exalead.util.TypedException
public void accept(SemanticProcessor.Visitor visitor) throws com.exalead.util.TypedException
accept
in class SemanticProcessor
com.exalead.util.TypedException
public <T> T accept(SemanticProcessor.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
accept
in class SemanticProcessor
com.exalead.util.TypedException
Copyright © 2013 Dassault Systèmes, All Rights Reserved.