public interface BitstreamFormatService extends DSpaceCRUDService<BitstreamFormat>
| Modifier and Type | Method and Description |
|---|---|
List<BitstreamFormat> |
findAll(Context context)
Retrieve all bitstream formats from the registry, ordered by ID
|
BitstreamFormat |
findByMIMEType(Context context,
String mimeType)
Find a bitstream format by its (unique) MIME type.
|
BitstreamFormat |
findByShortDescription(Context context,
String desc)
Find a bitstream format by its (unique) short description
|
List<BitstreamFormat> |
findNonInternal(Context context)
Retrieve all non-internal bitstream formats from the registry.
|
BitstreamFormat |
findUnknown(Context context)
Get the generic "unknown" bitstream format.
|
int |
getSupportLevelID(String supportLevel)
If you know the support level string, look up the corresponding type ID
constant.
|
String |
getSupportLevelText(BitstreamFormat bitstreamFormat)
Get the support level text for this bitstream format - one of
UNKNOWN,KNOWN or SUPPORTED. |
BitstreamFormat |
guessFormat(Context context,
Bitstream bitstream)
Attempt to identify the format of a particular bitstream.
|
void |
setShortDescription(Context context,
BitstreamFormat bitstreamFormat,
String shortDescription)
Set the short description of the bitstream format
|
void |
setSupportLevel(BitstreamFormat bitstreamFormat,
int supportLevel)
Set the support level for this bitstream format - one of
UNKNOWN,KNOWN or SUPPORTED. |
BitstreamFormat findByMIMEType(Context context, String mimeType) throws SQLException
context - DSpace context objectmimeType - MIME type valuenull if
there's no bitstream format with the given MIMEtype.SQLException - if database errorBitstreamFormat findByShortDescription(Context context, String desc) throws SQLException
context - DSpace context objectdesc - the short descriptionnull if
there's no bitstream format with the given short descriptionSQLException - if database errorBitstreamFormat findUnknown(Context context) throws SQLException
context - DSpace context objectSQLException - if database errorIllegalStateException - if the "unknown" bitstream format couldn't be foundList<BitstreamFormat> findAll(Context context) throws SQLException
context - DSpace context objectSQLException - if database errorList<BitstreamFormat> findNonInternal(Context context) throws SQLException
context - DSpace context objectSQLException - if database errorvoid setShortDescription(Context context, BitstreamFormat bitstreamFormat, String shortDescription) throws SQLException
context - contextbitstreamFormat - formatshortDescription - the new short descriptionSQLException - if database errorString getSupportLevelText(BitstreamFormat bitstreamFormat)
UNKNOWN,KNOWN or SUPPORTED.bitstreamFormat - formatvoid setSupportLevel(BitstreamFormat bitstreamFormat, int supportLevel)
UNKNOWN,KNOWN or SUPPORTED.bitstreamFormat - formatsupportLevel - the new support levelint getSupportLevelID(String supportLevel)
supportLevel - String with the name of the action (must be exact match)-1 if the action
string is unknownBitstreamFormat guessFormat(Context context, Bitstream bitstream) throws SQLException
context - contextbitstream - the bitstream to identify the format ofSQLException - if database errorCopyright © 2022 LYRASIS. All rights reserved.