VdexReload 1.1.3 API

uk.ac.reload.editor.contentpackaging
Class ContentPackage

java.lang.Object
  extended byuk.ac.reload.moonunit.dom.ReloadDocument
      extended byuk.ac.reload.moonunit.dom.ReloadSchemaDocument
          extended byuk.ac.reload.editor.contentpackaging.ContentPackage
All Implemented Interfaces:
AbstractContentPackage
Direct Known Subclasses:
SCORM1_2Package

public class ContentPackage
extends ReloadSchemaDocument
implements AbstractContentPackage

The Content Package Class


Nested Class Summary
 
Nested classes inherited from class uk.ac.reload.moonunit.dom.ReloadSchemaDocument
ReloadSchemaDocument.UndoableAddAction, ReloadSchemaDocument.UndoableCopyAction, ReloadSchemaDocument.UndoableCutAction, ReloadSchemaDocument.UndoableDeleteAction, ReloadSchemaDocument.UndoableMoveAction, ReloadSchemaDocument.UndoablePasteAction
 
Field Summary
protected  ContentPackageCore _cpCore
          Delegate class for common CP functionality
 
Fields inherited from class uk.ac.reload.moonunit.dom.ReloadSchemaDocument
_controller, _undoHandler
 
Fields inherited from class uk.ac.reload.moonunit.dom.ReloadDocument
_dirty, _doc, _file
 
Constructor Summary
ContentPackage()
          Default Constructor
ContentPackage(java.io.File file, org.jdom.Document doc, ContentPackageSchemaController schemaController)
          Constructor
 
Method Summary
 boolean acceptElement(org.jdom.Element sourceElement, org.jdom.Element targetElement, int actionCopyMove)
           
 boolean acceptsReloadResources(org.jdom.Element targetElement)
          Return whether targetElement can accept ReloadResources
 org.jdom.Element addElementBySchema(java.lang.Object source, org.jdom.Element parentElement, ReloadSchemaElement newSchemaElement, boolean doSelect)
          Over-ride this so we can intercept it to do stuff
protected  org.jdom.Element addFileElement(java.io.File reloadResource, org.jdom.Element resourceElement, boolean doSelect)
          Add a element to a element from a ReloadResource.
protected  void addFileElements(ReloadResource reloadResource, org.jdom.Element resourceElement, boolean doSelect)
          Add File dependencies for a ReloadResource.
protected  org.jdom.Element addItemManifest(org.jdom.Element manifestElement, org.jdom.Element targetElement, boolean doSelect)
          Add an Item to Item or Organization parent - this references a sub-Manifest
protected  org.jdom.Element addItemResource(org.jdom.Element parentElement, org.jdom.Element resourceElement, boolean doSelect)
          Add an Item to Item or Organization parent - this references a Resource If resourcesElement is not null set the Item's identifierref to it
protected  org.jdom.Element addItemTitle(org.jdom.Element itemElement, org.jdom.Element resourceElement)
          Add a Title to an Item based on the Resource it References.
protected  org.jdom.Element addOrganization(org.jdom.Element parentElement, boolean doSelect)
          Add an Organization
 org.jdom.Element addReloadResource(ReloadResource reloadResource, org.jdom.Element parentElement)
          Add a ReloadResource to the Manifest
protected  org.jdom.Element addReloadResource(ReloadResource reloadResource, org.jdom.Element parentElement, boolean doSelect)
          Add a ReloadResource to a given Element
 org.jdom.Element addReloadResources(ReloadResource[] reloadResources, org.jdom.Element parentElement)
          Add a bunch of ReloadResources to the Manifest
protected  org.jdom.Element addReloadResourceToResourcesElement(ReloadResource reloadResource, org.jdom.Element resourcesElement, boolean doSelect)
          Add a Resource to the "resources" element
protected  org.jdom.Element addTitle(org.jdom.Element parentElement, java.lang.String text)
          Add a Title element (only one allowed).
 boolean canCopyElement(org.jdom.Element element)
          Decides whether an element can be copied or not - will need to override this
 boolean canCutElement(org.jdom.Element element, ReloadSchemaElement schemaElement)
          Decides whether we can cut an element - will need to override this
 boolean canDragElement(org.jdom.Element element, int action)
           
 boolean canPasteFromClipboard(org.jdom.Element element)
          Decides whether we can paste an element - will need to override this
protected  void checkIDRefs(org.jdom.Element element)
          If we move or copy an Element that contains an IDENTIFIERREF to another Element we check that the Element referenced is still below us.
