|
SAP Convergent Charging
Java and XML APIs (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.pnr.hci.DurationModel
public class DurationModel
This class represents the model of the duration.
A duration is composed by a quantity and a unit of time.
The quantity can be zero or a positive or negative integer.
By default the quantity is zero and the time unit is null.
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:simpleType name="TimeUnit">
<xs:restriction base="xs:string">
<xs:enumeration value="second"/>
<xs:enumeration value="minute"/>
<xs:enumeration value="hour"/>
<xs:enumeration value="day"/>
<xs:enumeration value="month"/>
<xs:enumeration value="year"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Duration">
<xs:attribute name="quantity" type="xs:integer" use="required"/>
<xs:attribute name="timeUnit" type="TimeUnit" use="required"/>
</xs:complexType>
| Constructor Summary | |
|---|---|
DurationModel()
|
|
| Method Summary | |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element. |
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the child representing
the marshallable object which must be added to the element. |
static com.highdeal.util.UnitOfTime[] |
getAuthorizedUnitOfTime()
Gets the list of authorized unit of time. |
int |
getQuantity()
Returns the quantity of unit of time of this duration. |
com.highdeal.util.UnitOfTime |
getUnitOfTime()
Returns the unit of time of this duration. |
boolean |
isWellFormed()
Check whether this duration is well formed or not. |
void |
marshal(XMLOutputter output)
Deprecated. |
void |
marshalAttributes(XMLOutputter output)
Gives an XML representation of the attributes of an object. |
void |
marshalChildren(XMLOutputter output)
Gives an XML representation of the child objects of an object. |
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being processed. |
void |
setQuantity(int quantity)
Sets the quantity of time of time unit of this duration. |
void |
setUnitOfTime(com.highdeal.util.UnitOfTime timeUnit)
Sets the unit of time of this duration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DurationModel()
| Method Detail |
|---|
public int getQuantity()
unit of time of this duration.
public void setQuantity(int quantity)
time unit of this duration.
quantity - zero, a positive or negative integer whether the duration means after or before respectively.public com.highdeal.util.UnitOfTime getUnitOfTime()
unit of time of this duration.
UnitOfTime if set, null otherwise.setUnitOfTime(UnitOfTime),
isWellFormed()public void setUnitOfTime(com.highdeal.util.UnitOfTime timeUnit)
timeUnit - an item of the enumeration UnitOfTime,
null is accepted but this duration will not be well formed.isWellFormed()public boolean isWellFormed()
UnitOfTime, false otherwise.public static com.highdeal.util.UnitOfTime[] getAuthorizedUnitOfTime()
public void setAttributes(XMLAttributes atts)
XMLMarshallable
setAttributes in interface XMLMarshallableatts - The XML attributes of the current element
public void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.
addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void marshalAttributes(XMLOutputter output)
IXMLMarshallable
marshalAttributes in interface IXMLMarshallableoutput - The XML output to marshal the object attributes intopublic void marshalChildren(XMLOutputter output)
IXMLMarshallable
marshalChildren in interface IXMLMarshallableoutput - The XML output to marshal the child objects intopublic void addCharacterData(java.lang.String cData)
XMLMarshallable
addCharacterData in interface XMLMarshallablecData - The character data to be added@Deprecated public void marshal(XMLOutputter output)
XMLMarshallable
marshal in interface IXMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into
|
Document Published: October 2015 (SAP CC 4.0 SP10 and Later) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||