Class DefaultDef.Regex

java.lang.Object
org.eigenbase.xom.ElementDef
All Implemented Interfaces:
Serializable, Cloneable, org.eigenbase.xom.NodeDef
Enclosing class:
DefaultDef

public static class DefaultDef.Regex extends DefaultDef.CaseMatcher
This element is used in a vector of child elements when one wishes to have one or more regular expressions associated with matching a given string. The parent element must initialize Regex object by calling its validate method passing in an array of template names. The cdata content is a regular expression with embedded template names. Each name must be surrounded by "${" and "}". Each time this is used for a new set of names, the names replace the template names in the regular expression. For example, if the charcase="lower", the attribute dot="-" (the default dot value is "_"), the template names are: "city", "state", and "country" and the cdata is: .*_${country}_.*_${city} Then when the names: "San Francisco", "California", and "U.S.A" are passed in, the regular expression becomes: .*_u-s-a_.*_san_francisco Note that a given template name can only appear ONCE in the template content, the cdata content. As an example, the following cdata template is not supported: .*_${country}_.*_${city}_${country}
See Also:
  • Field Details

    • space

      public String space
    • dot

      public String dot
    • cdata

      public String cdata
    • BAD_ID

      protected static final int BAD_ID
      See Also:
    • templateParts

      protected String[] templateParts
    • templateNamePos

      protected int[] templateNamePos
      This is a one-to-one mapping, each template name can appear at most once.
  • Constructor Details

    • Regex

      public Regex()
    • Regex

      public Regex(org.eigenbase.xom.DOMWrapper _def) throws org.eigenbase.xom.XOMException
      Throws:
      org.eigenbase.xom.XOMException
  • Method Details