|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MetaDataObject
An object used to represent metadata of a Resource
.
A list of all attributes on a MetaDataObject
can be obtained by calling its
listAttributes()
method. The values of attributes can be get and set by using the
getAttributeValue(String)
and setAttributeValue(String,Object)
methods. The
value of an attribute may be any Object, including another MetaDataObject
.
MetaDataObject
s are not required to allow modification of their attributes'
values. An application should check the isModifiable()
method to determine if attribute
values can be modified. Calling setAttributeValue(String,Object)
on an unmodifiable
object will result in a UIMA_UnsupportedOperationException
.
Method Summary | |
---|---|
Object |
clone()
Creates a clone of this MetaDataObject . |
boolean |
equals(Object aObj)
Determines if this object is equal to another. |
Object |
getAttributeValue(String aName)
Retrieves the value of an attribute of this MetaDataObject . |
URL |
getSourceUrl()
Gets the URL from which this object was parsed. |
String |
getSourceUrlString()
If the sourceURL of this object is non-null, returns its string representation. |
boolean |
isModifiable()
Returns whether this MetaDataObject allows the values of its attributes to be
modified. |
List<NameClassPair> |
listAttributes()
Retrieves all attributes on this MetaDataObject . |
void |
setAttributeValue(String aName,
Object aValue)
Sets the value of an attribute of this MetaDataObject . |
void |
setSourceUrl(URL aUrl)
Sets the URL from which this object was parsed. |
Methods inherited from interface org.apache.uima.util.XMLizable |
---|
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML |
Method Detail |
---|
List<NameClassPair> listAttributes()
MetaDataObject
.
NameClassPair
objects, each of which
contains the name of a parameter and the Class of its value. For primitive types, the
wrapper classes will be returned (e.g. java.lang.Integer
instead of
int).Object getAttributeValue(String aName)
MetaDataObject
.
aName
- the name of the parameter to get
aName
. Returns null
if
there is no attribute with that name.boolean isModifiable()
MetaDataObject
allows the values of its attributes to be
modified.
void setAttributeValue(String aName, Object aValue)
MetaDataObject
. Applications should
first check the isModifiable()
method; calling
setAttributeValue(String, Object)
on an unmodifiable MetaDataObject
will result in an exception.
aName
- the name of the parameter to setaValue
- the value to assign to the parameter
UIMA_UnsupportedOperationException
- if this MetaDataObject
is not modifiable.
UIMA_IllegalArgumentException
- if the given value is not appropriate for the given attribute.Object clone()
MetaDataObject
. This performs a "deep" copy by cloning
all attribute values that are also MetaDataObjects.
MetaDataObject
boolean equals(Object aObj)
equals
in class Object
aObj
- an object with which to compare this object
aObj
URL getSourceUrl()
This setting is used to resolve imports and is also included in exception messages to indicate the source of the problem.
String getSourceUrlString()
void setSourceUrl(URL aUrl)
aUrl
- the location of the XML file from which this object was parsed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |