Class EPPRegistryLanguage
- java.lang.Object
-
- com.verisign.epp.codec.registry.v02.EPPRegistryLanguage
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPRegistryLanguage extends java.lang.Object implements EPPCodecComponent
EPPRegistryLanguage
defines the supported language codes and character code point policy.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EPPRegistryLanguage.VariantStrategy
Possible values for thevariantStrategy
attribute.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_LOCALNAME
XML local name forEPPRegistryLanguage
.static java.lang.String
ELM_NAME
XML root tag forEPPRegistryLanguage
.
-
Constructor Summary
Constructors Constructor Description EPPRegistryLanguage()
Default constructor forEPPRegistryLanguage
.EPPRegistryLanguage(java.lang.String aCode, java.lang.String aTable, EPPRegistryLanguage.VariantStrategy aVariantStrategy)
EPPRegistryLanguage
constructor that takes all attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPRegistryLanguage
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPRegistryLanguage
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 theEPPRegistryLanguage
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPRegistryLanguage
compare.java.lang.String
getCode()
Gets the required "code" attribute defines the language code for the supported language.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.lang.String
getTable()
Gets the OPTIONAL language table URI that contains the set of code points for the language.EPPRegistryLanguage.VariantStrategy
getVariantStrategy()
Gets the OPTIONAL strategy for the handling of variants for the language.void
setCode(java.lang.String aCode)
Sets the required "code" attribute defines the language code for the supported language.void
setTable(java.lang.String aTable)
Sets the OPTIONAL language table URI that contains the set of code points for the language.void
setVariantStrategy(EPPRegistryLanguage.VariantStrategy aVariantStrategy)
Sets the OPTIONAL strategy for the handling of variants for the language.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
XML local name forEPPRegistryLanguage
.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPRegistryLanguage
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPRegistryLanguage
public EPPRegistryLanguage()
Default constructor forEPPRegistryLanguage
.
-
EPPRegistryLanguage
public EPPRegistryLanguage(java.lang.String aCode, java.lang.String aTable, EPPRegistryLanguage.VariantStrategy aVariantStrategy)
EPPRegistryLanguage
constructor that takes all attributes.- Parameters:
aCode
- The required language code that should be a ISO 639 (ISO 639-1 or ISO 639-2) value.aTable
- The OPTIONAL language table URI. Set tonull
if undefined.aVariantStrategy
- The OPTIONAL variant strategy. Set tonull
if undefined.
-
-
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 theEPPRegistryLanguage
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
EPPRegistryLanguage
instance. - Throws:
EPPEncodeException
- - Unable to encodeEPPRegistryLanguage
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPRegistryLanguage
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root DOM Element to decodeEPPRegistryLanguage
from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPRegistryLanguage
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPRegistryLanguage
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryLanguage
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPRegistryLanguage
instance to compare with- Returns:
true
if this object is the same as the aObject argument;false
otherwise
-
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.
-
getTable
public java.lang.String getTable()
Gets the OPTIONAL language table URI that contains the set of code points for the language.- Returns:
- The OPTIONAL langauge table URI if defined;
null
otherwise.
-
setTable
public void setTable(java.lang.String aTable)
Sets the OPTIONAL language table URI that contains the set of code points for the language.- Parameters:
aTable
- The OPTIONAL langauge table URI
-
getVariantStrategy
public EPPRegistryLanguage.VariantStrategy getVariantStrategy()
Gets the OPTIONAL strategy for the handling of variants for the language. If no <registry:variantStrategy> element is specified then variants are not supported by the language.- Returns:
- The OPTIONAL variant strategy if defined;
null
otherwise.
-
setVariantStrategy
public void setVariantStrategy(EPPRegistryLanguage.VariantStrategy aVariantStrategy)
Sets the OPTIONAL strategy for the handling of variants for the language. If no <registry:variantStrategy> element is specified then variants are not supported by the language.- Parameters:
aVariantStrategy
- The OPTIONAL variant strategy
-
getCode
public java.lang.String getCode()
Gets the required "code" attribute defines the language code for the supported language. The language code SHOULD be an ISO 639 (ISO 639-1 or ISO 639-2) value.- Returns:
- The language code if defined;
null
otherwise.
-
setCode
public void setCode(java.lang.String aCode)
Sets the required "code" attribute defines the language code for the supported language. The language code SHOULD be an ISO 639 (ISO 639-1 or ISO 639-2) value.- Parameters:
aCode
- The language code
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-