public abstract class RateComponentModel extends 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(String cData)
Adds character data to the content element.
|
void |
addChild(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.
|
RateComponentModel |
getChildAt(int index)
Gets a child.
|
int |
getChildCount()
Gets the child count.
|
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.
|
String |
getDescription()
Gets the description.
|
abstract int |
getMaxChildCount()
Gets the maximum child count.
|
String |
getName()
Gets the name.
|
ContextualNode |
getParent() |
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(Vector<RateComponentModel> children)
Sets the children.
|
void |
setDescription(String description)
Sets the description.
|
void |
setName(String name)
Sets the name.
|
void |
setParent(ContextualNode node)
Sets the parent node
|
public RateComponentModel()
public void setName(String name)
name - the name.public String getName()
public void setDescription(String description)
description - the description.public String getDescription()
public int getChildCount()
public RateComponentModel getChildAt(int index) throws IndexOutOfBoundsException
index - the index of the desired child.IndexOutOfBoundsExceptionpublic abstract int getMaxChildCount()
public abstract boolean checkValidity()
public void setChild(int index,
RateComponentModel component)
throws IndexOutOfBoundsException
index - the index where to place the child.component - the child component.IndexOutOfBoundsExceptionpublic void removeChild(int index)
throws IndexOutOfBoundsException
index - the index of the child to remove.IndexOutOfBoundsExceptionpublic void remove()
public boolean isSetChildAllowed(int index)
throws IndexOutOfBoundsException
index - the index of the desired child.IndexOutOfBoundsExceptionpublic boolean isRemoveChildAllowed(int index)
throws IndexOutOfBoundsException
index - the index of the desired child.IndexOutOfBoundsExceptionpublic void setChildren(Vector<RateComponentModel> children)
children - a Vector of RateComponentModel representing the children.public 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(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(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