org.dspace.content
Class FormatIdentifier

java.lang.Object
  extended by org.dspace.content.FormatIdentifier

public class FormatIdentifier
extends Object

This class handles the recognition of bitstream formats, using the format registry in the database. For the moment, the format identifier simply uses file extensions stored in the "BitstreamFormatIdentifier" table. This probably isn't a particularly satisfactory long-term solution.

Version:
$Revision: 3761 $
Author:
Robert Tansley

Constructor Summary
FormatIdentifier()
           
 
Method Summary
static BitstreamFormat guessFormat(Context context, Bitstream bitstream)
          Attempt to identify the format of a particular bitstream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatIdentifier

public FormatIdentifier()
Method Detail

guessFormat

public static BitstreamFormat guessFormat(Context context,
                                          Bitstream bitstream)
                                   throws SQLException
Attempt to identify the format of a particular bitstream. If the format is unknown, null is returned.

Parameters:
bitstream - the bitstream to identify the format of
Returns:
a format from the bitstream format registry, or null
Throws:
SQLException


Copyright © 2010 DuraSpace. All Rights Reserved.