|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.content.BitstreamFormat
public class BitstreamFormat
Class representing a particular bitstream format.
Changes to the bitstream format metadata are only written to the database
when update is called.
| Field Summary | |
|---|---|
static int |
KNOWN
The "known" support level - for bitstream formats that are known to the system, but not fully supported |
static int |
SUPPORTED
The "supported" support level - for bitstream formats known to the system and fully supported. |
static int |
UNKNOWN
The "unknown" support level - for bitstream formats that are unknown to the system |
| Method Summary | |
|---|---|
static BitstreamFormat |
create(Context context)
Create a new bitstream format |
void |
delete()
Delete this bitstream format. |
static BitstreamFormat |
find(Context context,
int id)
Get a bitstream format from the database. |
static BitstreamFormat[] |
findAll(Context context)
Retrieve all bitstream formats from the registry, ordered by ID |
static BitstreamFormat |
findByMIMEType(Context context,
String mimeType)
Find a bitstream format by its (unique) MIME type. |
static BitstreamFormat |
findByShortDescription(Context context,
String desc)
Find a bitstream format by its (unique) short description |
static BitstreamFormat[] |
findNonInternal(Context context)
Retrieve all non-internal bitstream formats from the registry. |
static BitstreamFormat |
findUnknown(Context context)
Get the generic "unknown" bitstream format. |
String |
getDescription()
Get a description of this bitstream format, including full application or format name |
String[] |
getExtensions()
Get the filename extensions associated with this format |
int |
getID()
Get the internal identifier of this bitstream format |
String |
getMIMEType()
Get the MIME type of this bitstream format, for example text/plain |
String |
getShortDescription()
Get a short (one or two word) description of this bitstream format |
int |
getSupportLevel()
Get the support level for this bitstream format - one of UNKNOWN,KNOWN or SUPPORTED. |
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 |
void |
setDescription(String s)
Set the description of the bitstream format |
void |
setExtensions(String[] exts)
Set the filename extensions associated with this format |
void |
setInternal(boolean b)
Set whether the bitstream format is an internal format |
void |
setMIMEType(String s)
Set the MIME type of the bitstream format |
void |
setShortDescription(String s)
Set the short description of the bitstream format |
void |
setSupportLevel(int sl)
Set the support level for this bitstream format - one of UNKNOWN,KNOWN or SUPPORTED. |
void |
update()
Update the bitstream format metadata |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int UNKNOWN
public static final int KNOWN
public static final int SUPPORTED
| Method Detail |
|---|
public static BitstreamFormat find(Context context,
int id)
throws SQLException
context - DSpace context objectid - ID of the bitstream format
SQLException
public static BitstreamFormat findByMIMEType(Context context,
String mimeType)
throws SQLException
context - DSpace context objectmimeType - MIME type value
null if
there's no bitstream format with the given MIMEtype.
SQLException
public static BitstreamFormat findByShortDescription(Context context,
String desc)
throws SQLException
context - DSpace context objectdesc - the short description
null if
there's no bitstream format with the given short description
SQLException
public static BitstreamFormat findUnknown(Context context)
throws SQLException
context - DSpace context object
SQLException
IllegalStateException - if the "unknown" bitstream format couldn't be found
public static BitstreamFormat[] findAll(Context context)
throws SQLException
context - DSpace context object
SQLException
public static BitstreamFormat[] findNonInternal(Context context)
throws SQLException
context - DSpace context object
SQLException
public static BitstreamFormat create(Context context)
throws SQLException,
AuthorizeException
context - DSpace context object
SQLException
AuthorizeExceptionpublic int getID()
public String getShortDescription()
public void setShortDescription(String s)
throws SQLException
s - the new short description
SQLExceptionpublic String getDescription()
public void setDescription(String s)
s - the new descriptionpublic String getMIMEType()
text/plain
public void setMIMEType(String s)
s - the new MIME typepublic int getSupportLevel()
UNKNOWN,KNOWN or SUPPORTED.
public void setSupportLevel(int sl)
UNKNOWN,KNOWN or SUPPORTED.
sl - the new support levelpublic boolean isInternal()
true if the bitstream format is an internal typepublic void setInternal(boolean b)
b - pass in true if the bitstream format is an
internal type
public void update()
throws SQLException,
AuthorizeException
SQLException
AuthorizeException
public void delete()
throws SQLException,
AuthorizeException
SQLException
AuthorizeExceptionpublic String[] getExtensions()
public void setExtensions(String[] exts)
exts - String [] array of extensions
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||