Class VocabularyRestConverter

  • All Implemented Interfaces:
    DSpaceConverter<org.dspace.content.authority.ChoiceAuthority,​VocabularyRest>

    @Component
    public class VocabularyRestConverter
    extends Object
    implements DSpaceConverter<org.dspace.content.authority.ChoiceAuthority,​VocabularyRest>
    This is the converter from/to the ChoiceAuthority in the DSpace API data model and the REST data model TODO please do not use this convert but use the wrapper AuthorityUtils#convertAuthority(ChoiceAuthority, String, String)
    Author:
    Luigi Andrea Pascarelli (luigiandrea.pascarelli at 4science.it)
    • Constructor Detail

      • VocabularyRestConverter

        public VocabularyRestConverter()
    • Method Detail

      • convert

        public VocabularyRest convert​(org.dspace.content.authority.ChoiceAuthority authority,
                                      Projection projection)
        Description copied from interface: DSpaceConverter
        Convert a DSpace model object into its equivalent REST resource, applying a given projection.
        Specified by:
        convert in interface DSpaceConverter<org.dspace.content.authority.ChoiceAuthority,​VocabularyRest>
        Parameters:
        authority - a DSpace API model object.
        Returns:
        a resource representing the model object.
      • getModelClass

        public Class<org.dspace.content.authority.ChoiceAuthority> getModelClass()
        Description copied from interface: DSpaceConverter
        For what DSpace API model class does this converter convert?
        Specified by:
        getModelClass in interface DSpaceConverter<org.dspace.content.authority.ChoiceAuthority,​VocabularyRest>
        Returns:
        Class of model objects represented.