[DS-200] SWORD module requires the X-Packaging header

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3760 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Stuart Lewis
2009-05-05 08:32:14 +00:00
parent 2e7398696b
commit dda551aa1e
2 changed files with 6 additions and 3 deletions

View File

@@ -45,6 +45,8 @@ import org.dspace.content.Collection;
import org.dspace.content.Item; import org.dspace.content.Item;
import org.purl.sword.base.Deposit; import org.purl.sword.base.Deposit;
import org.purl.sword.base.SWORDErrorException;
import org.purl.sword.base.ErrorCodes;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
@@ -74,14 +76,14 @@ public class SWORDIngesterFactory
* @throws DSpaceSWORDException * @throws DSpaceSWORDException
*/ */
public static SWORDIngester getInstance(Context context, Deposit deposit, DSpaceObject dso) public static SWORDIngester getInstance(Context context, Deposit deposit, DSpaceObject dso)
throws DSpaceSWORDException throws DSpaceSWORDException, SWORDErrorException
{ {
if (dso instanceof Collection) if (dso instanceof Collection)
{ {
SWORDIngester ingester = (SWORDIngester) PluginManager.getNamedPlugin(SWORDIngester.class, deposit.getPackaging()); SWORDIngester ingester = (SWORDIngester) PluginManager.getNamedPlugin(SWORDIngester.class, deposit.getPackaging());
if (ingester == null) if (ingester == null)
{ {
throw new DSpaceSWORDException("No ingester configured for this package type"); throw new SWORDErrorException(ErrorCodes.ERROR_CONTENT, "No ingester configured for this package type");
} }
return ingester; return ingester;
} }

View File

@@ -14,6 +14,7 @@
- [DS-194] Give METS ingester configuration option to make use of collection templates - [DS-194] Give METS ingester configuration option to make use of collection templates
- [DS-195] Allow the primary bitstream to be set in the item importer / exporter - [DS-195] Allow the primary bitstream to be set in the item importer / exporter
- [DS-196] METS exposed via OAI-PMH includes description.provenance information - [DS-196] METS exposed via OAI-PMH includes description.provenance information
- [DS-200] SWORD module requires the X-Packaging header
(Larry Stone) (Larry Stone)
- [DS-193] OAI RDF crosswalk fails when DC value is null - [DS-193] OAI RDF crosswalk fails when DC value is null