Package org.dspace.content.service
Interface MetadataSchemaService
- All Known Implementing Classes:
MetadataSchemaServiceImpl
public interface MetadataSchemaService
Service interface class for the MetadataSchema object.
The implementation of this class is responsible for all business logic calls for the MetadataSchema object and is
autowired by spring
- Author:
- kevinvandevelde at atmire.com
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new metadata schema in the database, using the name and namespace.voiddelete(Context context, MetadataSchema metadataSchema) Delete the metadata schema.Get the schema corresponding with this numeric ID.Get the schema corresponding with this short name.Return all metadata schemas.findByNamespace(Context context, String namespace) Get the schema object corresponding to this namespace URI.voidupdate(Context context, MetadataSchema metadataSchema) Update the metadata schema in the database.
-
Method Details
-
create
MetadataSchema create(Context context, String name, String namespace) throws SQLException, AuthorizeException, NonUniqueMetadataException Creates a new metadata schema in the database, using the name and namespace.- Parameters:
context- DSpace context objectname- namenamespace- namespace- Returns:
- new MetadataSchema
- Throws:
SQLException- if database errorAuthorizeException- if authorization errorNonUniqueMetadataException- if an existing field with an identical element and qualifier is already present
-
findByNamespace
Get the schema object corresponding to this namespace URI.- Parameters:
context- DSpace contextnamespace- namespace URI to match- Returns:
- metadata schema object or null if none found.
- Throws:
SQLException- if database error
-
update
void update(Context context, MetadataSchema metadataSchema) throws SQLException, AuthorizeException, NonUniqueMetadataException Update the metadata schema in the database.- Parameters:
context- DSpace contextmetadataSchema- metadata schema- Throws:
SQLException- if database errorAuthorizeException- if authorization errorNonUniqueMetadataException- if an existing field with an identical element and qualifier is already present
-
delete
Delete the metadata schema.- Parameters:
context- DSpace contextmetadataSchema- metadata schema- Throws:
SQLException- if database errorAuthorizeException- if authorization error
-
findAll
Return all metadata schemas.- Parameters:
context- DSpace context- Returns:
- array of metadata schemas
- Throws:
SQLException- if database error
-
find
Get the schema corresponding with this numeric ID. The ID is a database key internal to DSpace.- Parameters:
context- context, in case we need to read it in from DBid- the schema ID- Returns:
- the metadata schema object
- Throws:
SQLException- if database error
-
find
Get the schema corresponding with this short name.- Parameters:
context- context, in case we need to read it in from DBshortName- the short name for the schema- Returns:
- the metadata schema object
- Throws:
SQLException- if database error
-