| java.lang.Object org.dspace.content.BitstreamFormat
BitstreamFormat | public class BitstreamFormat (Code) | | 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 version: $Revision: 1670 $ |
Field Summary | |
final public static int | KNOWN | final public static int | SUPPORTED The "supported" support level - for bitstream formats known to the system
and fully supported. | final public static int | UNKNOWN |
Constructor Summary | |
| BitstreamFormat(Context context, TableRow row) Class constructor for creating a BitstreamFormat object based on the
contents of a DB table row. |
KNOWN | final public static int KNOWN(Code) | | The "known" support level - for bitstream formats that are known to the
system, but not fully supported
|
SUPPORTED | final public static int SUPPORTED(Code) | | The "supported" support level - for bitstream formats known to the system
and fully supported.
|
UNKNOWN | final public static int UNKNOWN(Code) | | The "unknown" support level - for bitstream formats that are unknown to
the system
|
BitstreamFormat | BitstreamFormat(Context context, TableRow row) throws SQLException(Code) | | Class constructor for creating a BitstreamFormat object based on the
contents of a DB table row.
Parameters: context - the context this object exists in Parameters: row - the corresponding row in the table throws: SQLException - |
find | public static BitstreamFormat find(Context context, int id) throws SQLException(Code) | | Get a bitstream format from the database.
Parameters: context - DSpace context object Parameters: id - ID of the bitstream format the bitstream format, or null if the ID is invalid. throws: SQLException - |
findByMIMEType | public static BitstreamFormat findByMIMEType(Context context, String mimeType) throws SQLException(Code) | | Find a bitstream format by its (unique) MIME type.
If more than one bitstream format has the same MIME type, the
one returned is unpredictable.
Parameters: context - DSpace context object Parameters: mimeType - MIME type value the corresponding bitstream format, or null ifthere's no bitstream format with the given MIMEtype. throws: SQLException - |
findByShortDescription | public static BitstreamFormat findByShortDescription(Context context, String desc) throws SQLException(Code) | | Find a bitstream format by its (unique) short description
Parameters: context - DSpace context object Parameters: desc - the short description the corresponding bitstream format, or null ifthere's no bitstream format with the given short description throws: SQLException - |
findNonInternal | public static BitstreamFormat[] findNonInternal(Context context) throws SQLException(Code) | | Retrieve all non-internal bitstream formats from the registry. The
"unknown" format is not included, and the formats are ordered by support
level (highest first) first then short description.
Parameters: context - DSpace context object the bitstream formats. throws: SQLException - |
getDescription | public String getDescription()(Code) | | Get a description of this bitstream format, including full application or
format name
the description |
getExtensions | public String[] getExtensions()(Code) | | Get the filename extensions associated with this format
the extensions |
getID | public int getID()(Code) | | Get the internal identifier of this bitstream format
the internal identifier |
getMIMEType | public String getMIMEType()(Code) | | Get the MIME type of this bitstream format, for example
text/plain
the MIME type |
getShortDescription | public String getShortDescription()(Code) | | Get a short (one or two word) description of this bitstream format
the short description |
getSupportLevel | public int getSupportLevel()(Code) | | Get the support level for this bitstream format - one of
UNKNOWN ,KNOWN or SUPPORTED .
the support level |
isInternal | public boolean isInternal()(Code) | | 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
true if the bitstream format is an internal type |
setDescription | public void setDescription(String s)(Code) | | Set the description of the bitstream format
Parameters: s - the new description |
setExtensions | public void setExtensions(String[] exts)(Code) | | Set the filename extensions associated with this format
Parameters: exts - String [] array of extensions |
setInternal | public void setInternal(boolean b)(Code) | | Set whether the bitstream format is an internal format
Parameters: b - pass in true if the bitstream format is aninternal type |
setMIMEType | public void setMIMEType(String s)(Code) | | Set the MIME type of the bitstream format
Parameters: s - the new MIME type |
setShortDescription | public void setShortDescription(String s) throws SQLException(Code) | | Set the short description of the bitstream format
Parameters: s - the new short description |
setSupportLevel | public void setSupportLevel(int sl)(Code) | | Set the support level for this bitstream format - one of
UNKNOWN ,KNOWN or SUPPORTED .
Parameters: sl - the new support level |
|
|