Package org.dspace.app.rest.converter
Class MetadataConverter
- java.lang.Object
-
- org.dspace.app.rest.converter.MetadataConverter
-
- All Implemented Interfaces:
DSpaceConverter<MetadataValueList,MetadataRest>
@Component public class MetadataConverter extends Object implements DSpaceConverter<MetadataValueList,MetadataRest>
Converter to translate between lists of domainMetadataValues andMetadataRestrepresentations.
-
-
Constructor Summary
Constructors Constructor Description MetadataConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetadataRestconvert(MetadataValueList metadataValues, Projection projection)Class<MetadataValueList>getModelClass()voidsetMetadata(Context context, DSpaceObject dso, MetadataRest metadataRest)Sets a DSpace object's domain metadata values from a rest representation.
-
-
-
Method Detail
-
convert
public MetadataRest convert(MetadataValueList metadataValues, Projection projection)
- Specified by:
convertin interfaceDSpaceConverter<MetadataValueList,MetadataRest>
-
getModelClass
public Class<MetadataValueList> getModelClass()
- Specified by:
getModelClassin interfaceDSpaceConverter<MetadataValueList,MetadataRest>
-
setMetadata
public void setMetadata(Context context, DSpaceObject dso, MetadataRest metadataRest) throws SQLException, AuthorizeException
Sets a DSpace object's domain metadata values from a rest representation.- Parameters:
context- the context to use.dso- the DSpace object.metadataRest- the rest representation of the new metadata.- Throws:
SQLException- if a database error occurs.AuthorizeException- if an authorization error occurs.
-
-