public class MetadataValue
extends java.lang.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 |
|---|---|
java.lang.String |
authority
Authority key, if any
|
int |
confidence
Authority confidence value -- see Choices class for values
|
java.lang.String |
language
The language of the field, may be
null |
int |
place
The position of the record.
|
java.lang.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(java.lang.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 java.util.List<MetadataValue> |
findByField(Context context,
int fieldId)
Retrieves the metadata values for a given field from the database.
|
java.lang.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.
|
java.lang.String |
getLanguage()
Get the language (e.g.
|
int |
getPlace()
Get the place ordering.
|
java.lang.String |
getValue()
Get the metadata value.
|
int |
getValueId()
Get the value ID.
|
int |
hashCode() |
void |
setAuthority(java.lang.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(java.lang.String language)
Set the language (e.g.
|
void |
setPlace(int place)
Set the place ordering.
|
void |
setValue(java.lang.String value)
Set the metadata value
|
void |
update(Context context)
Update the metadata value in the database.
|
public java.lang.String value
public java.lang.String language
nullpublic int place
public java.lang.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 java.lang.String getLanguage()
public void setLanguage(java.lang.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 java.lang.String getValue()
public void setValue(java.lang.String value)
value - new metadata valuepublic java.lang.String getAuthority()
public void setAuthority(java.lang.String value)
value - new metadata authoritypublic int getConfidence()
public void setConfidence(int value)
value - new metadata confidencepublic void create(Context context) throws java.sql.SQLException, AuthorizeException
context - DSpace context objectjava.sql.SQLExceptionAuthorizeExceptionpublic static MetadataValue find(Context context, int valueId) throws java.io.IOException, java.sql.SQLException, AuthorizeException
context - dspace contextvalueId - database key id of valuejava.io.IOExceptionjava.sql.SQLExceptionAuthorizeExceptionpublic static java.util.List<MetadataValue> findByField(Context context, int fieldId) throws java.io.IOException, java.sql.SQLException, AuthorizeException
context - dspace contextfieldId - field whose values to look forjava.io.IOExceptionjava.sql.SQLExceptionAuthorizeExceptionpublic void update(Context context) throws java.sql.SQLException, AuthorizeException
context - dspace contextjava.sql.SQLExceptionAuthorizeExceptionpublic void delete(Context context) throws java.sql.SQLException, AuthorizeException
context - dspace contextjava.sql.SQLExceptionAuthorizeExceptionpublic boolean equals(java.lang.Object obj)
true if other is the same MetadataValue
as this object, false otherwiseequals in class java.lang.Objectobj - object to compare totrue if object passed in represents the same
MetadataValue as this objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2013 DuraSpace. All Rights Reserved.