com.neulevel.epp.core
Class EppPeriod
java.lang.Object
|
+--com.neulevel.epp.core.EppEntity
|
+--com.neulevel.epp.core.EppPeriod
- public class EppPeriod
- extends EppEntity
This EppPeriod
class implements EPP Domain periodType entity.
- Version:
- $Revision: 1.1 $ $Date: 2001/11/05 20:20:36 $
- 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 java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
UNIT_YEAR
public static final char UNIT_YEAR
- Period unit for year ('y')
UNIT_MONTH
public static final char UNIT_MONTH
- Period unit for month ('m')
EppPeriod
public EppPeriod(int value,
char unit)
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
- Overrides:
- toXML in class EppEntity
- Parameters:
doc
- the XML Document
objecttag
- 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()
- Overrides:
- toString in class EppEntity
Copyright © 2001 NeuStar, Inc. All Rights Reserved.