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 update is called.
- Author:
- Robert Tansley
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe "known" support level - for bitstream formats that are known to the system, but not fully supportedstatic final intThe "supported" support level - for bitstream formats known to the system and fully supported.static final intThe "unknown" support level - for bitstream formats that are unknown to the system -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected constructor, create object using:DSpaceCRUDService.create(Context) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturntrueifotheris the same Collection as this object,falseotherwiseGet a description of this bitstream format, including full application or format nameGet the filename extensions associated with this formatfinal IntegergetID()Get the internal identifier of this bitstream formatGet the MIME type of this bitstream format, for exampletext/plainGet a short (one or two word) description of this bitstream formatintGet the support level for this bitstream format - one ofUNKNOWN,KNOWNorSUPPORTED.inthashCode()booleanFind 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 systemvoidSet 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 formatvoidSet the MIME type of the bitstream formatvoidsetShortDescription(Context context, String s) voidsetSupportLevel(int sl)
-
Field Details
-
UNKNOWN
public static final int UNKNOWNThe "unknown" support level - for bitstream formats that are unknown to the system- See Also:
-
KNOWN
public static final int KNOWNThe "known" support level - for bitstream formats that are known to the system, but not fully supported- See Also:
-
SUPPORTED
public static final int SUPPORTEDThe "supported" support level - for bitstream formats known to the system and fully supported.- See Also:
-
-
Constructor Details
-
BitstreamFormat
protected BitstreamFormat()Protected constructor, create object using:DSpaceCRUDService.create(Context)
-
-
Method Details
-
getID
Get the internal identifier of this bitstream format- Specified by:
getIDin interfaceReloadableEntity<Integer>- Returns:
- the internal identifier
-
getShortDescription
Get a short (one or two word) description of this bitstream format- Returns:
- the short description
-
getDescription
Get a description of this bitstream format, including full application or format name- Returns:
- the description
-
setDescription
Set the description of the bitstream format- Parameters:
s- the new description
-
getMIMEType
Get the MIME type of this bitstream format, for exampletext/plain- Returns:
- the MIME type
-
setMIMEType
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
Get the filename extensions associated with this format- Returns:
- the extensions
-
setExtensions
Set the filename extensions associated with this format- Parameters:
exts- String [] array of extensions
-
setShortDescription
- Throws:
SQLException
-
setSupportLevel
public void setSupportLevel(int sl) -
equals
Returntrueifotheris the same Collection as this object,falseotherwise -
hashCode
public int hashCode()
-