Package com.verisign.epp.codec.mark
Class EPPProtection
java.lang.Object
com.verisign.epp.codec.mark.EPPProtection
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
Class that contains the countries and region of the country where the mark is
protected and the OPTIONAL ruling, in case of statute protected marks, to
identify the country where the statute was enacted. A list of
EPPProtection instances is contained in a
EPPTreatyOrStatute.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor forEPPProtection.EPPProtection(String aCC, String aRegion) Constructor that takes all of theEPPProtectionrequired attributes.EPPProtection(String aCC, String aRegion, String aRuling) Constructor that takes all of theEPPProtectionattributes with a single ruling country.EPPProtection(String aCC, String aRegion, List<String> aRulings) Constructor that takes all of theEPPProtectionattributes. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a country for to the list of countries for the ruling.clone()CloneEPPProtection.voidDecode theEPPMarkcomponentSets all this instance's data in the given XML documentbooleanimplements a deepEPPProtectioncompare.getCc()Gets two-character code of the country in which the mark is protected from [ISO3166-2].Returns the XML namespace associated with theEPPCodecComponent.Gets the name of the city, state, province or other geographic region in which the mark is protected.Gets the list of two-character country codes of the countries of the ruling.voidSets two-character code of the country in which the mark is protected.voidSets the name of the city, state, province or other geographic region in which the mark is protected.voidsetRulings(List<String> aRulings) Sets the list of two-character country codes of the countries of the ruling.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
Field Details
-
ELM_LOCALNAME
Constant for the local name- See Also:
-
ELM_NAME
Constant for the tag name- See Also:
-
-
Constructor Details
-
EPPProtection
public EPPProtection()Default constructor forEPPProtection. -
EPPProtection
Constructor that takes all of theEPPProtectionrequired attributes.- Parameters:
aCC- Two-character code of the country in which the mark is protected.aRegion- Name of the city, state, province or other geographic region in which the mark is protected.
-
EPPProtection
Constructor that takes all of theEPPProtectionattributes with a single ruling country.- Parameters:
aCC- Two-character code of the country in which the mark is protected.aRegion- Name of the city, state, province or other geographic region in which the mark is protected.aRuling- Identify the country where the statute was enacted
-
EPPProtection
Constructor that takes all of theEPPProtectionattributes.- Parameters:
aCC- Two-character code of the country in which the mark is protected.aRegion- Name of the city, state, province or other geographic region in which the mark is protected.aRulings- List of two-character code of countries of the ruling.
-
-
Method Details
-
clone
CloneEPPProtection.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of
EPPProtection - Throws:
CloneNotSupportedException- standard Object.clone exception
-
encode
Sets all this instance's data in the given XML document- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- a DOM Document to attach data to.- Returns:
- The root element of this component.
- Throws:
EPPEncodeException- Thrown if any errors prevent encoding.
-
decode
Decode theEPPMarkcomponent- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root element of theEPPMark- Throws:
EPPDecodeException- Error decoding theEPPMark
-
equals
implements a deepEPPProtectioncompare. -
getCc
Gets two-character code of the country in which the mark is protected from [ISO3166-2].- Returns:
- Two-character code of the country in which the mark is protected
if set;
nullotherwise.
-
setCc
Sets two-character code of the country in which the mark is protected. This is a two-character code from [ISO3166-2].- Parameters:
aCc- Two-character code of the country in which the mark is protected from [ISO3166-2].
-
getRegion
Gets the name of the city, state, province or other geographic region in which the mark is protected.- Returns:
- the name of the city, state, province or other geographic region
in which the mark is protected if set;
nullotherwise.
-
setRegion
Sets the name of the city, state, province or other geographic region in which the mark is protected.- Parameters:
aRegion- Name of the city, state, province or other geographic region in which the mark is protected.
-
getRulings
Gets the list of two-character country codes of the countries of the ruling.- Returns:
- The countries of the rulings if set; Empty
Listotherwise.
-
setRulings
Sets the list of two-character country codes of the countries of the ruling.- Parameters:
aRulings- The countries of the ruling
-
addRuling
Adds a country for to the list of countries for the ruling.- Parameters:
aRuling- Two-character code of the countries of the ruling. This is a two-character code from [ISO3166-2].
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-