protected  boolean containsFile(java.lang.String href, org.jdom.Element resourceElement)
          Return whether a Resource Element contains a File Element by HREF
protected  boolean containsReloadResource(ReloadResource reloadResource, org.jdom.Element resourcesElement)
           
 boolean containsResource(org.jdom.Element sourceElement, org.jdom.Element resourcesElement)
          Return whether resourcesElement already contains sourceElement as a Resource This searches by the HREF attribute
protected  boolean containsResource(java.lang.String href, org.jdom.Element resourcesElement)
          Return whether a Resources Element contains a Resource by HREF
 org.jdom.Element copyElementUndoable(java.lang.Object source, org.jdom.Element element, org.jdom.Element newParent, boolean doSelect)
          Over-ride this so we can intercept it to do stuff
protected  void copypasteElement(org.jdom.Element newElement)
          When an Element is copied over or pasted we need to do a bunch of stuff
protected  void createNewIDRefs(org.jdom.Element element, java.util.Hashtable id_map)
          Create new IDENTIFIERREFs and DEFAULT attributes
protected  java.util.Hashtable createNewIDs(org.jdom.Element element)
          Create a new ID for an Element that has an IDENTIFIER attribute and also for its children Only works if the Element already has an IDENTIFIER attribute
protected  void createNewIDs(org.jdom.Element element, java.util.Hashtable idmap)
           
protected  void createNewPrerequisiteRefs(org.jdom.Element element, java.util.Hashtable id_map)
          Create new SCORM Prerequisite Refs Really this method should be in the SCORM1_2Package class
 boolean exportManifest(org.jdom.Element manifestElement, java.io.File targetFolder)
          Export (disagggregate) manifestElement to new Content Package
protected  java.lang.String generateUniqueID(org.jdom.Element element)
          Generate a Unique Identifier for an Element
 java.lang.String[] getComments()
          Get the comments to add to the XML document
 org.jdom.Element getDefaultOrganization(org.jdom.Element orgsElement)
           
 java.lang.String getElementBase(org.jdom.Element element)
           
 org.jdom.Element getElementByIdentifier(org.jdom.Element parent, java.lang.String identifier)
           
 java.lang.String getElementDisplayName(org.jdom.Element element)
           
 java.lang.String getElementHREF(org.jdom.Element element)
           
 org.jdom.Element[] getElementsInManifest(org.jdom.Element manifestElement, java.lang.String elementName, org.jdom.Namespace ns)
           
 org.jdom.Element getFile(java.lang.String href, org.jdom.Element resourceElement)
          Return a File Element given its HREF
protected  org.jdom.Element getFileByReloadResouce(ReloadResource reloadResource, org.jdom.Element resourceElement)
           
 org.jdom.Namespace getMetadataNamespace()
           
 org.jdom.Element[] getOrganizations(org.jdom.Element orgsElement)
           
 org.jdom.Element[] getOrganizationsAllowed(org.jdom.Element orgsElement)
           
 java.lang.String getParameters(org.jdom.Element element)
           
 org.jdom.Element getParentManifestElement(org.jdom.Element element)
          Find the local parent "manifest" Element for a given Element If element is the manifest, will return that
 java.io.File getProjectFolder()
           
 java.lang.String getProjectName()
           
 org.jdom.Element getReferencedElement(org.jdom.Element sourceElement)
           
 org.jdom.Element[] getReferencedElementsAllowed(org.jdom.Element element)
           
 java.lang.String[] getReferencedIdentifersAllowed(org.jdom.Element element)
           
 org.jdom.Element getResource(java.lang.String href, org.jdom.Element resourcesElement)
          Return a Resource Element given its HREF
protected  org.jdom.Element getResourceByReloadResouce(ReloadResource reloadResource, org.jdom.Element resourcesElement)
           
 java.io.File getResourceFile(org.jdom.Element element)
           
 java.io.File[] getResourceFiles(org.jdom.Element manifestElement)
           
 org.jdom.Element getResourcesElement(org.jdom.Element element)
          Find the local "resources" Element for a given Element position.
 java.lang.String getTargetRootElementName()
          Get the Target Root element name
 java.lang.String getURL(org.jdom.Element element)
           
 org.jdom.Element importManifest(java.io.File manifestFile, org.jdom.Element manifestElement, java.lang.String base)
          Import (aggregate) another Package into this Content Package at manifestElement
 boolean isMetadataElement(java.lang.String name)
          Return whether we have the "metadata" element
 boolean isMetadataRoot(java.lang.String name)
          Return whether we have the MD root name of any embedded Metadata "lom"
 boolean isReferencingElement(org.jdom.Element element)
           
 void newContentPackage(java.io.File projectFolder, ContentPackageSchemaController cpController, MetadataSchemaController mdController)
          Set up New CP with new project folder, imsmanifest.xml amd Schema files
