Package com.verisign.epp.codec.registry
Class EPPRegistryRegex
- java.lang.Object
-
- com.verisign.epp.codec.registry.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 explanation. 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_EXPLANATION
Regular expression optional explanation 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 aExplanation)
Constructor that takes the required regular expression value along with the optional explanation.EPPRegistryRegex(java.lang.String aExpression, java.lang.String aExplanation, 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
getExplanation()
Gets the explanation 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
.void
setExplanation(java.lang.String aExplanation)
Sets the explanation 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_EXPLANATION
public static final java.lang.String ELM_EXPLANATION
Regular expression optional explanation 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 aExplanation)
Constructor that takes the required regular expression value along with the optional explanation.- Parameters:
aExpression
- Regular expression value.aExplanation
- Explanation of the regular expression.
-
EPPRegistryRegex
public EPPRegistryRegex(java.lang.String aExpression, java.lang.String aExplanation, 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.aExplanation
- Explanation 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.
-
getExplanation
public java.lang.String getExplanation()
Gets the explanation of the regular expression.- Returns:
- Regular expression explanation if defined;
null
otherwise.
-
setExplanation
public void setExplanation(java.lang.String aExplanation)
Sets the explanation of the regular expression.- Parameters:
aExplanation
- Regular expression explanation.
-
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
.
-
-