Package org.dspace.app.rest.converter
Class CollectionConverter
- java.lang.Object
-
- org.dspace.app.rest.converter.DSpaceObjectConverter<Collection,CollectionRest>
-
- org.dspace.app.rest.converter.CollectionConverter
-
- All Implemented Interfaces:
DSpaceConverter<Collection,CollectionRest>,IndexableObjectConverter<Collection,CollectionRest>
@Component public class CollectionConverter extends DSpaceObjectConverter<Collection,CollectionRest> implements IndexableObjectConverter<Collection,CollectionRest>
This is the converter from/to the Collection in the DSpace API data model and the REST data model- Author:
- Andrea Bollini (andrea.bollini at 4science.it)
-
-
Constructor Summary
Constructors Constructor Description CollectionConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectionRestconvert(Collection collection, Projection projection)Convert a DSpace model object into its equivalent REST resource, applying a given projection.Class<Collection>getModelClass()For what DSpace API model class does this converter convert?protected CollectionRestnewInstance()booleansupportsModel(IndexableObject idxo)-
Methods inherited from class org.dspace.app.rest.converter.DSpaceObjectConverter
getPermissionFilteredMetadata
-
-
-
-
Method Detail
-
convert
public CollectionRest convert(Collection collection, Projection projection)
Description copied from interface:DSpaceConverterConvert a DSpace model object into its equivalent REST resource, applying a given projection.- Specified by:
convertin interfaceDSpaceConverter<Collection,CollectionRest>- Overrides:
convertin classDSpaceObjectConverter<Collection,CollectionRest>- Parameters:
collection- a DSpace API model object.- Returns:
- a resource representing the model object.
-
newInstance
protected CollectionRest newInstance()
- Specified by:
newInstancein classDSpaceObjectConverter<Collection,CollectionRest>
-
getModelClass
public Class<Collection> getModelClass()
Description copied from interface:DSpaceConverterFor what DSpace API model class does this converter convert?- Specified by:
getModelClassin interfaceDSpaceConverter<Collection,CollectionRest>- Returns:
- Class of model objects represented.
-
supportsModel
public boolean supportsModel(IndexableObject idxo)
- Specified by:
supportsModelin interfaceIndexableObjectConverter<Collection,CollectionRest>- Parameters:
idxo- the IndexableObject to check- Returns:
- true if the actual converter implementation is able to manage the supplied IndexableObject
-
-