protected  void newDocument(java.io.File projectFolder, ContentPackageSchemaController cpController, MetadataSchemaController mdController)
          Setup the JDOM Document with Namespaces set and root element set and some default attributes.
 org.jdom.Element pasteElementUndoable(java.lang.Object source, org.jdom.Element element, org.jdom.Element newParent, boolean doSelect)
          Over-ride this so we can intercept it to do stuff
protected  void setDefaultOrganization(org.jdom.Element organization)
          When an Organization element is added/copied to an Organizations Element and it is the only one, set the Organizations "default" attribute to it
 org.jdom.Element shiftElement(org.jdom.Element sourceElement, org.jdom.Element targetElement, int action)
          Copy/Move sourceElement to targetElement action is either ACTION_COPY or ACTION MOVE
protected  org.jdom.Element shiftElement(org.jdom.Element sourceElement, org.jdom.Element targetElement, int action, boolean doSelect)
           
 
Methods inherited from class uk.ac.reload.moonunit.dom.ReloadSchemaDocument
addAttribute, addComments, addElement, addElementAtIndex, addElementBySchemaUndoable, addElementUndoable, addElementUnique, addReloadDocumentListener, canAddElement, canDeleteElement, canMoveElementDown, canMoveElementUp, changedElement, cutElementUndoable, deleteElementUndoable, destroy, fireDocumentSaved, fireElementAdded, fireElementChanged, fireElementRemoved, getElement, getElement, getElements, getElements, getIndexOfElement, getInsertPositionOfAttribute, getInsertPositionOfElement, getReloadSchemaController, getSchemaNamespace, getTargetNamespace, getUndoHandler, isAllowedChild, moveElementDown, moveElementUndoable, moveElementUp, removeElement, removeReloadDocumentListener, saveDocument, setReloadSchemaController, setUndoHandler
 
Methods inherited from class uk.ac.reload.moonunit.dom.ReloadDocument
getDocument, getFile, getRootElement, isDirty, isDocumentNamespace, isMemberOfSameDocument, loadDocument, saveAsDocument, setDirty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_cpCore

protected ContentPackageCore _cpCore
Delegate class for common CP functionality

Constructor Detail

ContentPackage

public ContentPackage()
Default Constructor


ContentPackage

public ContentPackage(java.io.File file,
                      org.jdom.Document doc,
                      ContentPackageSchemaController schemaController)
Constructor

Method Detail

newContentPackage

public void newContentPackage(java.io.File projectFolder,
                              ContentPackageSchemaController cpController,
                              MetadataSchemaController mdController)
                       throws ReloadEditorException
Set up New CP with new project folder, imsmanifest.xml amd Schema files

Throws:
ReloadEditorException

newDocument

protected void newDocument(java.io.File projectFolder,
                           ContentPackageSchemaController cpController,
                           MetadataSchemaController mdController)
                    throws ReloadEditorException
Setup the JDOM Document with Namespaces set and root element set and some default attributes.

Throws:
ReloadEditorException

getComments

public java.lang.String[] getComments()
Description copied from class: ReloadSchemaDocument
Get the comments to add to the XML document

Specified by:
getComments in class ReloadSchemaDocument
Returns:
the Comments to add to the XML Document

importManifest

public org.jdom.Element importManifest(java.io.File manifestFile,
                                       org.jdom.Element manifestElement,
                                       java.lang.String base)
                                throws ReloadEditorException
Import (aggregate) another Package into this Content Package at manifestElement

Throws:
ReloadEditorException

exportManifest

public boolean exportManifest(org.jdom.Element manifestElement,
                              java.io.File targetFolder)
                       throws ReloadEditorException
Export (disagggregate) manifestElement to new Content Package

Throws:
ReloadEditorException

getTargetRootElementName

public java.lang.String getTargetRootElementName()
Description copied from class: ReloadSchemaDocument
Get the Target Root element name

Specified by:
getTargetRootElementName in class ReloadSchemaDocument
Returns:
the Target Root element name

getProjectName

public java.lang.String getProjectName()
Returns:
the project name - the project folder

getProjectFolder

public java.io.File getProjectFolder()
Returns:
the CP Project Folder which is the containing folder of imsmanifest.xml

canCopyElement

public boolean canCopyElement(org.jdom.Element element)
Description copied from class: ReloadSchemaDocument
Decides whether an element can be copied or not - will need to override this

