Interface MetadataSignatureGenerator

  • All Known Implementing Classes:
    PlainMetadataSignatureGeneratorImpl

    public interface MetadataSignatureGenerator
    Interface that mark classes that can be used to generate a signature for metadata values. The signature must be a unique identification of a metadata, based on the attributes that compose it (such as field, value and authority). It is possible to generate a signature for a single metadata value and also for a list of values. Given an item, a signature can for example be used to check if the associated metadata is present in the item.
    Author:
    Luca Giamminonni (luca.giamminonni at 4science.it)
    • Method Detail

      • generate

        String generate​(Context context,
                        List<MetadataValue> metadataValues)
        Generate a signature related to the given metadata values.
        Parameters:
        context - the DSpace context
        metadataValues - the metadata values to sign
        Returns:
        the generated signature
      • findBySignature

        List<MetadataValue> findBySignature​(Context context,
                                            Item item,
                                            String signature)
        Returns the metadata values traceable by the given item related with the given signature.
        Parameters:
        context - the DSpace context
        item - the item
        signature - the metadata signature
        Returns:
        the founded metadata