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
EPPRegistryLanguagedefines the supported language codes and character code point policy.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEPPRegistryLanguage.VariantStrategyPossible values for thevariantStrategyattribute.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringELM_LOCALNAMEXML local name forEPPRegistryLanguage.static java.lang.StringELM_NAMEXML root tag forEPPRegistryLanguage.
-
Constructor Summary
Constructors Constructor Description EPPRegistryLanguage()Default constructor forEPPRegistryLanguage.EPPRegistryLanguage(java.lang.String aCode, java.lang.String aTable, EPPRegistryLanguage.VariantStrategy aVariantStrategy)EPPRegistryLanguageconstructor that takes all attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPRegistryLanguage.voiddecode(org.w3c.dom.Element aElement)Decode theEPPRegistryLanguageattributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPRegistryLanguageinstance.booleanequals(java.lang.Object aObject)implements a deepEPPRegistryLanguagecompare.java.lang.StringgetCode()Gets the required "code" attribute defines the language code for the supported language.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.java.lang.StringgetTable()Gets the OPTIONAL language table URI that contains the set of code points for the language.EPPRegistryLanguage.VariantStrategygetVariantStrategy()Gets the OPTIONAL strategy for the handling of variants for the language.voidsetCode(java.lang.String aCode)Sets the required "code" attribute defines the language code for the supported language.voidsetTable(java.lang.String aTable)Sets the OPTIONAL language table URI that contains the set of code points for the language.voidsetVariantStrategy(EPPRegistryLanguage.VariantStrategy aVariantStrategy)Sets the OPTIONAL strategy for the handling of variants for the language.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation 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)EPPRegistryLanguageconstructor 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 tonullif undefined.aVariantStrategy- The OPTIONAL variant strategy. Set tonullif undefined.
-
-
Method Detail
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPRegistryLanguageinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryLanguageinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPRegistryLanguageinstance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPRegistryLanguageattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPRegistryLanguagefrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPRegistryLanguage.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein 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 deepEPPRegistryLanguagecompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPRegistryLanguageinstance to compare with- Returns:
trueif this object is the same as the aObject argument;falseotherwise
-
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.
-
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;
nullotherwise.
-
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;
nullotherwise.
-
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;
nullotherwise.
-
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:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-