public class ReplaceRegexp extends SingleContextDocumentProcessor implements com.exalead.util.Checkable, java.io.Serializable
SingleContextDocumentProcessor.Transformer<T>
DocumentProcessor.FromDataModel
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_REPLACE_ALL |
java.lang.String |
outputContext |
java.lang.String |
pattern |
boolean |
replaceAll |
java.lang.String |
value |
inputContext
acceptCondition, dataModelClass, dataModelProperty, dataModelState, DEFAULT_DISABLED, disabled, fromDataModel, name
Constructor and Description |
---|
ReplaceRegexp() |
ReplaceRegexp(ReplaceRegexp o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(DocumentProcessor.Transformer<T> transformer,
T[] t) |
<T> T |
accept(SingleContextDocumentProcessor.Transformer<T> transformer,
T[] t) |
void |
check(boolean deep,
java.lang.String errorContext)
Checks this ReplaceRegexp.
|
static ReplaceRegexp |
fromString(java.lang.String s)
String representation of this ReplaceRegexp.
|
java.lang.String |
getOutputContext()
ContextName to be associated with the DocumentChunk created for each new context.
|
java.lang.String |
getPattern()
Pattern used to match the substrings to replace.
ASTL library is used to perform regular expression matching. The regular expression language supported is Perl 5, WITHOUT support for: lazy (non-greedy) quantifiers like *?, +?, ??, {n}?, {n,}?, {n,m}? possessive quantifiers like *+, ++, ?+, {n}+, {n,}+, {n,m}+ assertions like \b, \B, \A, \z, \Z, \G look-around assertions (?=pattern), (?!pattern), (?<=pattern), (?pattern) numeric and named backreferences like \1, \g1, g{-1}, \g{name}, k |
java.lang.String |
getValue()
The replacement value (sed-like output format).
|
boolean |
isReplaceAll()
Replaces all first occurrences of patterns.
|
ReplaceRegexp |
makeCopy()
Creates and returns a deep copy of this ReplaceRegexp.
|
static ReplaceRegexp |
readFrom(java.io.InputStream is)
Read this ReplaceRegexp from an XML fragment.
|
void |
setOutputContext(java.lang.String outputContext)
ContextName to be associated with the DocumentChunk created for each new context.
|
void |
setPattern(java.lang.String pattern)
Pattern used to match the substrings to replace.
ASTL library is used to perform regular expression matching. The regular expression language supported is Perl 5, WITHOUT support for: lazy (non-greedy) quantifiers like *?, +?, ??, {n}?, {n,}?, {n,m}? possessive quantifiers like *+, ++, ?+, {n}+, {n,}+, {n,m}+ assertions like \b, \B, \A, \z, \Z, \G look-around assertions (?=pattern), (?!pattern), (?<=pattern), (?pattern) numeric and named backreferences like \1, \g1, g{-1}, \g{name}, k |
void |
setReplaceAll(boolean replaceAll)
Replaces all first occurrences of patterns.
|
void |
setValue(java.lang.String value)
The replacement value (sed-like output format).
|
java.lang.String |
toString()
String representation of this ReplaceRegexp.
|
ReplaceRegexp |
withAcceptCondition(AcceptCondition acceptCondition) |
ReplaceRegexp |
withDataModelClass(java.lang.String dataModelClass) |
ReplaceRegexp |
withDataModelProperty(java.lang.String dataModelProperty) |
ReplaceRegexp |
withDataModelState(java.lang.String dataModelState) |
ReplaceRegexp |
withDisabled(boolean disabled) |
ReplaceRegexp |
withDisabled(java.lang.Boolean disabled) |
ReplaceRegexp |
withFromDataModel(DocumentProcessor fromDataModel) |
ReplaceRegexp |
withInputContext(java.lang.String inputContext) |
ReplaceRegexp |
withName(java.lang.String name) |
ReplaceRegexp |
withOutputContext(java.lang.String outputContext) |
ReplaceRegexp |
withPattern(java.lang.String pattern) |
ReplaceRegexp |
withReplaceAll(boolean replaceAll) |
ReplaceRegexp |
withReplaceAll(java.lang.Boolean replaceAll) |
ReplaceRegexp |
withValue(java.lang.String value) |
void |
writeTo(java.io.OutputStream os)
Write this ReplaceRegexp as an XML fragment
|
getInputContext, setInputContext
getAcceptCondition, getDataModelClass, getDataModelProperty, getDataModelState, getFromDataModel, getName, isDisabled, setAcceptCondition, setDataModelClass, setDataModelProperty, setDataModelState, setDisabled, setFromDataModel, setName
public java.lang.String outputContext
public java.lang.String pattern
public java.lang.String value
public boolean replaceAll
public static final boolean DEFAULT_REPLACE_ALL
public ReplaceRegexp()
public ReplaceRegexp(ReplaceRegexp o)
public ReplaceRegexp withInputContext(java.lang.String inputContext)
withInputContext
in class SingleContextDocumentProcessor
public ReplaceRegexp withAcceptCondition(AcceptCondition acceptCondition)
withAcceptCondition
in class SingleContextDocumentProcessor
public ReplaceRegexp withName(java.lang.String name)
withName
in class SingleContextDocumentProcessor
public ReplaceRegexp withDataModelState(java.lang.String dataModelState)
withDataModelState
in class SingleContextDocumentProcessor
public ReplaceRegexp withFromDataModel(DocumentProcessor fromDataModel)
withFromDataModel
in class SingleContextDocumentProcessor
public ReplaceRegexp withDataModelClass(java.lang.String dataModelClass)
withDataModelClass
in class SingleContextDocumentProcessor
public ReplaceRegexp withDataModelProperty(java.lang.String dataModelProperty)
withDataModelProperty
in class SingleContextDocumentProcessor
public ReplaceRegexp withDisabled(boolean disabled)
withDisabled
in class SingleContextDocumentProcessor
public ReplaceRegexp withDisabled(java.lang.Boolean disabled)
withDisabled
in class SingleContextDocumentProcessor
public void setOutputContext(java.lang.String outputContext)
public java.lang.String getOutputContext()
public ReplaceRegexp withOutputContext(java.lang.String outputContext)
public void setPattern(java.lang.String pattern)
public java.lang.String getPattern()
public ReplaceRegexp withPattern(java.lang.String pattern)
public void setValue(java.lang.String value)
public java.lang.String getValue()
public ReplaceRegexp withValue(java.lang.String value)
public void setReplaceAll(boolean replaceAll)
public boolean isReplaceAll()
public ReplaceRegexp withReplaceAll(boolean replaceAll)
public ReplaceRegexp withReplaceAll(java.lang.Boolean replaceAll)
public ReplaceRegexp makeCopy()
makeCopy
in class SingleContextDocumentProcessor
public static ReplaceRegexp 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 SingleContextDocumentProcessor
javax.xml.bind.JAXBException
java.io.IOException
public static ReplaceRegexp 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 SingleContextDocumentProcessor
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
check
in class SingleContextDocumentProcessor
com.exalead.util.TypedException
public <T> T accept(SingleContextDocumentProcessor.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
accept
in class SingleContextDocumentProcessor
com.exalead.util.TypedException
public <T> T accept(DocumentProcessor.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
accept
in class DocumentProcessor
com.exalead.util.TypedException
Copyright © 2021 Dassault Systèmes, All Rights Reserved.