EPP 0.2.6

com.neulevel.epp.core
Class EppPeriod

java.lang.Object
  extended bycom.neulevel.epp.core.EppEntity
      extended bycom.neulevel.epp.core.EppPeriod

public class EppPeriod
extends EppEntity

This EppPeriod class implements EPP Domain periodType entity.

Version:
$Revision: 1.1.1.1 $ $Date: 2005/12/06 20:11:35 $
Author:
Ning Zhang ning.zhang@neustar.com

Field Summary
static char UNIT_MONTH
          Period unit for month ('m')
static char UNIT_YEAR
          Period unit for year ('y')
 
Constructor Summary
EppPeriod(int value, char unit)
           
 
Method Summary
static EppEntity fromXML(org.w3c.dom.Node root)
          Converts an XML element into an EppPeriod object.
 char getUnit()
          Gets the unit of the period
 int getValue()
          Gets the value of the period
 void setUnit(char unit)
          Sets the unit of the period, either 'y' for year or 'm' for month
 void setValue(int value)
          Sets the value of the period
 java.lang.String toString()
           
 org.w3c.dom.Element toXML(org.w3c.dom.Document doc, java.lang.String tag)
          Converts the EppPeriod object into an XML element
 
Methods inherited from class com.neulevel.epp.core.EppEntity
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNIT_YEAR

public static final char UNIT_YEAR
Period unit for year ('y')

See Also:
Constant Field Values

UNIT_MONTH

public static final char UNIT_MONTH
Period unit for month ('m')

See Also:
Constant Field Values
Constructor Detail

EppPeriod

public EppPeriod(int value,
                 char unit)
Method Detail

getValue

public int getValue()
Gets the value of the period


setValue

public void setValue(int value)
Sets the value of the period


getUnit

public char getUnit()
Gets the unit of the period


setUnit

public void setUnit(char unit)
Sets the unit of the period, either 'y' for year or 'm' for month


toXML

public org.w3c.dom.Element toXML(org.w3c.dom.Document doc,
                                 java.lang.String tag)
Converts the EppPeriod object into an XML element

Specified by:
toXML in class EppEntity
Parameters:
doc - the XML Document object
tag - the tag/element name for the EppPeriod object
Returns:
an Element object

fromXML

public static EppEntity fromXML(org.w3c.dom.Node root)
Converts an XML element into an EppPeriod object. The caller of this method must make sure that the root node is of the EPP Period type.

Parameters:
root - root node for an EppPeriod object in XML format
Returns:
an EppPeriod object, or null if the node is invalid

toString

public java.lang.String toString()
Specified by:
toString in class EppEntity

EPP 0.2.6

Copyright © 2001-2002 NeuLevel, Inc. All Rights Reserved.