public class TLcdXMLFeaturedObject extends Object implements ILcdXMLElementInfo,ILcdSelfDescribedFeatured, Cloneable
ILcdSelfDescribedFeatured
.
The decoder/encoder for each format should define how the XML content is mapped on the features of a
TLcdXMLFeaturedObject
.Constructor and Description |
---|
TLcdXMLFeaturedObject(TLcdXMLFeaturedDescriptor aFeaturedDescriptor)
Creates a new
TLcdXMLFeaturedDescriptor , initialized with the specified
TLcdXMLFeaturedDescriptor . |
Modifier and Type | Method and Description |
---|---|
boolean |
canSetFeature(int aIndex)
Checks whether the specified feature is editable.
|
TLcdXMLFeaturedObject |
clone() |
Object |
getFeature(int aIndex)
Returns the feature
Object at the given index. |
Object |
getFeature(String aFeatureName)
Returns the value of the specified feature or
null if this object does not contain a feature with the
given name. |
int |
getFeatureCount()
Returns the number of features.
|
TLcdXMLFeaturedDescriptor |
getFeaturedDescriptor()
Returns the
ILcdFeaturedDescriptor describing this ILcdFeatured object. |
QName |
getXMLName()
Returns the qualified XML name of this element.
|
boolean |
isNil()
Returns
true if the content of this element is nil, false otherwise. |
void |
setFeature(int aIndex,
Object aFeature)
Sets the feature
Object at the given index. |
void |
setFeature(String aFeatureName,
Object aValue)
Sets the value of the specified feature.
|
void |
setNil(boolean aNil)
Sets whether the content of this element is nil.
|
void |
setXMLName(QName aName)
Sets the qualified XML name of this element.
|
String |
toString() |
public TLcdXMLFeaturedObject(TLcdXMLFeaturedDescriptor aFeaturedDescriptor)
TLcdXMLFeaturedDescriptor
, initialized with the specified
TLcdXMLFeaturedDescriptor
.aFeaturedDescriptor
- the featured descriptor describing this object.public boolean isNil()
ILcdXMLElementInfo
true
if the content of this element is nil, false
otherwise.isNil
in interface ILcdXMLElementInfo
true
if the content of this element is nil, false
otherwise.public void setNil(boolean aNil)
ILcdXMLElementInfo
setNil
in interface ILcdXMLElementInfo
aNil
- whether the content of this element is nil.public QName getXMLName()
ILcdXMLElementInfo
getXMLName
in interface ILcdXMLElementInfo
public void setXMLName(QName aName)
ILcdXMLElementInfo
setXMLName
in interface ILcdXMLElementInfo
aName
- the name of this element.public TLcdXMLFeaturedDescriptor getFeaturedDescriptor()
ILcdSelfDescribedFeatured
ILcdFeaturedDescriptor
describing this ILcdFeatured
object.getFeaturedDescriptor
in interface ILcdSelfDescribedFeatured
ILcdFeaturedDescriptor
describing this ILcdFeatured
object.public boolean canSetFeature(int aIndex)
ILcdFeatured
canSetFeature
in interface ILcdFeatured
aIndex
- a valid feature index.public Object getFeature(int aIndex) throws IndexOutOfBoundsException
ILcdFeatured
Object
at the given index.getFeature
in interface ILcdFeatured
aIndex
- a valid feature index.Object
at the given index.IndexOutOfBoundsException
- when an index is chosen greater than the result of getFeatureCount.ILcdFeatured.setFeature(int, java.lang.Object)
public int getFeatureCount()
ILcdFeatured
getFeatureCount
in interface ILcdFeatured
public void setFeature(int aIndex, Object aFeature) throws IllegalArgumentException
ILcdFeatured
Object
at the given index.setFeature
in interface ILcdFeatured
aIndex
- a valid feature index.aFeature
- the new feature Object
.IllegalArgumentException
- if the feature can't be set.ILcdFeatured.getFeature(int)
,
ILcdFeatured.canSetFeature(int)
public Object getFeature(String aFeatureName)
ILcdSelfDescribedFeatured
null
if this object does not contain a feature with the
given name.getFeature
in interface ILcdSelfDescribedFeatured
aFeatureName
- the name of the featurenull
public void setFeature(String aFeatureName, Object aValue) throws IllegalArgumentException
ILcdSelfDescribedFeatured
setFeature
in interface ILcdSelfDescribedFeatured
aFeatureName
- the name of the feature to modifyaValue
- the new value for the featureIllegalArgumentException
- if the given value is not valid for the specified feature or if the specified
feature is not available in this objectpublic TLcdXMLFeaturedObject clone()