Functions for working with metadata schemas and fields.
Summary
Functions
Creates a metadata field under the given schema.
Creates a metadata schema.
Deletes a metadata field.
Deletes a metadata schema.
Fetches a single metadata field by ID.
Fetches a single metadata schema by ID.
Finds metadata fields based on the given options.
Lists metadata fields of the repository.
Lists all metadata schemas of the repository.
Updates a metadata field.
Updates a metadata schema.
Functions
@spec create_field( map(), keyword() ) :: DSpace.API.Operation.t()
Creates a metadata field under the given schema.
Executing this operation requires administrator privileges.
@spec create_schema( map(), keyword() ) :: DSpace.API.Operation.t()
Creates a metadata schema.
@spec delete_field(binary()) :: DSpace.API.Operation.t()
Deletes a metadata field.
@spec delete_schema(binary()) :: DSpace.API.Operation.t()
Deletes a metadata schema.
@spec fetch_field(binary()) :: DSpace.API.Operation.t()
Fetches a single metadata field by ID.
@spec fetch_schema(binary()) :: DSpace.API.Operation.t()
Fetches a single metadata schema by ID.
@spec find_fields(keyword()) :: DSpace.API.Operation.t()
Finds metadata fields based on the given options.
This operation can be streamed.
Options
:name- exact fully qualified field (e.g., "dc.title", "dc.contributor.author"):schema- prefix of the metadata schema (e.g., "dc", "eperson"):element- a field's element (e.g., "contributor", "title"):qualifier- a field's qualifier (e.g., "author"):query– search term (e.g., "dc.ti", "contributor", "auth", "contributor.ot"):page- Page number (0-based, defaults to 0):size- Number of items per page (usually defaults to 20)
@spec list_fields(keyword()) :: DSpace.API.Operation.t()
Lists metadata fields of the repository.
Providing a schema option limits the results to the fields defined by the schema. The API currently doesn't support providing several schemas at once.
This operation can be streamed.
Options
:schema- prefix of a metadata schema (e.g., "dc"):page- Page number (0-based, defaults to 0):size- Number of items per page (usually defaults to 20)
@spec list_schemas(keyword()) :: DSpace.API.Operation.t()
Lists all metadata schemas of the repository.
This operation can be streamed.
Options
:page- Page number (0-based, defaults to 0):size- Number of items per page (usually defaults to 20)
@spec update_field(binary(), map()) :: DSpace.API.Operation.t()
Updates a metadata field.
The API only supports updating the scope note of a field.
@spec update_schema(binary(), map()) :: DSpace.API.Operation.t()
Updates a metadata schema.