Class QueryAttribute
java.lang.Object
com.nomagic.reportwizard.tools.query.QueryAttribute
Class for handler attribute condition of query element.
- Since:
- Jan 29, 2013
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int[attr*=value]
Matching an element with the attr attribute whose value contains at least one instance of the substring val.static final StringRegular expression pattern for any.static final int[attr$=value]
Matching an element with the attr attribute whose value ends with the suffix val.static final StringRegular expression pattern for endswith.static final int[attr=value]
Matching an element with the attr attribute whose value exactly value.static final int[attr^=value]
Matching an element with the attr attribute whose value begins with the prefix val.static final StringRegular expression pattern for startswith. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.QueryAttribute(String name, String value, int type) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get an attribute name.getRegx()Get a regular expression for attribute matching.intgetType()Get an attribute matching type.Get matching type character.getValue()Get an attribute value.booleanmatchAttribute(String elementValue) Return true if specific value match with regular expression.voidSet an attribute name.voidSet a regular expression for attribute matching.voidsetType(int type) Set an attribute matching type.voidSet an attribute value.
-
Field Details
-
TYPE_MATCHING_MATCHALL
public static final int TYPE_MATCHING_MATCHALL[attr=value]
Matching an element with the attr attribute whose value exactly value.- See Also:
-
TYPE_MATCHING_STARTWITH
public static final int TYPE_MATCHING_STARTWITH[attr^=value]
Matching an element with the attr attribute whose value begins with the prefix val.- See Also:
-
TYPE_MATCHING_STARTWITH_PATTERN
Regular expression pattern for startswith.- See Also:
-
TYPE_MATCHING_ENDWITH
public static final int TYPE_MATCHING_ENDWITH[attr$=value]
Matching an element with the attr attribute whose value ends with the suffix val.- See Also:
-
TYPE_MATCHING_ENDWITH_PATTERN
Regular expression pattern for endswith.- See Also:
-
TYPE_MATCHING_ANY
public static final int TYPE_MATCHING_ANY[attr*=value]
Matching an element with the attr attribute whose value contains at least one instance of the substring val.- See Also:
-
TYPE_MATCHING_ANY_PATTERN
Regular expression pattern for any.- See Also:
-
-
Constructor Details
-
QueryAttribute
public QueryAttribute()Constructor. -
QueryAttribute
Constructor.- Parameters:
name- attribute namevalue- attribute valuetype- attribute matching type
-
-
Method Details
-
getName
Get an attribute name.- Returns:
- an attribute name
-
setName
Set an attribute name.- Parameters:
name- an attribute name
-
getValue
Get an attribute value.- Returns:
- an attribute value
-
setValue
Set an attribute value.- Parameters:
value- an attribute value
-
getRegx
Get a regular expression for attribute matching.- Returns:
- a regular expression
-
setRegx
Set a regular expression for attribute matching.- Parameters:
regx- a regular expression
-
getType
public int getType()Get an attribute matching type.- Returns:
- an attribute matching type
-
setType
public void setType(int type) Set an attribute matching type.- Parameters:
type- an attribute matching type
-
getTypeCharacer
Get matching type character.- Returns:
- matching type character
-
matchAttribute
Return true if specific value match with regular expression.- Parameters:
elementValue- a specific value / MagicDraw element value- Returns:
- true or false.
-