|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.content.MetadataField
public class MetadataField
DSpace object that represents a metadata field, which is defined by a combination of schema, element, and qualifier. Every metadata element belongs in a field.
MetadataValue,
MetadataSchema| Constructor Summary | |
|---|---|
MetadataField()
Default constructor. |
|
MetadataField(int schemaID,
int fieldID,
String element,
String qualifier,
String scopeNote)
Full constructor for existing metadata field elements. |
|
MetadataField(MetadataSchema schema)
Constructor creating a field within a schema. |
|
MetadataField(MetadataSchema schema,
String element,
String qualifier,
String scopeNote)
Full constructor for new metadata field elements. |
|
MetadataField(TableRow row)
Constructor to load the object from the database. |
|
| Method Summary | |
|---|---|
void |
create(Context context)
Creates a new metadata field. |
void |
delete(Context context)
Delete the metadata field. |
boolean |
equals(Object obj)
Return true if other is the same MetadataField
as this object, false otherwise |
static MetadataField |
find(Context context,
int id)
Find the field corresponding to the given numeric ID. |
static MetadataField[] |
findAll(Context context)
Retrieve all Dublin Core types from the registry |
static MetadataField[] |
findAllInSchema(Context context,
int schemaID)
Return all metadata fields that are found in a given schema. |
static MetadataField |
findByElement(Context context,
int schemaID,
String element,
String qualifier)
Retrieves the metadata field from the database. |
static String |
formKey(String schema,
String element,
String qualifier)
Return the HTML FORM key for the given field. |
String |
getElement()
Get the element name. |
int |
getFieldID()
Get the metadata field id. |
String |
getQualifier()
Get the qualifier. |
int |
getSchemaID()
Get the schema record key. |
String |
getScopeNote()
Get the scope note. |
int |
hashCode()
|
void |
setElement(String element)
Set the element name. |
void |
setQualifier(String qualifier)
Set the qualifier. |
void |
setSchemaID(int schemaID)
Set the schema record key. |
void |
setScopeNote(String scopeNote)
Set the scope note. |
void |
update(Context context)
Update the metadata field in the database. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MetadataField()
public MetadataField(MetadataSchema schema)
schema - schema to which the field belongs
public MetadataField(MetadataSchema schema,
String element,
String qualifier,
String scopeNote)
schema - schema to which the field belongselement - element of the fieldqualifier - qualifier of the fieldscopeNote - scope note of the field
public MetadataField(int schemaID,
int fieldID,
String element,
String qualifier,
String scopeNote)
schemaID - schema to which the field belongsfieldID - database ID of field.element - element of the fieldqualifier - qualifier of the fieldscopeNote - scope note of the fieldpublic MetadataField(TableRow row)
row - database row from which to populate object.| Method Detail |
|---|
public String getElement()
public void setElement(String element)
element - new value for elementpublic int getFieldID()
public String getQualifier()
public void setQualifier(String qualifier)
qualifier - new value for qualifierpublic int getSchemaID()
public void setSchemaID(int schemaID)
schemaID - new value for keypublic String getScopeNote()
public void setScopeNote(String scopeNote)
scopeNote - new value for scope note
public void create(Context context)
throws IOException,
AuthorizeException,
SQLException,
NonUniqueMetadataException
context - DSpace context object
IOException
AuthorizeException
SQLException
NonUniqueMetadataException
public static MetadataField findByElement(Context context,
int schemaID,
String element,
String qualifier)
throws SQLException,
AuthorizeException
context - dspace contextschemaID - schema by IDelement - element namequalifier - qualifier (may be ANY or null)
SQLException
AuthorizeException
public static MetadataField[] findAll(Context context)
throws SQLException
context - dspace context
SQLException
public static MetadataField[] findAllInSchema(Context context,
int schemaID)
throws SQLException
context - dspace contextschemaID - schema by db ID
SQLException
public void update(Context context)
throws SQLException,
AuthorizeException,
NonUniqueMetadataException,
IOException
context - dspace context
SQLException
AuthorizeException
NonUniqueMetadataException
IOException
public void delete(Context context)
throws SQLException,
AuthorizeException
context - dspace context
SQLException
AuthorizeException
public static String formKey(String schema,
String element,
String qualifier)
schema - element - qualifier -
public static MetadataField find(Context context,
int id)
throws SQLException
context - context, in case we need to read it in from DBid - the metadata field ID
SQLExceptionpublic boolean equals(Object obj)
true if other is the same MetadataField
as this object, false otherwise
equals in class Objectobj - object to compare to
true if object passed in represents the same
MetadataField as this objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||