public abstract class RateComponentModel extends java.lang.Object implements ContextualNode, XMLMarshallable
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="component">
<xs:complexType>
<xs:sequence>
<xs:element ref="property" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="component" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="type" type="xs:string"/>
<xs:attribute name="description" type="xs:string"/>
</xs:complexType>
</xs:element>
| Constructor and Description |
|---|
RateComponentModel()
Builds an empty RateComponentModel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String name,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
abstract boolean |
checkValidity()
Returns true if the component is valid.
|
ContextualNode |
findRootRateModel()
Find the parent
RateComponentModel. |
RateComponentModel |
getChildAt(int index)
Gets a child.
|
int |
getChildCount()
Gets the child count.
|
java.util.Vector<RateComponentModel> |
getChildren()
Gets the children.
|
RatingContextDescription |
getContext(ContextualNode child)
Gets the context description for the specified child;
The context description contains all the context properties.
|
java.lang.String |
getDescription()
Gets the description.
|
abstract int |
getMaxChildCount()
Gets the maximum child count.
|
java.lang.String |
getName()
Gets the name.
|
ContextualNode |
getParent() |
java.util.List<java.lang.String> |
getPropertyNames()
Deprecated.
Use
getPropertyReferences() instead, in order to get detailed property descriptions. |
abstract java.util.List<com.highdeal.pnr.hci.PropertyReference> |
getPropertyReferences()
Returns the list of the properties that are used in this component.
|
RatingContextDescription |
inheritedContext()
Gets the inherited context;
The context description contains all the context properties.
|
boolean |
isRemoveChildAllowed(int index)
Test if removing a child at an index is allowed.
|
boolean |
isSetChildAllowed(int index)
Tests if setting a child at an index is allowed.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
remove()
Clears the component to remove it.
|
void |
removeChild(int index)
Removes a child.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setChild(int index,
RateComponentModel component)
Sets a child.
|
void |
setChildren(java.util.Vector<RateComponentModel> children)
Sets the children.
|
void |
setDescription(java.lang.String description)
Sets the description.
|
void |
setName(java.lang.String name)
Sets the name.
|
void |
setParent(ContextualNode node)
Sets the parent node
|
public RateComponentModel()
public void setName(java.lang.String name)
name - the name.public java.lang.String getName()
public void setDescription(java.lang.String description)
description - the description.public java.lang.String getDescription()
public int getChildCount()
public RateComponentModel getChildAt(int index) throws java.lang.IndexOutOfBoundsException
index - the index of the desired child.java.lang.IndexOutOfBoundsExceptionpublic abstract int getMaxChildCount()
public abstract boolean checkValidity()
public abstract java.util.List<com.highdeal.pnr.hci.PropertyReference> getPropertyReferences()
@Deprecated public final java.util.List<java.lang.String> getPropertyNames()
getPropertyReferences() instead, in order to get detailed property descriptions.public void setChild(int index,
RateComponentModel component)
throws java.lang.IndexOutOfBoundsException
index - the index where to place the child.component - the child component.java.lang.IndexOutOfBoundsExceptionpublic void removeChild(int index)
throws java.lang.IndexOutOfBoundsException
index - the index of the child to remove.java.lang.IndexOutOfBoundsExceptionpublic void remove()
public boolean isSetChildAllowed(int index)
throws java.lang.IndexOutOfBoundsException
index - the index of the desired child.java.lang.IndexOutOfBoundsExceptionpublic boolean isRemoveChildAllowed(int index)
throws java.lang.IndexOutOfBoundsException
index - the index of the desired child.java.lang.IndexOutOfBoundsExceptionpublic void setChildren(java.util.Vector<RateComponentModel> children)
children - a Vector of RateComponentModel representing the children.public ContextualNode findRootRateModel()
RateComponentModel.RateComponentModelpublic java.util.Vector<RateComponentModel> getChildren()
RateComponentModel representing the children.public void setParent(ContextualNode node)
ContextualNodesetParent in interface ContextualNodenode - The parent nodepublic ContextualNode getParent()
public RatingContextDescription getContext(ContextualNode child)
ContextualNodegetContext in interface ContextualNodechild - The child nodepublic RatingContextDescription inheritedContext()
ContextualNodeinheritedContext in interface ContextualNodepublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(java.lang.String name,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallablename - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into