|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.content.MetadataSchema
public class MetadataSchema
Class representing a schema in DSpace.
The schema object exposes a name which can later be used to generate
namespace prefixes in RDF or XML, e.g. the core DSpace Dublin Core schema
would have a name of 'dc'.
MetadataValue,
MetadataField| Field Summary | |
|---|---|
static String |
DC_SCHEMA
Short Name of built-in Dublin Core schema. |
static int |
DC_SCHEMA_ID
Numeric Identifier of built-in Dublin Core schema. |
| Constructor Summary | |
|---|---|
MetadataSchema()
Default constructor. |
|
MetadataSchema(int schemaID,
String namespace,
String name)
Object constructor. |
|
MetadataSchema(String namespace,
String name)
Immutable object constructor for creating a new schema. |
|
MetadataSchema(TableRow row)
Constructor for loading the metadata schema from the database. |
|
| Method Summary | |
|---|---|
void |
create(Context context)
Creates a new metadata schema in the database, out of this object. |
void |
delete(Context context)
Delete the metadata schema. |
boolean |
equals(Object obj)
|
static MetadataSchema |
find(Context context,
int id)
Get the schema corresponding with this numeric ID. |
static MetadataSchema |
find(Context context,
String shortName)
Get the schema corresponding with this short name. |
static MetadataSchema[] |
findAll(Context context)
Return all metadata schemas. |
static MetadataSchema |
findByNamespace(Context context,
String namespace)
Get the schema object corresponding to this namespace URI. |
String |
getName()
Get the schema name. |
String |
getNamespace()
Get the schema namespace. |
int |
getSchemaID()
Get the schema record key number. |
int |
hashCode()
|
void |
setName(String name)
Set the schema name. |
void |
setNamespace(String namespace)
Set the schema namespace. |
void |
update(Context context)
Update the metadata schema in the database. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DC_SCHEMA_ID
public static final String DC_SCHEMA
| Constructor Detail |
|---|
public MetadataSchema()
public MetadataSchema(int schemaID,
String namespace,
String name)
schemaID - database key ID numbernamespace - XML namespace URIname - short name of schema
public MetadataSchema(String namespace,
String name)
namespace - XML namespace URIname - short name of schemapublic MetadataSchema(TableRow row)
row - table row object from which to populate this schema.| Method Detail |
|---|
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String getNamespace()
public void setNamespace(String namespace)
namespace - XML namespace URIpublic String getName()
public void setName(String name)
name - short name of schemapublic int getSchemaID()
public void create(Context context)
throws SQLException,
AuthorizeException,
NonUniqueMetadataException
context - DSpace context object
SQLException
AuthorizeException
NonUniqueMetadataException
public static MetadataSchema findByNamespace(Context context,
String namespace)
throws SQLException
context - DSpace contextnamespace - namespace URI to match
SQLException
public void update(Context context)
throws SQLException,
AuthorizeException,
NonUniqueMetadataException
context - DSpace context
SQLException
AuthorizeException
NonUniqueMetadataException
public void delete(Context context)
throws SQLException,
AuthorizeException
context - DSpace context
SQLException
AuthorizeException
public static MetadataSchema[] findAll(Context context)
throws SQLException
context - DSpace context
SQLException
public static MetadataSchema find(Context context,
int id)
throws SQLException
context - context, in case we need to read it in from DBid - the schema ID
SQLException
public static MetadataSchema find(Context context,
String shortName)
throws SQLException
context - context, in case we need to read it in from DBshortName - the short name for the schema
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||