public class RegexpMatch
extends java.lang.Object
implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
RegexpMatch.Level |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
annotation |
static java.lang.String |
DEFAULT_LANG |
static java.lang.String |
DEFAULT_LEVEL |
java.lang.String |
displayForm |
java.lang.String |
lang |
java.lang.String |
level |
java.lang.String |
regexp |
Constructor and Description |
---|
RegexpMatch() |
RegexpMatch(RegexpMatch o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
check(boolean deep,
java.lang.String errorContext)
Checks this RegexpMatch.
|
static RegexpMatch |
fromString(java.lang.String s)
String representation of this RegexpMatch.
|
java.lang.String |
getAnnotation()
Tag of the annotations to add on matched tokens.
|
java.lang.String |
getDisplayForm()
Value of the annotations to add on matched tokens.
By default, the display form is that of the matched tokens, but it can be overriden by the user. Captures may be used. |
java.lang.String |
getLang()
Lang of the regular expression.
The regexp will not match token in other languages. |
java.lang.String |
getLevel()
Level of the regular expression.
For example, a regexp with level=lowercase will match case-insensitively. |
RegexpMatch.Level |
getLevelAsEnum()
Level of the regular expression.
For example, a regexp with level=lowercase will match case-insensitively. |
java.lang.String |
getRegexp()
Regular expression to recognize.
|
static boolean |
isA(java.lang.String str,
RegexpMatch.Level item) |
static boolean |
isOneOf(java.lang.String str,
RegexpMatch.Level... items) |
RegexpMatch |
makeCopy()
Creates and returns a deep copy of this RegexpMatch.
|
static RegexpMatch |
readFrom(java.io.InputStream is)
Read this RegexpMatch from an XML fragment.
|
void |
setAnnotation(java.lang.String annotation)
Tag of the annotations to add on matched tokens.
|
void |
setDisplayForm(java.lang.String displayForm)
Value of the annotations to add on matched tokens.
By default, the display form is that of the matched tokens, but it can be overriden by the user. Captures may be used. |
void |
setLang(java.lang.String lang)
Lang of the regular expression.
The regexp will not match token in other languages. |
void |
setLevel(RegexpMatch.Level item)
Level of the regular expression.
For example, a regexp with level=lowercase will match case-insensitively. |
void |
setLevel(java.lang.String level)
Level of the regular expression.
For example, a regexp with level=lowercase will match case-insensitively. |
void |
setRegexp(java.lang.String regexp)
Regular expression to recognize.
|
java.lang.String |
toString()
String representation of this RegexpMatch.
|
RegexpMatch |
withAnnotation(java.lang.String annotation) |
RegexpMatch |
withDisplayForm(java.lang.String displayForm) |
RegexpMatch |
withLang(java.lang.String lang) |
RegexpMatch |
withLevel(java.lang.String level) |
RegexpMatch |
withRegexp(java.lang.String regexp) |
void |
writeTo(java.io.OutputStream os)
Write this RegexpMatch as an XML fragment
|
public java.lang.String regexp
public java.lang.String annotation
public java.lang.String level
public static final java.lang.String DEFAULT_LEVEL
public java.lang.String lang
public static final java.lang.String DEFAULT_LANG
public java.lang.String displayForm
public RegexpMatch()
public RegexpMatch(RegexpMatch o)
public static boolean isA(java.lang.String str, RegexpMatch.Level item)
public static boolean isOneOf(java.lang.String str, RegexpMatch.Level... items)
public void setLevel(RegexpMatch.Level item)
public RegexpMatch.Level getLevelAsEnum()
public void setRegexp(java.lang.String regexp)
public java.lang.String getRegexp()
public RegexpMatch withRegexp(java.lang.String regexp)
public void setAnnotation(java.lang.String annotation)
public java.lang.String getAnnotation()
public RegexpMatch withAnnotation(java.lang.String annotation)
public void setLevel(java.lang.String level)
public java.lang.String getLevel()
public RegexpMatch withLevel(java.lang.String level)
public void setLang(java.lang.String lang)
public java.lang.String getLang()
public RegexpMatch withLang(java.lang.String lang)
public void setDisplayForm(java.lang.String displayForm)
public java.lang.String getDisplayForm()
public RegexpMatch withDisplayForm(java.lang.String displayForm)
public RegexpMatch makeCopy()
public static RegexpMatch 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
javax.xml.bind.JAXBException
java.io.IOException
public static RegexpMatch 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 java.lang.Object
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
com.exalead.util.TypedException
Copyright © 2013 Dassault Systèmes, All Rights Reserved.