org.activemath.webapp.tutor.cgWebService.scorm.simpleScorm2004
Class Manifest

java.lang.Object
  extended by org.activemath.webapp.tutor.cgWebService.scorm.simpleScorm2004.Manifest

public class Manifest
extends Object

This class translates a part of a JDOM object into a Manifest Document according to the SCORM2004 Specification of IMS Content Package. We use the default structure: hierarchical structure for the organizations. Generally we have only one organization which is the default organization. The identifier of the manifest will be defined here in the class, whereas the other identifiers, for example for organizations, are parsed from the original OJDocument. The title of each item will be generated from the title map in the metadata, using the English version.


Field Summary
static String xml_adlcp_ns
           
static String xml_Namespace
           
static String xml_NS_prefix
           
static String xmlns_xsi
           
static String xsi_location
           
 
Constructor Summary
Manifest()
          Initialises all the members in this class.
Manifest(String xmlBase)
          This constructor will be used if there's a special xmlBase defined.
 
Method Summary
 void dump(StringBuffer buf, int depth)
          Dumps the contents of this subtree into the provided string buffer.
 String getVersion()
          Version of a manifest (optional).
 String getXmlBase()
          Returns the xml:base.
 void organizationsDump(StringBuffer buf, int depth)
          Dumps the contents of the organization elements into the provided string buffer
 void parse(OJDocument doc)
          Parses the given OJDocument with the goal of creating a Manifest.
 void resourcesDump(StringBuffer buf, int depth)
          Dumps the contents of the resource elements into the provided string buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xml_Namespace

public static final String xml_Namespace
See Also:
Constant Field Values

xml_NS_prefix

public static final String xml_NS_prefix
See Also:
Constant Field Values

xml_adlcp_ns

public static final String xml_adlcp_ns
See Also:
Constant Field Values

xmlns_xsi

public static final String xmlns_xsi
See Also:
Constant Field Values

xsi_location

public static final String xsi_location
See Also:
Constant Field Values
Constructor Detail

Manifest

public Manifest()
Initialises all the members in this class. First the number of created objects of this class will be counted. The identifier will be generated based on this number.


Manifest

public Manifest(String xmlBase)
This constructor will be used if there's a special xmlBase defined. "xmlBase" is the local xml namespace distinguishing different kind of Manifests in one system. Currently we only have one kind of manifest.

Parameters:
xmlBase -
Method Detail

parse

public void parse(OJDocument doc)
Parses the given OJDocument with the goal of creating a Manifest. Each Omgroup at the root of OJDocument will be parsed to an "organisation". The dynamicItems will be currently filtered out here. All the references in the OJDocument will be parsed into the "recourses", the last resource is the dynamicItem, it will be deleted.

Parameters:
doc - (OJDocument)

getVersion

public String getVersion()
Version of a manifest (optional).

Returns:
""

getXmlBase

public String getXmlBase()
Returns the xml:base. "xmlBase" is the local xml namespace for distinguishing different kind of Manifests in one system.

Returns:
the xmlBase

dump

public void dump(StringBuffer buf,
                 int depth)
Dumps the contents of this subtree into the provided string buffer.


organizationsDump

public void organizationsDump(StringBuffer buf,
                              int depth)
Dumps the contents of the organization elements into the provided string buffer


resourcesDump

public void resourcesDump(StringBuffer buf,
                          int depth)
Dumps the contents of the resource elements into the provided string buffer.