Class Attachment

java.lang.Object
org.gcube.portal.databook.shared.Attachment
All Implemented Interfaces:
Serializable

public class Attachment extends Object implements Serializable
Represents an attachment (e.g., file or resource) associated with a post or feed. Provides metadata such as URI, name, description, thumbnail, and MIME type. Implements Serializable for GWT and Java serialization.
Author:
Massimiliano Assante, ISTI-CNR
See Also:
  • Constructor Details

    • Attachment

      public Attachment()
      Default constructor.
    • Attachment

      public Attachment(String id, String uri, String name, String description, String thumbnailURL, String mimeType)
      Constructs an Attachment with the specified details.
      Parameters:
      id - the id in the Cassandra CF.
      uri - the URI where the file can be downloaded from.
      name - the name of the attached file.
      description - the description of the attached file.
      thumbnailURL - the URL of the image representing the attached file.
      mimeType - the MIME type of the file.
  • Method Details

    • getId

      public String getId()
      Gets the ID of the attachment.
      Returns:
      the ID of the attachment.
    • setId

      public void setId(String id)
      Sets the ID of the attachment.
      Parameters:
      id - the ID to set.
    • getUri

      public String getUri()
      Gets the URI of the attachment.
      Returns:
      the URI of the attachment.
    • setUri

      public void setUri(String uri)
      Sets the URI of the attachment.
      Parameters:
      uri - the URI to set.
    • getName

      public String getName()
      Gets the name of the attachment.
      Returns:
      the name of the attachment.
    • setName

      public void setName(String name)
      Sets the name of the attachment.
      Parameters:
      name - the name to set.
    • getDescription

      public String getDescription()
      Gets the description of the attachment.
      Returns:
      the description of the attachment.
    • setDescription

      public void setDescription(String description)
      Sets the description of the attachment.
      Parameters:
      description - the description to set.
    • getThumbnailURL

      public String getThumbnailURL()
      Gets the thumbnail URL of the attachment.
      Returns:
      the thumbnail URL of the attachment.
    • setThumbnailURL

      public void setThumbnailURL(String thumbnailURL)
      Sets the thumbnail URL of the attachment.
      Parameters:
      thumbnailURL - the thumbnail URL to set.
    • getMimeType

      public String getMimeType()
      Gets the MIME type of the attachment.
      Returns:
      the MIME type of the attachment.
    • setMimeType

      public void setMimeType(String mimeType)
      Sets the MIME type of the attachment.
      Parameters:
      mimeType - the MIME type to set.
    • toString

      public String toString()
      Returns a string representation of the attachment.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the attachment.