Class EPPRegistryRegex
- java.lang.Object
-
- com.verisign.epp.codec.registry.v02.EPPRegistryRegex
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPRegistryRegex extends java.lang.Object implements EPPCodecComponent
EPPRegistryRegexrepresents a general regular expression that includes both the expression and an optional description. Since this is a generic regular expressionEPPCodecComponent, used by multiple parentEPPCodecComponent's, the root element must be set using thesetRootName(String).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTR_LANGLanguage attribute of the explanation element.static java.lang.StringELM_DESCRIPTIONRegular expression optional description element label.static java.lang.StringELM_EXPRESSIONRegular expression element label.
-
Constructor Summary
Constructors Constructor Description EPPRegistryRegex()Default constructor forEPPRegistryRegex.EPPRegistryRegex(java.lang.String aExpression)Constructor that takes the required regular expression value.EPPRegistryRegex(java.lang.String aExpression, java.lang.String aDescription)Constructor that takes the required regular expression value along with the optional explanation.EPPRegistryRegex(java.lang.String aExpression, java.lang.String aDescription, java.lang.String aLang)Constructor that takes the required regular expression value along with the optional explanation and the language of the explanation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPRegistryRegex.voiddecode(org.w3c.dom.Element aElement)Decode theEPPRegistryRegexattributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPRegistryRegexinstance.booleanequals(java.lang.Object aObject)implements a deepEPPRegistryRegexcompare.java.lang.StringgetDescription()Gets the description of the regular expression.java.lang.StringgetExpression()Gets the regular expression value.java.lang.StringgetLang()Gets the language of the explanation.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.booleanhasDescription()Has description?voidsetDescription(java.lang.String aDescription)Sets the description of the regular expression.voidsetExpression(java.lang.String aExpression)Sets the regular expression value.voidsetLang(java.lang.String aLang)Sets the language of the explanation.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
-
-
Field Detail
-
ELM_EXPRESSION
public static final java.lang.String ELM_EXPRESSION
Regular expression element label.- See Also:
- Constant Field Values
-
ELM_DESCRIPTION
public static final java.lang.String ELM_DESCRIPTION
Regular expression optional description element label.- See Also:
- Constant Field Values
-
ATTR_LANG
public static final java.lang.String ATTR_LANG
Language attribute of the explanation element.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPRegistryRegex
public EPPRegistryRegex()
Default constructor forEPPRegistryRegex.
-
EPPRegistryRegex
public EPPRegistryRegex(java.lang.String aExpression)
Constructor that takes the required regular expression value.- Parameters:
aExpression- Regular expression value.
-
EPPRegistryRegex
public EPPRegistryRegex(java.lang.String aExpression, java.lang.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(java.lang.String aExpression, java.lang.String aDescription, java.lang.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 Detail
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPRegistryRegexinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryRegexinstance. - Throws:
EPPEncodeException- Unable to encodeEPPRegistryRegexinstance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPRegistryRegexattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPRegistryRegexfrom.- Throws:
EPPDecodeException- Unable to decode aElement.
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPRegistryRegex.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPRegistryRegex - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryRegexcompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPRegistryRegexinstance to compare with- Returns:
- true if equal false otherwise
-
getExpression
public java.lang.String getExpression()
Gets the regular expression value.- Returns:
- Regular expression value if defined;
nullotherwise.
-
setExpression
public void setExpression(java.lang.String aExpression)
Sets the regular expression value.- Parameters:
aExpression- Regular expression value.
-
hasDescription
public boolean hasDescription()
Has description?- Returns:
trueif the description is defined;falseotherwise.
-
getDescription
public java.lang.String getDescription()
Gets the description of the regular expression.- Returns:
- Regular expression description if defined;
nullotherwise.
-
setDescription
public void setDescription(java.lang.String aDescription)
Sets the description of the regular expression.- Parameters:
aDescription- Regular expression description.
-
getLang
public java.lang.String getLang()
Gets the language of the explanation.- Returns:
- Language of the explanation if defined;
nullotherwise.
-
setLang
public void setLang(java.lang.String aLang)
Sets the language of the explanation.- Parameters:
aLang- Language of the explanation.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-