Class MetadataConverter

    • Constructor Detail

      • MetadataConverter

        public MetadataConverter()
    • Method Detail

      • setMetadata

        public <T extends org.dspace.content.DSpaceObject> void setMetadata​(org.dspace.core.Context context,
                                                                            T dso,
                                                                            MetadataRest metadataRest)
                                                                     throws SQLException,
                                                                            org.dspace.authorize.AuthorizeException
        Sets a DSpace object's domain metadata values from a rest representation. Any existing metadata value is deleted or overwritten.
        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.
        org.dspace.authorize.AuthorizeException - if an authorization error occurs.
      • addMetadata

        public <T extends org.dspace.content.DSpaceObject> void addMetadata​(org.dspace.core.Context context,
                                                                            T dso,
                                                                            MetadataRest metadataRest)
                                                                     throws SQLException,
                                                                            org.dspace.authorize.AuthorizeException
        Add to a DSpace object's domain metadata values from a rest representation. Any existing metadata value is preserved.
        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.
        org.dspace.authorize.AuthorizeException - if an authorization error occurs.
      • mergeMetadata

        public <T extends org.dspace.content.DSpaceObject> void mergeMetadata​(org.dspace.core.Context context,
                                                                              T dso,
                                                                              MetadataRest metadataRest)
                                                                       throws SQLException,
                                                                              org.dspace.authorize.AuthorizeException
        Merge into a DSpace object's domain metadata values from a rest representation. Any existing metadata value is preserved or overwritten with the new ones
        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.
        org.dspace.authorize.AuthorizeException - if an authorization error occurs.