|
From: SVN c. m. f. t. SWORD-A. p. <swo...@li...> - 2009-02-20 23:25:08
|
Revision: 119
http://sword-app.svn.sourceforge.net/sword-app/?rev=119&view=rev
Author: glen_robson
Date: 2009-02-20 21:52:58 +0000 (Fri, 20 Feb 2009)
Log Message:
-----------
Changed format namespace to packaging as per SWORD App Spec 1.3
Modified Paths:
--------------
fedora/trunk/src/org/purl/sword/server/fedora/fileHandlers/FileHandlerFactory.java
Modified: fedora/trunk/src/org/purl/sword/server/fedora/fileHandlers/FileHandlerFactory.java
===================================================================
--- fedora/trunk/src/org/purl/sword/server/fedora/fileHandlers/FileHandlerFactory.java 2009-02-20 21:52:36 UTC (rev 118)
+++ fedora/trunk/src/org/purl/sword/server/fedora/fileHandlers/FileHandlerFactory.java 2009-02-20 21:52:58 UTC (rev 119)
@@ -57,22 +57,22 @@
public class FileHandlerFactory {
private static final Logger LOG = Logger.getLogger(FileHandlerFactory.class);
/**
- * Find the file handler which can handle the mime type and format namespace
+ * Find the file handler which can handle the mime type and packaging
*
* @param String the mime type of the deposit
- * @param String the format namespace
+ * @param String the packaging
* @return FileHandler the file handler which can handle the deposit
* @throws SWORDException if there was a problem reading the config file or a file handler couldn't be created
*/
- public static FileHandler getFileHandler(final String pContentType, final String pFormatNamespace) throws SWORDException {
- LOG.debug("Looking for " + pContentType + " and format " + pFormatNamespace);
+ public static FileHandler getFileHandler(final String pContentType, final String pPackaging) throws SWORDException {
+ LOG.debug("Looking for " + pContentType + " and packaging " + pPackaging);
Iterator<FileHandler> tHandlerIter = FileHandlerFactory.getFileHandlers().iterator();
FileHandler tHandler = null;
while (tHandlerIter.hasNext()) {
tHandler = tHandlerIter.next();
- if (tHandler.isHandled(pContentType, pFormatNamespace)) {
+ if (tHandler.isHandled(pContentType, pPackaging)) {
LOG.debug("Found handler " + tHandler.getClass().getName());
return tHandler;
}
@@ -80,7 +80,7 @@
// Nothing found so return default handler
LOG.debug("Couldn't find a file handler so using default");
- return new DefaultFileHandler(pContentType, pFormatNamespace);
+ return new DefaultFileHandler(pContentType, pPackaging);
}
private static List<FileHandler> getFileHandlers() throws SWORDException {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|