|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.content.MetadataValue
public class MetadataValue
Database access class representing a Dublin Core metadata value.
It represents a value of a given 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 qualifer), language,
and a value.
org.dspace.content.MetadataSchema, org.dspace.content.MetadataField| Field Summary | |
|---|---|
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 Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
void |
create(Context context)
Creates a new metadata value. |
void |
delete(Context context)
Delete the metadata field. |
static MetadataValue |
find(Context context,
int valueId)
Retrieves the metadata value from the database. |
static Collection |
findByField(Context context,
int fieldId)
Retrieves the metadata values for a given field from the database. |
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. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public String value
public String language
null
public int place
| Constructor Detail |
|---|
public MetadataValue(TableRow row)
row - database row to use for contentspublic MetadataValue()
public MetadataValue(MetadataField field)
field - inital value for field| Method Detail |
|---|
public 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 value
public void create(Context context)
throws SQLException,
AuthorizeException
context - DSpace context object
SQLException
AuthorizeException
public static MetadataValue find(Context context,
int valueId)
throws IOException,
SQLException,
AuthorizeException
context - dspace contextvalueId - database key id of value
IOException
SQLException
AuthorizeException
public static Collection findByField(Context context,
int fieldId)
throws IOException,
SQLException,
AuthorizeException
context - dspace contextfieldId - field whose values to look for
IOException
SQLException
AuthorizeException
public void update(Context context)
throws SQLException,
AuthorizeException
context - dspace context
SQLException
AuthorizeException
public void delete(Context context)
throws SQLException,
AuthorizeException
context - dspace context
SQLException
AuthorizeException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||