Class QueryAttribute

java.lang.Object
com.nomagic.reportwizard.tools.query.QueryAttribute

@OpenApiAll public class QueryAttribute extends Object
Class for handler attribute condition of query element.
Since:
Jan 29, 2013
  • 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

      public static final String 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

      public static final String 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

      public static final String TYPE_MATCHING_ANY_PATTERN
      Regular expression pattern for any.
      See Also:
  • Constructor Details

    • QueryAttribute

      public QueryAttribute()
      Constructor.
    • QueryAttribute

      public QueryAttribute(String name, String value, int type)
      Constructor.
      Parameters:
      name - attribute name
      value - attribute value
      type - attribute matching type
  • Method Details

    • getName

      public String getName()
      Get an attribute name.
      Returns:
      an attribute name
    • setName

      public void setName(String name)
      Set an attribute name.
      Parameters:
      name - an attribute name
    • getValue

      public String getValue()
      Get an attribute value.
      Returns:
      an attribute value
    • setValue

      public void setValue(String value)
      Set an attribute value.
      Parameters:
      value - an attribute value
    • getRegx

      public String getRegx()
      Get a regular expression for attribute matching.
      Returns:
      a regular expression
    • setRegx

      public void setRegx(String regx)
      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

      public String getTypeCharacer()
      Get matching type character.
      Returns:
      matching type character
    • matchAttribute

      public boolean matchAttribute(String elementValue)
      Return true if specific value match with regular expression.
      Parameters:
      elementValue - a specific value / MagicDraw element value
      Returns:
      true or false.