Overrides:
canCopyElement in class ReloadSchemaDocument
Parameters:
element - the element which we are testing
Returns:
whether we can copy an element

canCutElement

public boolean canCutElement(org.jdom.Element element,
                             ReloadSchemaElement schemaElement)
Description copied from class: ReloadSchemaDocument
Decides whether we can cut an element - will need to override this

Overrides:
canCutElement in class ReloadSchemaDocument
Parameters:
element - the element which we are testing schemaElement the schemaElement against which we are testing
Returns:
whether we can cut an element

canPasteFromClipboard

public boolean canPasteFromClipboard(org.jdom.Element element)
Description copied from class: ReloadSchemaDocument
Decides whether we can paste an element - will need to override this

Overrides:
canPasteFromClipboard in class ReloadSchemaDocument
Parameters:
element - the element which we are testing
Returns:
whether we can paste an element from the Clipboard to element

canDragElement

public boolean canDragElement(org.jdom.Element element,
                              int action)
Returns:
whether we can drag an element around

acceptElement

public boolean acceptElement(org.jdom.Element sourceElement,
                             org.jdom.Element targetElement,
                             int actionCopyMove)
Returns:
whether we can copy/move sourceElement to targetElement

shiftElement

public org.jdom.Element shiftElement(org.jdom.Element sourceElement,
                                     org.jdom.Element targetElement,
                                     int action)
Copy/Move sourceElement to targetElement action is either ACTION_COPY or ACTION MOVE


shiftElement

protected org.jdom.Element shiftElement(org.jdom.Element sourceElement,
                                        org.jdom.Element targetElement,
                                        int action,
                                        boolean doSelect)

addElementBySchema

public org.jdom.Element addElementBySchema(java.lang.Object source,
                                           org.jdom.Element parentElement,
                                           ReloadSchemaElement newSchemaElement,
                                           boolean doSelect)
Over-ride this so we can intercept it to do stuff

Overrides:
addElementBySchema in class ReloadSchemaDocument
Parameters:
source - who is telling us this
parentElement - the parent Element to add to
newSchemaElement - the Type of Element we want to add
doSelect - true or false depending on whether the new added element should be selected or not on the user interface

copyElementUndoable

public org.jdom.Element copyElementUndoable(java.lang.Object source,
                                            org.jdom.Element element,
                                            org.jdom.Element newParent,
                                            boolean doSelect)
Over-ride this so we can intercept it to do stuff

Overrides:
copyElementUndoable in class ReloadSchemaDocument
Parameters:
source - who is telling us this element the element to be copied newParent the new parent element doSelect true or false depending on whether the new added element should be selected or not on the user interface
Returns:
the Element copied

pasteElementUndoable

public org.jdom.Element pasteElementUndoable(java.lang.Object source,
                                             org.jdom.Element element,
                                             org.jdom.Element newParent,
                                             boolean doSelect)
Over-ride this so we can intercept it to do stuff

Overrides:
pasteElementUndoable in class ReloadSchemaDocument
Parameters:
source - who is telling us this element the element to be pasted newParent the new parent element doSelect true or false depending on whether the new added element should be selected or not on the user interface
Returns:
the Element pasted

copypasteElement

protected void copypasteElement(org.jdom.Element newElement)
When an Element is copied over or pasted we need to do a bunch of stuff


addItemManifest

protected org.jdom.Element addItemManifest(org.jdom.Element manifestElement,
                                           org.jdom.Element targetElement,
                                           boolean doSelect)
Add an Item to Item or Organization parent - this references a sub-Manifest


addItemResource

protected org.jdom.Element addItemResource(org.jdom.Element parentElement,
                                           org.jdom.Element resourceElement,
                                           boolean doSelect)
Add an Item to Item or Organization parent - this references a Resource If resourcesElement is not null set the Item's identifierref to it


addOrganization

protected org.jdom.Element addOrganization(org.jdom.Element parentElement,
                                           boolean doSelect)
Add an Organization


addTitle

protected org.jdom.Element addTitle(org.jdom.Element parentElement,
                                    java.lang.String text)
Add a Title element (only one allowed). If a Title Element already exists the text will be replaced by new text


addItemTitle

protected org.jdom.Element addItemTitle(org.jdom.Element itemElement,
                                        org.jdom.Element resourceElement)
