public class MetadataValue extends Object
MetadataField on an Item.
(The Item can have many values of the same field.) It contains element, qualifier, value and language.
the field (which names the schema, element, and qualifier), language,
and a value.MetadataSchema,
MetadataField| Modifier and Type | Field and Description |
|---|---|
String |
authority
Authority key, if any
|
int |
confidence
Authority confidence value -- see Choices class for values
|
String |
language
The language of the field, may be
null |
int |
place
The position of the record.
|
String |
value
The value of the field
|
| Constructor and Description |
|---|
MetadataValue()
Default constructor.
|
MetadataValue(MetadataField field)
Constructor to create a value for a given field.
|
MetadataValue(TableRow row)
Construct the metadata object from the matching database row.
|
| Modifier and Type | Method and Description |
|---|---|
void |
create(Context context)
Creates a new metadata value.
|
void |
delete(Context context)
Delete the metadata field.
|
boolean |
equals(Object obj)
Return
true if other is the same MetadataValue
as this object, false otherwise |
static MetadataValue |
find(Context context,
int valueId)
Retrieves the metadata value from the database.
|
static List<MetadataValue> |
findByField(Context context,
int fieldId)
Retrieves the metadata values for a given field from the database.
|
String |
getAuthority()
Get the metadata authority
|
int |
getConfidence()
Get the metadata confidence
|
int |
getFieldId()
Get the field ID the metadata value represents.
|
int |
getItemId()
Get the item ID.
|
String |
getLanguage()
Get the language (e.g.
|
int |
getPlace()
Get the place ordering.
|
String |
getValue()
Get the metadata value.
|
int |
getValueId()
Get the value ID.
|
int |
hashCode() |
void |
setAuthority(String value)
Set the metadata authority
|
void |
setConfidence(int value)
Set the metadata confidence
|
void |
setFieldId(int fieldId)
Set the field ID that the metadata value represents.
|
void |
setItemId(int itemId)
Set the item ID.
|
void |
setLanguage(String language)
Set the language (e.g.
|
void |
setPlace(int place)
Set the place ordering.
|
void |
setValue(String value)
Set the metadata value
|
void |
update(Context context)
Update the metadata value in the database.
|
public String value
public String language
nullpublic int place
public String authority
public int confidence
public MetadataValue(TableRow row)
row - database row to use for contentspublic MetadataValue()
public MetadataValue(MetadataField field)
field - initial value for fieldpublic int getFieldId()
public void setFieldId(int fieldId)
fieldId - new field IDpublic int getItemId()
public void setItemId(int itemId)
itemId - new item IDpublic String getLanguage()
public void setLanguage(String language)
language - new languagepublic int getPlace()
public void setPlace(int place)
place - new place (relative order in series of values)public int getValueId()
public String getValue()
public void setValue(String value)
value - new metadata valuepublic String getAuthority()
public void setAuthority(String value)
value - new metadata authoritypublic int getConfidence()
public void setConfidence(int value)
value - new metadata confidencepublic void create(Context context) throws SQLException, AuthorizeException
context - DSpace context objectSQLExceptionAuthorizeExceptionpublic static MetadataValue find(Context context, int valueId) throws IOException, SQLException, AuthorizeException
context - dspace contextvalueId - database key id of valueIOExceptionSQLExceptionAuthorizeExceptionpublic static List<MetadataValue> findByField(Context context, int fieldId) throws IOException, SQLException, AuthorizeException
context - dspace contextfieldId - field whose values to look forIOExceptionSQLExceptionAuthorizeExceptionpublic void update(Context context) throws SQLException, AuthorizeException
context - dspace contextSQLExceptionAuthorizeExceptionpublic void delete(Context context) throws SQLException, AuthorizeException
context - dspace contextSQLExceptionAuthorizeExceptionpublic boolean equals(Object obj)
true if other is the same MetadataValue
as this object, false otherwiseCopyright © 2015 DuraSpace. All Rights Reserved.