org.dspace.content.packager
Class OCWIMSCPManifest

java.lang.Object
  extended by org.dspace.content.packager.IMSCPManifest
      extended by org.dspace.content.packager.OCWIMSCPManifest

public class OCWIMSCPManifest
extends IMSCPManifest

Models the MIT Open CourseWare (OCW) profile of IMSCP developed for CWSpace. Includes constants for all the relevant namespaces, as well as code to locate the "home page" to use as the primary content bitstream.

Version:
$Revision$
Author:
Larry Stone
See Also:
IMSCPManifest

Field Summary
static org.jdom.Namespace ADLCP_NS
           
static String ADLCP_NS_URI
          ADLCP namespace.
static org.jdom.Namespace CWSP_NS
           
static String CWSP_NS_URI
          CWSpace namespace.
static org.jdom.Namespace LOM_NS
           
static String LOM_NS_URI
          Learning Object Metadata (LOM) namespace.
static org.jdom.Namespace OCW_NS
           
static String OCW_NS_URI
          Open CourseWare (OCW) namespace.
 
Fields inherited from class org.dspace.content.packager.IMSCPManifest
imscp_ns, manifest, MANIFEST_FILE
 
Constructor Summary
OCWIMSCPManifest()
           
 
Method Summary
 void checkManifest()
          Sanity-check the manifest.
 BitstreamFormat getManifestBitstreamFormat(Context context)
          Return the special bitstream format used to identify this (sub)class of IMSCP manifest.
 Set getMetadataFiles()
          Returns all of the local files of metadata called for in manifest.
 String getPrimaryBitstreamPath()
          Return the local path of the top-level "resource" in the default IMS CP organization, which becomes the primary bitstream in the ingested Item.
 
Methods inherited from class org.dspace.content.packager.IMSCPManifest
getBase, getContentFiles, getMetadata, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CWSP_NS_URI

public static final String CWSP_NS_URI
CWSpace namespace.

See Also:
Constant Field Values

CWSP_NS

public static final org.jdom.Namespace CWSP_NS

OCW_NS_URI

public static final String OCW_NS_URI
Open CourseWare (OCW) namespace.

See Also:
Constant Field Values

OCW_NS

public static final org.jdom.Namespace OCW_NS

ADLCP_NS_URI

public static final String ADLCP_NS_URI
ADLCP namespace.

See Also:
Constant Field Values

ADLCP_NS

public static final org.jdom.Namespace ADLCP_NS

LOM_NS_URI

public static final String LOM_NS_URI
Learning Object Metadata (LOM) namespace.

See Also:
Constant Field Values

LOM_NS

public static final org.jdom.Namespace LOM_NS
Constructor Detail

OCWIMSCPManifest

public OCWIMSCPManifest()
Method Detail

checkManifest

public void checkManifest()
                   throws MetadataValidationException
Sanity-check the manifest. Check profile/schema identification tags,

Overrides:
checkManifest in class IMSCPManifest
Throws:
MetadataValidationException

getMetadataFiles

public Set getMetadataFiles()
                     throws MetadataValidationException
Returns all of the local files of metadata called for in manifest. Grovel adlcp:location links out of metadata elements for entire package and for each resource.

Overrides:
getMetadataFiles in class IMSCPManifest
Returns:
Set of String pathnames (never null).
Throws:
MetadataValidationException

getPrimaryBitstreamPath

public String getPrimaryBitstreamPath()
                               throws MetadataValidationException
Return the local path of the top-level "resource" in the default IMS CP organization, which becomes the primary bitstream in the ingested Item.

NOTE: It is a fatal error for OCW IMSCP if no PBS is found.

First find the desired organization element, which is at xpath /manifest/organizations/organization@identifier matching /manifest/organizations@default. Its top level item has a item@identifierref that matches the resource with attribute: /resources/resource/@identifier

Returns:
path -- never null (throws if nothing found).
Throws:
MetadataValidationException

getManifestBitstreamFormat

public BitstreamFormat getManifestBitstreamFormat(Context context)
                                           throws SQLException,
                                                  AuthorizeException,
                                                  IOException
Return the special bitstream format used to identify this (sub)class of IMSCP manifest.

Specified by:
getManifestBitstreamFormat in class IMSCPManifest
Returns:
special bitstream format for manifest.
Throws:
SQLException
AuthorizeException
IOException


Copyright © 2010 The DSpace Foundation. All Rights Reserved.