Class MetadataRest<T extends MetadataValueRest>

java.lang.Object
org.dspace.app.rest.model.MetadataRest<T>

public class MetadataRest<T extends MetadataValueRest> extends Object
Rest representation of a map of metadata keys to ordered lists of values.
  • Constructor Details

    • MetadataRest

      public MetadataRest()
  • Method Details

    • getMap

      public SortedMap<String,List<T>> getMap()
      Gets the map.
      Returns:
      the map of keys to ordered values.
    • put

      public MetadataRest put(String key, T... values)
      Sets the metadata values for a given key.
      Parameters:
      key - the key.
      values - the values. The values will be ordered according to their place value, if nonnegative. Values that are negative (the default is -1) are assumed to be non-explicitly set and will will be ordered at the end of any explicitly ordered values, in the order they are passed to this method.
      Returns:
      this instance, to support chaining calls for easy initialization.
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object