@OpenApiAll
public class QueryAttribute
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_MATCHING_ANY
[attr*=value]
Matching an element with the attr attribute whose value contains at least one instance of the substring val. |
static java.lang.String |
TYPE_MATCHING_ANY_PATTERN
Regular expression pattern for any.
|
static int |
TYPE_MATCHING_ENDWITH
[attr$=value]
Matching an element with the attr attribute whose value ends with the suffix val. |
static java.lang.String |
TYPE_MATCHING_ENDWITH_PATTERN
Regular expression pattern for endswith.
|
static int |
TYPE_MATCHING_MATCHALL
[attr=value]
Matching an element with the attr attribute whose value exactly value. |
static int |
TYPE_MATCHING_STARTWITH
[attr^=value]
Matching an element with the attr attribute whose value begins with the prefix val. |
static java.lang.String |
TYPE_MATCHING_STARTWITH_PATTERN
Regular expression pattern for startswith.
|
Constructor and Description |
---|
QueryAttribute()
Constructor.
|
QueryAttribute(java.lang.String name,
java.lang.String value,
int type)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Get an attribute name.
|
java.lang.String |
getRegx()
Get a regular expression for attribute matching.
|
int |
getType()
Get an attribute matching type.
|
java.lang.String |
getTypeCharacer()
Get matching type character.
|
java.lang.String |
getValue()
Get an attribute value.
|
boolean |
matchAttribute(java.lang.String elementValue)
Return true if specific value match with regular expression.
|
void |
setName(java.lang.String name)
Set an attribute name.
|
void |
setRegx(java.lang.String regx)
Set a regular expression for attribute matching.
|
void |
setType(int type)
Set an attribute matching type.
|
void |
setValue(java.lang.String value)
Set an attribute value.
|
public static final int TYPE_MATCHING_MATCHALL
public static final int TYPE_MATCHING_STARTWITH
public static final java.lang.String TYPE_MATCHING_STARTWITH_PATTERN
public static final int TYPE_MATCHING_ENDWITH
public static final java.lang.String TYPE_MATCHING_ENDWITH_PATTERN
public static final int TYPE_MATCHING_ANY
public static final java.lang.String TYPE_MATCHING_ANY_PATTERN
public QueryAttribute()
public QueryAttribute(java.lang.String name, java.lang.String value, int type)
name
- attribute namevalue
- attribute valuetype
- attribute matching typepublic java.lang.String getName()
public void setName(java.lang.String name)
name
- an attribute namepublic java.lang.String getValue()
public void setValue(java.lang.String value)
value
- an attribute valuepublic java.lang.String getRegx()
public void setRegx(java.lang.String regx)
regx
- a regular expressionpublic int getType()
public void setType(int type)
type
- an attribute matching typepublic java.lang.String getTypeCharacer()
public boolean matchAttribute(java.lang.String elementValue)
elementValue
- a specific value / MagicDraw element valueCopyright © 2012 - No Magic Asia