public class MetaCondition extends AcceptCondition implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
MetaCondition.NameMode |
static class |
MetaCondition.ValueMode |
AcceptCondition.Transformer<T>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_NAME_MODE |
static java.lang.String |
DEFAULT_VALUE_MODE |
java.lang.String |
name |
java.lang.String |
nameMode |
java.lang.String |
value |
java.lang.String |
valueMode |
Constructor and Description |
---|
MetaCondition() |
MetaCondition(MetaCondition o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(AcceptCondition.Transformer<T> transformer,
T[] t) |
void |
check(boolean deep,
java.lang.String errorContext)
Checks this MetaCondition.
|
static MetaCondition |
fromString(java.lang.String s)
String representation of this MetaCondition.
|
java.lang.String |
getName()
Name of the meta against which to check.
|
java.lang.String |
getNameMode()
Meta name test mode:
"equals": Evaluates the DocumentChunk with a name equal to the specified one.
"matches": Evaluates the DocumentChunk with a name matching the specified regular expression.The match is case insensitive.
|
MetaCondition.NameMode |
getNameModeAsEnum()
Meta name test mode:
"equals": Evaluates the DocumentChunk with a name equal to the specified one.
"matches": Evaluates the DocumentChunk with a name matching the specified regular expression.The match is case insensitive.
|
java.lang.String |
getValue()
The string to check against the value of DocumentChunks.
|
java.lang.String |
getValueMode()
Value test mode:
"exists": Matches if a DocumentChunk pass the name condition.
"equals": Matches if a DocumentChunk pass the name condition and the textual content is equal to the 'value' attribute.
"contains": Matches if a DocumentChunk pass the name condition and the textual content contains 'value' (Pure string matching is performed without tokenization).
"matches": Matches if a DocumentChunk pass the name condition and the textual content matches the regular expression specified by the 'value' attribute.
|
MetaCondition.ValueMode |
getValueModeAsEnum()
Value test mode:
"exists": Matches if a DocumentChunk pass the name condition.
"equals": Matches if a DocumentChunk pass the name condition and the textual content is equal to the 'value' attribute.
"contains": Matches if a DocumentChunk pass the name condition and the textual content contains 'value' (Pure string matching is performed without tokenization).
"matches": Matches if a DocumentChunk pass the name condition and the textual content matches the regular expression specified by the 'value' attribute.
|
static boolean |
isA(java.lang.String str,
MetaCondition.NameMode item) |
static boolean |
isA(java.lang.String str,
MetaCondition.ValueMode item) |
static boolean |
isOneOf(java.lang.String str,
MetaCondition.NameMode... items) |
static boolean |
isOneOf(java.lang.String str,
MetaCondition.ValueMode... items) |
MetaCondition |
makeCopy()
Creates and returns a deep copy of this MetaCondition.
|
static MetaCondition |
readFrom(java.io.InputStream is)
Read this MetaCondition from an XML fragment.
|
void |
setName(java.lang.String name)
Name of the meta against which to check.
|
void |
setNameMode(MetaCondition.NameMode item)
Meta name test mode:
"equals": Evaluates the DocumentChunk with a name equal to the specified one.
"matches": Evaluates the DocumentChunk with a name matching the specified regular expression.The match is case insensitive.
|
void |
setNameMode(java.lang.String nameMode)
Meta name test mode:
"equals": Evaluates the DocumentChunk with a name equal to the specified one.
"matches": Evaluates the DocumentChunk with a name matching the specified regular expression.The match is case insensitive.
|
void |
setValue(java.lang.String value)
The string to check against the value of DocumentChunks.
|
void |
setValueMode(MetaCondition.ValueMode item)
Value test mode:
"exists": Matches if a DocumentChunk pass the name condition.
"equals": Matches if a DocumentChunk pass the name condition and the textual content is equal to the 'value' attribute.
"contains": Matches if a DocumentChunk pass the name condition and the textual content contains 'value' (Pure string matching is performed without tokenization).
"matches": Matches if a DocumentChunk pass the name condition and the textual content matches the regular expression specified by the 'value' attribute.
|
void |
setValueMode(java.lang.String valueMode)
Value test mode:
"exists": Matches if a DocumentChunk pass the name condition.
"equals": Matches if a DocumentChunk pass the name condition and the textual content is equal to the 'value' attribute.
"contains": Matches if a DocumentChunk pass the name condition and the textual content contains 'value' (Pure string matching is performed without tokenization).
"matches": Matches if a DocumentChunk pass the name condition and the textual content matches the regular expression specified by the 'value' attribute.
|
java.lang.String |
toString()
String representation of this MetaCondition.
|
MetaCondition |
withName(java.lang.String name) |
MetaCondition |
withNameMode(java.lang.String nameMode) |
MetaCondition |
withValue(java.lang.String value) |
MetaCondition |
withValueMode(java.lang.String valueMode) |
void |
writeTo(java.io.OutputStream os)
Write this MetaCondition as an XML fragment
|
public java.lang.String name
public java.lang.String nameMode
public static final java.lang.String DEFAULT_NAME_MODE
public java.lang.String valueMode
public static final java.lang.String DEFAULT_VALUE_MODE
public java.lang.String value
public MetaCondition()
public MetaCondition(MetaCondition o)
public static boolean isA(java.lang.String str, MetaCondition.NameMode item)
public static boolean isOneOf(java.lang.String str, MetaCondition.NameMode... items)
public void setNameMode(MetaCondition.NameMode item)
public MetaCondition.NameMode getNameModeAsEnum()
public static boolean isA(java.lang.String str, MetaCondition.ValueMode item)
public static boolean isOneOf(java.lang.String str, MetaCondition.ValueMode... items)
public void setValueMode(MetaCondition.ValueMode item)
public MetaCondition.ValueMode getValueModeAsEnum()
public void setName(java.lang.String name)
public java.lang.String getName()
public MetaCondition withName(java.lang.String name)
public void setNameMode(java.lang.String nameMode)
public java.lang.String getNameMode()
public MetaCondition withNameMode(java.lang.String nameMode)
public void setValueMode(java.lang.String valueMode)
public java.lang.String getValueMode()
public MetaCondition withValueMode(java.lang.String valueMode)
public void setValue(java.lang.String value)
public java.lang.String getValue()
public MetaCondition withValue(java.lang.String value)
public MetaCondition makeCopy()
makeCopy
in class AcceptCondition
public static MetaCondition 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 AcceptCondition
javax.xml.bind.JAXBException
java.io.IOException
public static MetaCondition 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 AcceptCondition
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
check
in class AcceptCondition
com.exalead.util.TypedException
public <T> T accept(AcceptCondition.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
accept
in class AcceptCondition
com.exalead.util.TypedException
Copyright © 2021 Dassault Systèmes, All Rights Reserved.