Class BitstreamFormat

java.lang.Object
org.dspace.content.BitstreamFormat
All Implemented Interfaces:
Serializable, ReloadableEntity<Integer>

@Entity public class BitstreamFormat extends Object implements Serializable, ReloadableEntity<Integer>
Class representing a particular bitstream format.

Changes to the bitstream format metadata are only written to the database when update is called.

Author:
Robert Tansley
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The "known" support level - for bitstream formats that are known to the system, but not fully supported
    static final int
    The "supported" support level - for bitstream formats known to the system and fully supported.
    static final int
    The "unknown" support level - for bitstream formats that are unknown to the system
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Protected constructor, create object using: DSpaceCRUDService.create(Context)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
    Return true if other is the same Collection as this object, false otherwise
    Get a description of this bitstream format, including full application or format name
    Get the filename extensions associated with this format
    final Integer
    Get the internal identifier of this bitstream format
    Get the MIME type of this bitstream format, for example text/plain
    Get a short (one or two word) description of this bitstream format
    int
    Get the support level for this bitstream format - one of UNKNOWN,KNOWN or SUPPORTED.
    int
     
    boolean
    Find out if the bitstream format is an internal format - that is, one that is used to store system information, rather than the content of items in the system
    void
    Set the description of the bitstream format
    void
    Set the filename extensions associated with this format
    void
    setInternal(boolean b)
    Set whether the bitstream format is an internal format
    void
    Set the MIME type of the bitstream format
    void
     
    void
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • UNKNOWN

      public static final int UNKNOWN
      The "unknown" support level - for bitstream formats that are unknown to the system
      See Also:
    • KNOWN

      public static final int KNOWN
      The "known" support level - for bitstream formats that are known to the system, but not fully supported
      See Also:
    • SUPPORTED

      public static final int SUPPORTED
      The "supported" support level - for bitstream formats known to the system and fully supported.
      See Also:
  • Constructor Details

  • Method Details

    • getID

      public final Integer getID()
      Get the internal identifier of this bitstream format
      Specified by:
      getID in interface ReloadableEntity<Integer>
      Returns:
      the internal identifier
    • getShortDescription

      public String getShortDescription()
      Get a short (one or two word) description of this bitstream format
      Returns:
      the short description
    • getDescription

      public String getDescription()
      Get a description of this bitstream format, including full application or format name
      Returns:
      the description
    • setDescription

      public void setDescription(String s)
      Set the description of the bitstream format
      Parameters:
      s - the new description
    • getMIMEType

      public String getMIMEType()
      Get the MIME type of this bitstream format, for example text/plain
      Returns:
      the MIME type
    • setMIMEType

      public void setMIMEType(String s)
      Set the MIME type of the bitstream format
      Parameters:
      s - the new MIME type
    • getSupportLevel

      public int getSupportLevel()
      Get the support level for this bitstream format - one of UNKNOWN,KNOWN or SUPPORTED.
      Returns:
      the support level
    • isInternal

      public boolean isInternal()
      Find out if the bitstream format is an internal format - that is, one that is used to store system information, rather than the content of items in the system
      Returns:
      true if the bitstream format is an internal type
    • setInternal

      public void setInternal(boolean b)
      Set whether the bitstream format is an internal format
      Parameters:
      b - pass in true if the bitstream format is an internal type
    • getExtensions

      public List<String> getExtensions()
      Get the filename extensions associated with this format
      Returns:
      the extensions
    • setExtensions

      public void setExtensions(List<String> exts)
      Set the filename extensions associated with this format
      Parameters:
      exts - String [] array of extensions
    • setShortDescription

      public void setShortDescription(Context context, String s) throws SQLException
      Throws:
      SQLException
    • setSupportLevel

      public void setSupportLevel(int sl)
    • equals

      public boolean equals(Object other)
      Return true if other is the same Collection as this object, false otherwise
      Overrides:
      equals in class Object
      Parameters:
      other - object to compare to
      Returns:
      true if object passed in represents the same collection as this object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object