public class RegexpMatcher extends SemanticProcessor implements com.exalead.util.Checkable, java.io.Serializable
SemanticProcessor.Transformer<T>, SemanticProcessor.Visitor
Modifier and Type | Field and Description |
---|---|
java.lang.String |
annotationTagsToReserve |
static boolean |
DEFAULT_LEFTMOST_LONGEST_MATCHING_POLICY |
static boolean |
DEFAULT_MATCH_SEP_SPACE |
static int |
DEFAULT_WINDOW_LENGTH |
boolean |
leftmostLongestMatchingPolicy |
boolean |
matchSepSpace |
java.lang.String |
resourceFile |
int |
windowLength |
contexts, name, src
Constructor and Description |
---|
RegexpMatcher() |
RegexpMatcher(RegexpMatcher 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 RegexpMatcher.
|
static RegexpMatcher |
fromString(java.lang.String s)
String representation of this RegexpMatcher.
|
java.lang.String |
getAnnotationTagsToReserve()
Annotation tags to reserve, in addition to the tags specified in the resource file
This is useful if the regexps are to be updated on an already instantiated regexp matcher. |
java.lang.String |
getResourceFile()
URL to the configuration file
|
int |
getWindowLength()
Length of the token window.
|
boolean |
isLeftmostLongestMatchingPolicy()
If true, apply a classical leftmost-longest selection on overlapping matches.
|
boolean |
isMatchSepSpace()
If true, allows a pattern to match text spans which contain space separators.
|
RegexpMatcher |
makeCopy()
Creates and returns a deep copy of this RegexpMatcher.
|
static RegexpMatcher |
readFrom(java.io.InputStream is)
Read this RegexpMatcher from an XML fragment.
|
void |
setAnnotationTagsToReserve(java.lang.String annotationTagsToReserve)
Annotation tags to reserve, in addition to the tags specified in the resource file
This is useful if the regexps are to be updated on an already instantiated regexp matcher. |
void |
setLeftmostLongestMatchingPolicy(boolean leftmostLongestMatchingPolicy)
If true, apply a classical leftmost-longest selection on overlapping matches.
|
void |
setMatchSepSpace(boolean matchSepSpace)
If true, allows a pattern to match text spans which contain space separators.
|
void |
setResourceFile(java.lang.String resourceFile)
URL to the configuration file
|
void |
setWindowLength(int windowLength)
Length of the token window.
|
java.lang.String |
toString()
String representation of this RegexpMatcher.
|
RegexpMatcher |
withAnnotationTagsToReserve(java.lang.String annotationTagsToReserve) |
RegexpMatcher |
withContexts(java.lang.String contexts) |
RegexpMatcher |
withLeftmostLongestMatchingPolicy(boolean leftmostLongestMatchingPolicy) |
RegexpMatcher |
withLeftmostLongestMatchingPolicy(java.lang.Boolean leftmostLongestMatchingPolicy) |
RegexpMatcher |
withMatchSepSpace(boolean matchSepSpace) |
RegexpMatcher |
withMatchSepSpace(java.lang.Boolean matchSepSpace) |
RegexpMatcher |
withName(java.lang.String name) |
RegexpMatcher |
withResourceFile(java.lang.String resourceFile) |
RegexpMatcher |
withSrc(java.lang.String src)
Deprecated.
|
RegexpMatcher |
withWindowLength(int windowLength) |
RegexpMatcher |
withWindowLength(java.lang.Integer windowLength) |
void |
writeTo(java.io.OutputStream os)
Write this RegexpMatcher as an XML fragment
|
getContexts, getName, getSrc, setContexts, setName, setSrc
public java.lang.String resourceFile
public java.lang.String annotationTagsToReserve
public int windowLength
public static final int DEFAULT_WINDOW_LENGTH
public boolean leftmostLongestMatchingPolicy
public static final boolean DEFAULT_LEFTMOST_LONGEST_MATCHING_POLICY
public boolean matchSepSpace
public static final boolean DEFAULT_MATCH_SEP_SPACE
public RegexpMatcher()
public RegexpMatcher(RegexpMatcher o)
public RegexpMatcher withName(java.lang.String name)
withName
in class SemanticProcessor
public RegexpMatcher withContexts(java.lang.String contexts)
withContexts
in class SemanticProcessor
@Deprecated public RegexpMatcher withSrc(java.lang.String src)
withSrc
in class SemanticProcessor
public void setResourceFile(java.lang.String resourceFile)
public java.lang.String getResourceFile()
public RegexpMatcher withResourceFile(java.lang.String resourceFile)
public void setAnnotationTagsToReserve(java.lang.String annotationTagsToReserve)
public java.lang.String getAnnotationTagsToReserve()
public RegexpMatcher withAnnotationTagsToReserve(java.lang.String annotationTagsToReserve)
public void setWindowLength(int windowLength)
public int getWindowLength()
public RegexpMatcher withWindowLength(int windowLength)
public RegexpMatcher withWindowLength(java.lang.Integer windowLength)
public void setLeftmostLongestMatchingPolicy(boolean leftmostLongestMatchingPolicy)
public boolean isLeftmostLongestMatchingPolicy()
public RegexpMatcher withLeftmostLongestMatchingPolicy(boolean leftmostLongestMatchingPolicy)
public RegexpMatcher withLeftmostLongestMatchingPolicy(java.lang.Boolean leftmostLongestMatchingPolicy)
public void setMatchSepSpace(boolean matchSepSpace)
public boolean isMatchSepSpace()
public RegexpMatcher withMatchSepSpace(boolean matchSepSpace)
public RegexpMatcher withMatchSepSpace(java.lang.Boolean matchSepSpace)
public RegexpMatcher makeCopy()
makeCopy
in class SemanticProcessor
public static RegexpMatcher 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 RegexpMatcher 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.