Class EPPRegistryRegex

java.lang.Object
com.verisign.epp.codec.registry.v02.EPPRegistryRegex
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPRegistryRegex extends Object implements EPPCodecComponent
EPPRegistryRegex represents a general regular expression that includes both the expression and an optional description. Since this is a generic regular expression EPPCodecComponent, used by multiple parent EPPCodecComponent's, the root element must be set using the setRootName(String).
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Language attribute of the explanation element.
    static final String
    Regular expression optional description element label.
    static final String
    Regular expression element label.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for EPPRegistryRegex.
    EPPRegistryRegex(String aExpression)
    Constructor that takes the required regular expression value.
    EPPRegistryRegex(String aExpression, String aDescription)
    Constructor that takes the required regular expression value along with the optional explanation.
    EPPRegistryRegex(String aExpression, String aDescription, String aLang)
    Constructor that takes the required regular expression value along with the optional explanation and the language of the explanation.
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone EPPRegistryRegex.
    void
    decode(Element aElement)
    Decode the EPPRegistryRegex attributes from the aElement DOM Element tree.
    encode(Document aDocument)
    Encode a DOM Element tree from the attributes of the EPPRegistryRegex instance.
    boolean
    equals(Object aObject)
    implements a deep EPPRegistryRegex compare.
    Gets the description of the regular expression.
    Gets the regular expression value.
    Gets the language of the explanation.
    Returns the XML namespace associated with the EPPCodecComponent.
    boolean
    Has description?
    void
    setDescription(String aDescription)
    Sets the description of the regular expression.
    void
    setExpression(String aExpression)
    Sets the regular expression value.
    void
    setLang(String aLang)
    Sets the language of the explanation.
    Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • EPPRegistryRegex

      public EPPRegistryRegex()
      Default constructor for EPPRegistryRegex.
    • EPPRegistryRegex

      public EPPRegistryRegex(String aExpression)
      Constructor that takes the required regular expression value.
      Parameters:
      aExpression - Regular expression value.
    • EPPRegistryRegex

      public EPPRegistryRegex(String aExpression, String aDescription)
      Constructor that takes the required regular expression value along with the optional explanation.
      Parameters:
      aExpression - Regular expression value.
      aDescription - Description of the regular expression.
    • EPPRegistryRegex

      public EPPRegistryRegex(String aExpression, String aDescription, String aLang)
      Constructor that takes the required regular expression value along with the optional explanation and the language of the explanation.
      Parameters:
      aExpression - Regular expression value.
      aDescription - Description of the regular expression.
      aLang - Language of the explanation.
  • Method Details

    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPRegistryRegex instance.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOM Document that is being built. Used as an Element factory.
      Returns:
      Element Root DOM Element representing the EPPRegistryRegex instance.
      Throws:
      EPPEncodeException - Unable to encode EPPRegistryRegex instance.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPRegistryRegex attributes from the aElement DOM Element tree.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - Root DOM Element to decode EPPRegistryRegex from.
      Throws:
      EPPDecodeException - Unable to decode aElement.
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class Object
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPRegistryRegex.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPRegistryRegex
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPRegistryRegex compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPRegistryRegex instance to compare with
      Returns:
      true if equal false otherwise
    • getExpression

      public String getExpression()
      Gets the regular expression value.
      Returns:
      Regular expression value if defined; null otherwise.
    • setExpression

      public void setExpression(String aExpression)
      Sets the regular expression value.
      Parameters:
      aExpression - Regular expression value.
    • hasDescription

      public boolean hasDescription()
      Has description?
      Returns:
      true if the description is defined; false otherwise.
    • getDescription

      public String getDescription()
      Gets the description of the regular expression.
      Returns:
      Regular expression description if defined; null otherwise.
    • setDescription

      public void setDescription(String aDescription)
      Sets the description of the regular expression.
      Parameters:
      aDescription - Regular expression description.
    • getLang

      public String getLang()
      Gets the language of the explanation.
      Returns:
      Language of the explanation if defined; null otherwise.
    • setLang

      public void setLang(String aLang)
      Sets the language of the explanation.
      Parameters:
      aLang - Language of the explanation.
    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.