public class Resource extends Object implements Serializable
| Constructor and Description |
|---|
Resource() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(Attribute vAttribute) |
void |
addAttribute(int index,
Attribute vAttribute) |
void |
addResource(int index,
Resource vResource) |
void |
addResource(Resource vResource) |
Enumeration<Attribute> |
enumerateAttribute()
Method enumerateAttribute.
|
Enumeration<Resource> |
enumerateResource()
Method enumerateResource.
|
Attribute[] |
getAttribute()
Method getAttribute.Returns the contents of the collection
in an Array.
|
Attribute |
getAttribute(int index)
Method getAttribute.
|
List<Attribute> |
getAttributeCollection()
Method getAttributeCollection.Returns a reference to
'_attributeList'.
|
int |
getAttributeCount()
Method getAttributeCount.
|
String |
getName()
Returns the value of field 'name'.
|
Resource[] |
getResource()
Method getResource.Returns the contents of the collection in
an Array.
|
Resource |
getResource(int index)
Method getResource.
|
List<Resource> |
getResourceCollection()
Method getResourceCollection.Returns a reference to
'_resourceList'.
|
int |
getResourceCount()
Method getResourceCount.
|
boolean |
isValid()
Method isValid.
|
Iterator<Attribute> |
iterateAttribute()
Method iterateAttribute.
|
Iterator<Resource> |
iterateResource()
Method iterateResource.
|
void |
marshal(ContentHandler handler) |
void |
marshal(Writer out) |
void |
removeAllAttribute() |
void |
removeAllResource() |
boolean |
removeAttribute(Attribute vAttribute)
Method removeAttribute.
|
Attribute |
removeAttributeAt(int index)
Method removeAttributeAt.
|
boolean |
removeResource(Resource vResource)
Method removeResource.
|
Resource |
removeResourceAt(int index)
Method removeResourceAt.
|
void |
setAttribute(Attribute[] vAttributeArray) |
void |
setAttribute(int index,
Attribute vAttribute) |
void |
setAttribute(List<Attribute> vAttributeList)
Sets the value of '_attributeList' by copying the given
Vector.
|
void |
setAttributeCollection(List<Attribute> attributeList)
Deprecated.
|
void |
setName(String name)
Sets the value of field 'name'.
|
void |
setResource(int index,
Resource vResource) |
void |
setResource(List<Resource> vResourceList)
Sets the value of '_resourceList' by copying the given
Vector.
|
void |
setResource(Resource[] vResourceArray) |
void |
setResourceCollection(List<Resource> resourceList)
Deprecated.
|
static Resource |
unmarshal(Reader reader)
Method unmarshal.
|
void |
validate() |
public void addAttribute(Attribute vAttribute) throws IndexOutOfBoundsException
vAttribute - IndexOutOfBoundsException - if the index
given is outside the bounds of the collectionpublic void addAttribute(int index,
Attribute vAttribute)
throws IndexOutOfBoundsException
index - vAttribute - IndexOutOfBoundsException - if the index
given is outside the bounds of the collectionpublic void addResource(Resource vResource) throws IndexOutOfBoundsException
vResource - IndexOutOfBoundsException - if the index
given is outside the bounds of the collectionpublic void addResource(int index,
Resource vResource)
throws IndexOutOfBoundsException
index - vResource - IndexOutOfBoundsException - if the index
given is outside the bounds of the collectionpublic Enumeration<Attribute> enumerateAttribute()
public Enumeration<Resource> enumerateResource()
public Attribute getAttribute(int index) throws IndexOutOfBoundsException
index - IndexOutOfBoundsException - if the index
given is outside the bounds of the collectionpublic Attribute[] getAttribute()
Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.
public List<Attribute> getAttributeCollection()
public int getAttributeCount()
public String getName()
public Resource getResource(int index) throws IndexOutOfBoundsException
index - IndexOutOfBoundsException - if the index
given is outside the bounds of the collectionpublic Resource[] getResource()
Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.
public List<Resource> getResourceCollection()
public int getResourceCount()
public boolean isValid()
public Iterator<Attribute> iterateAttribute()
public Iterator<Resource> iterateResource()
public void marshal(Writer out) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
out - org.exolab.castor.xml.MarshalException - if object is
null or if any SAXException is thrown during marshalingorg.exolab.castor.xml.ValidationException - if this
object is an invalid instance according to the schemapublic void marshal(ContentHandler handler) throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
handler - IOException - if an IOException occurs during
marshalingorg.exolab.castor.xml.ValidationException - if this
object is an invalid instance according to the schemaorg.exolab.castor.xml.MarshalException - if object is
null or if any SAXException is thrown during marshalingpublic void removeAllAttribute()
public void removeAllResource()
public boolean removeAttribute(Attribute vAttribute)
vAttribute - public Attribute removeAttributeAt(int index)
index - public boolean removeResource(Resource vResource)
vResource - public Resource removeResourceAt(int index)
index - public void setAttribute(int index,
Attribute vAttribute)
throws IndexOutOfBoundsException
index - vAttribute - IndexOutOfBoundsException - if the index
given is outside the bounds of the collectionpublic void setAttribute(Attribute[] vAttributeArray)
vAttributeArray - public void setAttribute(List<Attribute> vAttributeList)
vAttributeList - the Vector to copy.public void setAttributeCollection(List<Attribute> attributeList)
attributeList - the Vector to set.public void setName(String name)
name - the value of field 'name'.public void setResource(int index,
Resource vResource)
throws IndexOutOfBoundsException
index - vResource - IndexOutOfBoundsException - if the index
given is outside the bounds of the collectionpublic void setResource(Resource[] vResourceArray)
vResourceArray - public void setResource(List<Resource> vResourceList)
vResourceList - the Vector to copy.public void setResourceCollection(List<Resource> resourceList)
resourceList - the Vector to set.public static Resource unmarshal(Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
reader - org.exolab.castor.xml.MarshalException - if object is
null or if any SAXException is thrown during marshalingorg.exolab.castor.xml.ValidationException - if this
object is an invalid instance according to the schemapublic void validate()
throws org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.ValidationException - if this
object is an invalid instance according to the schemaCopyright © 2018. All rights reserved.