Class ResourceAdditionalProperties<Type extends IridaRepresentationModel>

  • Type Parameters:
    Type - The type of class being embedded.

    public class ResourceAdditionalProperties<Type extends IridaRepresentationModel>
    extends java.lang.Object
    Class to be used when returning additional properties about a model object via the REST API. This class will embed a model class and add a map of freeform properties. When serializing to JSON it will be transparent that these properties weren't on the model object to begin with. Example of this being used is adding the number of sequence files to a sample.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addProperty​(java.lang.String key, java.lang.Object value)
      Add a property to the map
      java.util.Map<java.lang.String,​java.lang.Object> getAdditionalProperties()
      Get the added properties
      Type getResource()
      Get the embedded resource
      void setAdditionalProperties​(java.util.Map<java.lang.String,​java.lang.Object> additionalProperties)
      Set the map of additional properties
      void setResource​(Type resource)
      Set the resource of this object
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResourceAdditionalProperties

        public ResourceAdditionalProperties​(Type resource)
    • Method Detail

      • getAdditionalProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getAdditionalProperties()
        Get the added properties
        Returns:
        A Map<String,Object>
      • setAdditionalProperties

        public void setAdditionalProperties​(java.util.Map<java.lang.String,​java.lang.Object> additionalProperties)
        Set the map of additional properties
        Parameters:
        additionalProperties - A Map<String,Object> of properties to set
      • addProperty

        public void addProperty​(java.lang.String key,
                                java.lang.Object value)
        Add a property to the map
        Parameters:
        key - The key to set
        value - the value to set
      • getResource

        public Type getResource()
        Get the embedded resource
        Returns:
        The resource of Type
      • setResource

        public void setResource​(Type resource)
        Set the resource of this object
        Parameters:
        resource - The resource to set