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
EPPRegistryRegex
represents 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.String
ATTR_LANG
Language attribute of the explanation element.static java.lang.String
ELM_DESCRIPTION
Regular expression optional description element label.static java.lang.String
ELM_EXPRESSION
Regular 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.Object
clone()
CloneEPPRegistryRegex
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPRegistryRegex
attributes from the aElement DOM Element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of theEPPRegistryRegex
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPRegistryRegex
compare.java.lang.String
getDescription()
Gets the description of the regular expression.java.lang.String
getExpression()
Gets the regular expression value.java.lang.String
getLang()
Gets the language of the explanation.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.boolean
hasDescription()
Has description?void
setDescription(java.lang.String aDescription)
Sets the description of the regular expression.void
setExpression(java.lang.String aExpression)
Sets the regular expression value.void
setLang(java.lang.String aLang)
Sets the language of the explanation.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation 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 EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPRegistryRegex
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- 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 encodeEPPRegistryRegex
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPRegistryRegex
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root DOM Element to decodeEPPRegistryRegex
from.- Throws:
EPPDecodeException
- Unable to decode aElement.
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPRegistryRegex
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in 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 deepEPPRegistryRegex
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPRegistryRegex
instance 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;
null
otherwise.
-
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:
true
if the description is defined;false
otherwise.
-
getDescription
public java.lang.String getDescription()
Gets the description of the regular expression.- Returns:
- Regular expression description if defined;
null
otherwise.
-
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;
null
otherwise.
-
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:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-