Add a Title to an Item based on the Resource it References. If it's an html file use the element from that or the file name <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getElementDisplayName(org.jdom.Element)"><!-- --></A><H3> getElementDisplayName</H3> <PRE> public java.lang.String <B>getElementDisplayName</B>(org.jdom.Element element)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a nice name to display for an Element depending on element type</DL> </DD> </DL> <HR> <A NAME="getReferencedElement(org.jdom.Element)"><!-- --></A><H3> getReferencedElement</H3> <PRE> public org.jdom.Element <B>getReferencedElement</B>(org.jdom.Element sourceElement)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>The Element referenced by identifierref in sourceElement. The search digs downward from sourceElement - this is important. This will be either a Resource or a sub-Manifest.</DL> </DD> </DL> <HR> <A NAME="isReferencingElement(org.jdom.Element)"><!-- --></A><H3> isReferencingElement</H3> <PRE> public boolean <B>isReferencingElement</B>(org.jdom.Element element)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>true if this element has an identifierref attribute</DL> </DD> </DL> <HR> <A NAME="getReferencedIdentifersAllowed(org.jdom.Element)"><!-- --></A><H3> getReferencedIdentifersAllowed</H3> <PRE> public java.lang.String[] <B>getReferencedIdentifersAllowed</B>(org.jdom.Element element)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>all available Identifiers from Resources and sub-Manifests that an element can legally reference. For an Item this will be Resources and sub-manifests and for a Resource Dependency this will be another Resource</DL> </DD> </DL> <HR> <A NAME="getReferencedElementsAllowed(org.jdom.Element)"><!-- --></A><H3> getReferencedElementsAllowed</H3> <PRE> public org.jdom.Element[] <B>getReferencedElementsAllowed</B>(org.jdom.Element element)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>all available Elements (Resources and sub-Manifests) that an element can legally reference. For an Item this will be Resources and sub-manifests and for a Resource Dependency this will be another Resource</DL> </DD> </DL> <HR> <A NAME="getOrganizations(org.jdom.Element)"><!-- --></A><H3> getOrganizations</H3> <PRE> public org.jdom.Element[] <B>getOrganizations</B>(org.jdom.Element orgsElement)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>all ORGANIZATION elements in an ORGANIZATIONS element</DL> </DD> </DL> <HR> <A NAME="getOrganizationsAllowed(org.jdom.Element)"><!-- --></A><H3> getOrganizationsAllowed</H3> <PRE> public org.jdom.Element[] <B>getOrganizationsAllowed</B>(org.jdom.Element orgsElement)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>all ORGANIZATION elements in an ORGANIZATIONS element that can be referenced</DL> </DD> </DL> <HR> <A NAME="getDefaultOrganization(org.jdom.Element)"><!-- --></A><H3> getDefaultOrganization</H3> <PRE> public org.jdom.Element <B>getDefaultOrganization</B>(org.jdom.Element orgsElement)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the default Organization for an ORGANIZATIONS element If there is a DEFAULT ref in the ORGANIZATIONS element will return that otherwise return first ORGANIZATION Element if found</DL> </DD> </DL> <HR> <A NAME="getParentManifestElement(org.jdom.Element)"><!-- --></A><H3> getParentManifestElement</H3> <PRE> public org.jdom.Element <B>getParentManifestElement</B>(org.jdom.Element element)</PRE> <DL> <DD>Find the local parent "manifest" Element for a given Element If element is the manifest, will return that <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getElementsInManifest(org.jdom.Element, java.lang.String, org.jdom.Namespace)"><!-- --></A><H3> getElementsInManifest</H3> <PRE> public org.jdom.Element[] <B>getElementsInManifest</B>(org.jdom.Element manifestElement, java.lang.String elementName, org.jdom.Namespace ns)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>all sub-Elements of type elementName from a given parent Manifest This does a deep recursive search</DL> </DD> </DL> <HR> <A NAME="getElementByIdentifier(org.jdom.Element, java.lang.String)"><!-- --></A><H3> getElementByIdentifier</H3> <PRE> public org.jdom.Element <B>getElementByIdentifier</B>(org.jdom.Element parent, java.lang.String identifier)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an Element by its IDENTIFIER attribute starting at Parent element This will only search one-level deep from parent</DL> </DD> </DL> <HR> <A NAME="getMetadataNamespace()"><!-- --></A><H3> getMetadataNamespace</H3> <PRE> public org.jdom.Namespace <B>getMetadataNamespace</B>()</PRE> <DL> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../uk/ac/reload/moonunit/dom/contentpackaging/AbstractContentPackage.html#getMetadataNamespace()">getMetadataNamespace</A></CODE> in interface <CODE><A HREF="../../../../../uk/ac/reload/moonunit/dom/contentpackaging/AbstractContentPackage.html" title="interface in uk.ac.reload.moonunit.dom.contentpackaging">AbstractContentPackage</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the MD Namespace for a CP Document or null if none declared</DL> </DD> </DL> <HR> <A NAME="isMetadataRoot(java.lang.String)"><!-- --></A><H3> isMetadataRoot</H3> <PRE> public boolean <B>isMetadataRoot</B>(java.lang.String name)</PRE> <DL> <DD>Return whether we have the MD root name of any embedded Metadata "lom" <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../uk/ac/reload/moonunit/dom/contentpackaging/AbstractContentPackage.html#isMetadataRoot(java.lang.String)">isMetadataRoot</A></CODE> in interface <CODE><A HREF="../../../../../uk/ac/reload/moonunit/dom/contentpackaging/AbstractContentPackage.html" title="interface in uk.ac.reload.moonunit.dom.contentpackaging">AbstractContentPackage</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>whether we have the MD root name of any embedded Metadata "lom"</DL> </DD> </DL> <HR> <A NAME="isMetadataElement(java.lang.String)"><!-- --></A><H3> isMetadataElement</H3> <PRE> public boolean <B>isMetadataElement</B>(java.lang.String name)</PRE> <DL> <DD>Return whether we have the "metadata" element <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../uk/ac/reload/moonunit/dom/contentpackaging/AbstractContentPackage.html#isMetadataElement(java.lang.String)">isMetadataElement</A></CODE> in interface <CODE><A HREF="../../../../../uk/ac/reload/moonunit/dom/contentpackaging/AbstractContentPackage.html" title="interface in uk.ac.reload.moonunit.dom.contentpackaging">AbstractContentPackage</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>whether we have the "metadata" element</DL> </DD> </DL> <HR> <A NAME="getURL(org.jdom.Element)"><!-- --></A><H3> getURL</H3> <PRE> public java.lang.String <B>getURL</B>(org.jdom.Element element)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>The URL string that an Element references</DL> </DD> </DL> <HR> <A NAME="getElementHREF(org.jdom.Element)"><!-- --></A><H3> getElementHREF</H3> <PRE> public java.lang.String <B>getElementHREF</B>(org.jdom.Element element)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>An actual HREF reference from an Element's HREF taking into account xml:base</DL> </DD> </DL> <HR> <A NAME="getElementBase(org.jdom.Element)"><!-- --></A><H3> getElementBase</H3> <PRE> public java.lang.String <B>getElementBase</B>(org.jdom.Element element)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>An actual BASE reference for an Element taking into account xml:base</DL> </DD> </DL> <HR> <A NAME="getParameters(org.jdom.Element)"><!-- --></A><H3> getParameters</H3> <PRE> public java.lang.String <B>getParameters</B>(org.jdom.Element element)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the parameters attribute of an element</DL> </DD> </DL> <HR> <A NAME="getResourceFile(org.jdom.Element)"><!-- --></A><H3> getResourceFile</H3> <PRE> public java.io.File <B>getResourceFile</B>(org.jdom.Element element)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>An actual File reference that an Element references. If it's not a local file or does not exist, return null</DL> </DD> </DL> <HR> <A NAME="getResourceFiles(org.jdom.Element)"><!-- --></A><H3> getResourceFiles</H3> <PRE> public java.io.File[] <B>getResourceFiles</B>(org.jdom.Element manifestElement)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>All File HREFs for a given Manifest Element taking into account xml:base</DL> </DD> </DL> <HR> <A NAME="getResource(java.lang.String, org.jdom.Element)"><!-- --></A><H3> getResource</H3> <PRE> public org.jdom.Element <B>getResource</B>(java.lang.String href, org.jdom.Element resourcesElement)</PRE> <DL> <DD>Return a Resource Element given its HREF <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getFile(java.lang.String, org.jdom.Element)"><!-- --></A><H3> getFile</H3> <PRE> public org.jdom.Element <B>getFile</B>(java.lang.String href, org.jdom.Element resourceElement)</PRE> <DL> <DD>Return a File Element given its HREF <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getResourcesElement(org.jdom.Element)"><!-- --></A><H3> getResourcesElement</H3> <PRE> public org.jdom.Element <B>getResourcesElement</B>(org.jdom.Element element)</PRE> <DL> <DD>Find the local "resources" Element for a given Element position. This is because there may be more than one with sub-manifests <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="createNewIDRefs(org.jdom.Element, java.util.Hashtable)"><!-- --></A><H3> createNewIDRefs</H3> <PRE> protected void <B>createNewIDRefs</B>(org.jdom.Element element, java.util.Hashtable id_map)</PRE> <DL> <DD>Create new IDENTIFIERREFs and DEFAULT attributes <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="createNewPrerequisiteRefs(org.jdom.Element, java.util.Hashtable)"><!-- --></A><H3> createNewPrerequisiteRefs</H3> <PRE> protected void <B>createNewPrerequisiteRefs</B>(org.jdom.Element element, java.util.Hashtable id_map)</PRE> <DL> <DD>Create new SCORM Prerequisite Refs Really this method should be in the SCORM1_2Package class <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="createNewIDs(org.jdom.Element)"><!-- --></A><H3> createNewIDs</H3> <PRE> protected java.util.Hashtable <B>createNewIDs</B>(org.jdom.Element element)</PRE> <DL> <DD>Create a new ID for an Element that has an IDENTIFIER attribute and also for its children Only works if the Element already has an IDENTIFIER attribute <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a Hashtable of old IDs mapped to Elements</DL> </DD> </DL> <HR> <A NAME="createNewIDs(org.jdom.Element, java.util.Hashtable)"><!-- --></A><H3> createNewIDs</H3> <PRE> protected void <B>createNewIDs</B>(org.jdom.Element element, java.util.Hashtable idmap)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="checkIDRefs(org.jdom.Element)"><!-- --></A><H3> checkIDRefs</H3> <PRE> protected void <B>checkIDRefs</B>(org.jdom.Element element)</PRE> <DL> <DD>If we move or copy an Element that contains an IDENTIFIERREF to another Element we check that the Element referenced is still below us. If it is then OK, if not the reference is invalid so we remove it - also for its children <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="generateUniqueID(org.jdom.Element)"><!-- --></A><H3> generateUniqueID</H3> <PRE> protected java.lang.String <B>generateUniqueID</B>(org.jdom.Element element)</PRE> <DL> <DD>Generate a Unique Identifier for an Element <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="setDefaultOrganization(org.jdom.Element)"><!-- --></A><H3> setDefaultOrganization</H3> <PRE> protected void <B>setDefaultOrganization</B>(org.jdom.Element organization)</PRE> <DL> <DD>When an Organization element is added/copied to an Organizations Element and it is the only one, set the Organizations "default" attribute to it <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="addReloadResources(uk.ac.reload.editor.contentpackaging.ReloadResource[], org.jdom.Element)"><!-- --></A><H3> addReloadResources</H3> <PRE> public org.jdom.Element <B>addReloadResources</B>(<A HREF="../../../../../uk/ac/reload/editor/contentpackaging/ReloadResource.html" title="class in uk.ac.reload.editor.contentpackaging">ReloadResource</A>[] reloadResources, org.jdom.Element parentElement)</PRE> <DL> <DD>Add a bunch of ReloadResources to the Manifest <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the last added Element</DL> </DD> </DL> <HR> <A NAME="addReloadResource(uk.ac.reload.editor.contentpackaging.ReloadResource, org.jdom.Element)"><!-- --></A><H3> addReloadResource</H3> <PRE> public org.jdom.Element <B>addReloadResource</B>(<A HREF="../../../../../uk/ac/reload/editor/contentpackaging/ReloadResource.html" title="class in uk.ac.reload.editor.contentpackaging">ReloadResource</A> reloadResource, org.jdom.Element parentElement)</PRE> <DL> <DD>Add a ReloadResource to the Manifest <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the last added Element</DL> </DD> </DL> <HR> <A NAME="addReloadResource(uk.ac.reload.editor.contentpackaging.ReloadResource, org.jdom.Element, boolean)"><!-- --></A><H3> addReloadResource</H3> <PRE> protected org.jdom.Element <B>addReloadResource</B>(<A HREF="../../../../../uk/ac/reload/editor/contentpackaging/ReloadResource.html" title="class in uk.ac.reload.editor.contentpackaging">ReloadResource</A> reloadResource, org.jdom.Element parentElement, boolean doSelect)</PRE> <DL> <DD>Add a ReloadResource to a given Element <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="addReloadResourceToResourcesElement(uk.ac.reload.editor.contentpackaging.ReloadResource, org.jdom.Element, boolean)"><!-- --></A><H3> addReloadResourceToResourcesElement</H3> <PRE> protected org.jdom.Element <B>addReloadResourceToResourcesElement</B>(<A HREF="../../../../../uk/ac/reload/editor/contentpackaging/ReloadResource.html" title="class in uk.ac.reload.editor.contentpackaging">ReloadResource</A> reloadResource, org.jdom.Element resourcesElement, boolean doSelect)</PRE> <DL> <DD>Add a Resource to the "resources" element <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="containsReloadResource(uk.ac.reload.editor.contentpackaging.ReloadResource, org.jdom.Element)"><!-- --></A><H3> containsReloadResource</H3> <PRE> protected boolean <B>containsReloadResource</B>(<A HREF="../../../../../uk/ac/reload/editor/contentpackaging/ReloadResource.html" title="class in uk.ac.reload.editor.contentpackaging">ReloadResource</A> reloadResource, org.jdom.Element resourcesElement)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>true or false as to whether this CP contains a ReloadResource</DL> </DD> </DL> <HR> <A NAME="getResourceByReloadResouce(uk.ac.reload.editor.contentpackaging.ReloadResource, org.jdom.Element)"><!-- --></A><H3> getResourceByReloadResouce</H3> <PRE> protected org.jdom.Element <B>getResourceByReloadResouce</B>(<A HREF="../../../../../uk/ac/reload/editor/contentpackaging/ReloadResource.html" title="class in uk.ac.reload.editor.contentpackaging">ReloadResource</A> reloadResource, org.jdom.Element resourcesElement)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a Resource in reference to a ReloadResource</DL> </DD> </DL> <HR> <A NAME="getFileByReloadResouce(uk.ac.reload.editor.contentpackaging.ReloadResource, org.jdom.Element)"><!-- --></A><H3> getFileByReloadResouce</H3> <PRE> protected org.jdom.Element <B>getFileByReloadResouce</B>(<A HREF="../../../../../uk/ac/reload/editor/contentpackaging/ReloadResource.html" title="class in uk.ac.reload.editor.contentpackaging">ReloadResource</A> reloadResource, org.jdom.Element resourceElement)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a File in reference to a ReloadResource</DL> </DD> </DL> <HR> <A NAME="containsResource(org.jdom.Element, org.jdom.Element)"><!-- --></A><H3> containsResource</H3> <PRE> public boolean <B>containsResource</B>(org.jdom.Element sourceElement, org.jdom.Element resourcesElement)</PRE> <DL> <DD>Return whether resourcesElement already contains sourceElement as a Resource This searches by the HREF attribute <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="containsResource(java.lang.String, org.jdom.Element)"><!-- --></A><H3> containsResource</H3> <PRE> protected boolean <B>containsResource</B>(java.lang.String href, org.jdom.Element resourcesElement)</PRE> <DL> <DD>Return whether a Resources Element contains a Resource by HREF <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="containsFile(java.lang.String, org.jdom.Element)"><!-- --></A><H3> containsFile</H3> <PRE> protected boolean <B>containsFile</B>(java.lang.String href, org.jdom.Element resourceElement)</PRE> <DL> <DD>Return whether a Resource Element contains a File Element by HREF <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="acceptsReloadResources(org.jdom.Element)"><!-- --></A><H3> acceptsReloadResources</H3> <PRE> public boolean <B>acceptsReloadResources</B>(org.jdom.Element targetElement)</PRE> <DL> <DD>Return whether targetElement can accept ReloadResources <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="addFileElements(uk.ac.reload.editor.contentpackaging.ReloadResource, org.jdom.Element, boolean)"><!-- --></A><H3> addFileElements</H3> <PRE> protected void <B>addFileElements</B>(<A HREF="../../../../../uk/ac/reload/editor/contentpackaging/ReloadResource.html" title="class in uk.ac.reload.editor.contentpackaging">ReloadResource</A> reloadResource, org.jdom.Element resourceElement, boolean doSelect)</PRE> <DL> <DD>Add File dependencies for a ReloadResource. Note - this is NOT an UNDOABLE EVENT <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="addFileElement(java.io.File, org.jdom.Element, boolean)"><!-- --></A><H3> addFileElement</H3> <PRE> protected org.jdom.Element <B>addFileElement</B>(java.io.File reloadResource, org.jdom.Element resourceElement, boolean doSelect)</PRE> <DL> <DD>Add a <file> element to a <resource> element from a ReloadResource. Note - this is an UNDOABLE EVENT <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the added <file> element</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev">  <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ContentPackage.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>VdexReload 1.1.3 API</font></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  PREV CLASS   <A HREF="../../../../../uk/ac/reload/editor/contentpackaging/ContentPackageEditor.html" title="class in uk.ac.reload.editor.contentpackaging"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>    <A HREF="ContentPackage.html" target="_top"><B>NO FRAMES</B></A>    <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_classes_inherited_from_class_uk.ac.reload.moonunit.dom.ReloadSchemaDocument">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>