pointing at bitstream
FLocat flocat = new FLocat();
flocat.setLOCTYPE(Loctype.URL);
flocat.setXlinkHref(makeBitstreamURL(logoBs, params));
@@ -1283,6 +1282,22 @@ else if(mdRef.getMDTYPE() != null && mdRef.getMDTYPE() == Mdtype.OTHER &&
}
}
+ /**
+ * Build a string which will be used as the "Type" of this object in
+ * the METS manifest.
+ *
+ * Default format is "DSpace [Type-as-string]".
+ *
+ * @param dso DSpaceObject to create type-string for
+ * @return a string which will represent this object Type in METS
+ * @see org.dspace.core.Constants
+ */
+ public String getObjectTypeString(DSpaceObject dso)
+ {
+ //Format: "DSpace " (e.g. "DSpace ITEM", "DSpace COLLECTION", etc)
+ return "DSpace " + Constants.typeText[dso.getType()];
+ }
+
/**
* Return identifier for bitstream in an Item; when making a package,
* this is the archive member name (e.g. in Zip file). In a bare
diff --git a/dspace-api/src/main/java/org/dspace/content/packager/DSpaceAIPIngester.java b/dspace-api/src/main/java/org/dspace/content/packager/DSpaceAIPIngester.java
index 2c42cfa7b75c..af4361607481 100644
--- a/dspace-api/src/main/java/org/dspace/content/packager/DSpaceAIPIngester.java
+++ b/dspace-api/src/main/java/org/dspace/content/packager/DSpaceAIPIngester.java
@@ -57,7 +57,6 @@
import org.dspace.content.NonUniqueMetadataException;
import org.dspace.content.crosswalk.CrosswalkException;
import org.dspace.content.crosswalk.MetadataValidationException;
-import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.core.Constants;
diff --git a/dspace-api/src/main/java/org/dspace/content/packager/DSpaceMETSDisseminator.java b/dspace-api/src/main/java/org/dspace/content/packager/DSpaceMETSDisseminator.java
index 6c4b73f9a900..e57529c36197 100644
--- a/dspace-api/src/main/java/org/dspace/content/packager/DSpaceMETSDisseminator.java
+++ b/dspace-api/src/main/java/org/dspace/content/packager/DSpaceMETSDisseminator.java
@@ -115,6 +115,7 @@ public class DSpaceMETSDisseminator
*
* @return string name of profile.
*/
+ @Override
public String getProfile()
{
return PROFILE_LABEL;
@@ -128,6 +129,7 @@ public String getProfile()
* @param bname name of DSpace bundle.
* @return string name of fileGrp
*/
+ @Override
public String bundleToFileGrp(String bname)
{
if (bname.equals("ORIGINAL"))
@@ -139,13 +141,14 @@ public String bundleToFileGrp(String bname)
/**
* Create metsHdr element - separate so subclasses can override.
*/
+ @Override
public MetsHdr makeMetsHdr(Context context, DSpaceObject dso,
PackageParameters params)
{
MetsHdr metsHdr = new MetsHdr();
- metsHdr.setCREATEDATE(new Date()); // FIXME: CREATEDATE is now:
- // maybe should be item create
- // date?
+
+ // FIXME: CREATEDATE is now: maybe should be item create?
+ metsHdr.setCREATEDATE(new Date());
// Agent
Agent agent = new Agent();
@@ -168,6 +171,7 @@ public MetsHdr makeMetsHdr(Context context, DSpaceObject dso,
* the name of a crosswalk plugin, optionally followed by colon and
* its METS MDTYPE name.
*/
+ @Override
public String [] getDmdTypes(Context context, DSpaceObject dso, PackageParameters params)
throws SQLException, IOException, AuthorizeException
{
@@ -190,6 +194,7 @@ public MetsHdr makeMetsHdr(Context context, DSpaceObject dso,
* Default is PREMIS. This is both the name of the crosswalk plugin
* and the METS MDTYPE.
*/
+ @Override
public String[] getTechMdTypes(Context context, DSpaceObject dso, PackageParameters params)
throws SQLException, IOException, AuthorizeException
{
@@ -203,18 +208,21 @@ public String[] getTechMdTypes(Context context, DSpaceObject dso, PackageParamet
return new String[0];
}
+ @Override
public String[] getSourceMdTypes(Context context, DSpaceObject dso, PackageParameters params)
throws SQLException, IOException, AuthorizeException
{
return new String[0];
}
-
+
+ @Override
public String[] getDigiprovMdTypes(Context context, DSpaceObject dso, PackageParameters params)
throws SQLException, IOException, AuthorizeException
{
return new String[0];
}
+ @Override
public String makeBitstreamURL(Bitstream bitstream, PackageParameters params)
{
String base = "bitstream_"+String.valueOf(bitstream.getID());
@@ -226,6 +234,7 @@ public String makeBitstreamURL(Bitstream bitstream, PackageParameters params)
* Add rights MD (licenses) for DSpace item. These
* may include a deposit license, and Creative Commons.
*/
+ @Override
public String[] getRightsMdTypes(Context context, DSpaceObject dso, PackageParameters params)
throws SQLException, IOException, AuthorizeException
{
@@ -246,6 +255,7 @@ else if (CreativeCommons.getLicenseTextBitstream(item) != null)
}
// This is where we'd elaborate on the default structMap; nothing to add, yet.
+ @Override
public void addStructMap(Context context, DSpaceObject dso,
PackageParameters params, Mets mets)
throws SQLException, IOException, AuthorizeException, MetsException
@@ -253,6 +263,7 @@ public void addStructMap(Context context, DSpaceObject dso,
}
// only exclude metadata bundles from package.
+ @Override
public boolean includeBundle(Bundle bundle)
{
return ! PackageUtils.isMetaInfoBundle(bundle);