Package org.dspace.content
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
updateis called.- Version:
- $Revision$
- Author:
- Robert Tansley
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intKNOWNThe "known" support level - for bitstream formats that are known to the system, but not fully supportedstatic intSUPPORTEDThe "supported" support level - for bitstream formats known to the system and fully supported.static intUNKNOWNThe "unknown" support level - for bitstream formats that are unknown to the system
-
Constructor Summary
Constructors Modifier Constructor Description protectedBitstreamFormat()Protected constructor, create object using:DSpaceCRUDService.create(Context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)Returntrueifotheris the same Collection as this object,falseotherwiseStringgetDescription()Get a description of this bitstream format, including full application or format nameList<String>getExtensions()Get the filename extensions associated with this formatIntegergetID()Get the internal identifier of this bitstream formatStringgetMIMEType()Get the MIME type of this bitstream format, for exampletext/plainStringgetShortDescription()Get a short (one or two word) description of this bitstream formatintgetSupportLevel()Get the support level for this bitstream format - one ofUNKNOWN,KNOWNorSUPPORTED.inthashCode()booleanisInternal()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 systemvoidsetDescription(String s)Set the description of the bitstream formatvoidsetExtensions(List<String> exts)Set the filename extensions associated with this formatvoidsetInternal(boolean b)Set whether the bitstream format is an internal formatvoidsetMIMEType(String s)Set the MIME type of the bitstream formatvoidsetShortDescription(Context context, String s)voidsetSupportLevel(int sl)
-
-
-
Field Detail
-
UNKNOWN
public static final int UNKNOWN
The "unknown" support level - for bitstream formats that are unknown to the system- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
SUPPORTED
public static final int SUPPORTED
The "supported" support level - for bitstream formats known to the system and fully supported.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BitstreamFormat
protected BitstreamFormat()
Protected constructor, create object using:DSpaceCRUDService.create(Context)
-
-
Method Detail
-
getID
public final Integer getID()
Get the internal identifier of this bitstream format- Specified by:
getIDin interfaceReloadableEntity<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 exampletext/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 ofUNKNOWN,KNOWNorSUPPORTED.- 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:
trueif 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 intrueif 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)
Returntrueifotheris the same Collection as this object,falseotherwise
-
-