|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.ims.cp.CPCore
public class CPCore
Description:
This class provides basic functionality for a IMS Content Package
Initial Date: 27.06.2008
| Field Summary | |
|---|---|
static java.lang.String |
BASE
|
static java.lang.String |
DEFAULT
|
static java.lang.String |
DEPENDENCY
|
static java.lang.String |
FILE
|
static java.lang.String |
HREF
|
static java.lang.String |
IDENTIFIER
|
static java.lang.String |
IDENTIFIERREF
|
static java.lang.String |
ISVISIBLE
|
static java.lang.String |
ITEM
|
static java.lang.String |
MANIFEST
|
static java.lang.String |
MANIFEST_NAME
The CP Manifest name |
static java.lang.String |
METADATA
|
static java.lang.String |
OLAT_MANIFEST_IDENTIFIER
|
static java.lang.String |
OLAT_ORGANIZATION_IDENTIFIER
|
static java.lang.String |
ORGANIZATION
|
static java.lang.String |
ORGANIZATIONS
|
static java.lang.String |
PARAMETERS
|
static java.lang.String |
RESOURCE
|
static java.lang.String |
RESOURCES
|
static java.lang.String |
SCHEMA
|
static java.lang.String |
SCHEMALOCATION
|
static java.lang.String |
SCHEMAVERSION
|
static java.lang.String |
STRUCTURE
|
static java.lang.String |
TITLE
|
static java.lang.String |
TYPE
|
static java.lang.String |
VERSION
|
| Constructor Summary | |
|---|---|
CPCore(org.dom4j.tree.DefaultDocument doc,
VFSContainer rootDir)
|
|
| Method Summary | |
|---|---|
void |
addElement(org.dom4j.tree.DefaultElement newElement)
adds an element to the CP. |
boolean |
addElement(org.dom4j.tree.DefaultElement newElement,
java.lang.String parentId,
int position)
adds an element as a child to the element with id parentId if the element with parentId is not found, it returns false if adding was successful, it returns true |
boolean |
addElementAfter(org.dom4j.tree.DefaultElement newElement,
java.lang.String id)
adds an element to the cp. |
org.dom4j.tree.DefaultDocument |
buildDocument()
Returns the DefaultDocument of this CP |
void |
buildTree()
parses the document, builds manifest-datamodel-tree-structure |
java.lang.String |
copyElement(java.lang.String sourceID,
java.lang.String targetID)
duplicates an element and inserts it after targetID |
org.dom4j.tree.DefaultElement |
findReferencesToResource(java.lang.String resourceIdentifier)
Searches for |
org.dom4j.tree.DefaultElement |
getElementByIdentifier(java.lang.String identifier)
this is case-sensitive! |
CPOrganization |
getFirstOrganizationInManifest()
returns the first |
CPItem |
getFirstPageToDisplay()
Returns the first page within the given organization returns null if no page found (empty organization) |
java.lang.String |
getItemTitle(java.lang.String itemID)
returns the item of an |
java.lang.String |
getPageByItemID(java.lang.String id)
Gets the linked page for the |
VFSContainer |
getRootDir()
|
CPManifest |
getRootNode()
Returns the rootNode of the manifest |
boolean |
isOLATContentPackage()
|
void |
moveElement(java.lang.String nodeID,
java.lang.String newParentID,
int position)
|
void |
removeElement(java.lang.String identifier,
boolean resourceFlag)
removes an element with identifier "identifier" from the manifest |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MANIFEST_NAME
public static final java.lang.String MANIFEST
public static final java.lang.String ORGANIZATIONS
public static final java.lang.String RESOURCES
public static final java.lang.String DEFAULT
public static final java.lang.String ORGANIZATION
public static final java.lang.String ITEM
public static final java.lang.String PARAMETERS
public static final java.lang.String RESOURCE
public static final java.lang.String BASE
public static final java.lang.String FILE
public static final java.lang.String TYPE
public static final java.lang.String HREF
public static final java.lang.String METADATA
public static final java.lang.String IDENTIFIER
public static final java.lang.String IDENTIFIERREF
public static final java.lang.String STRUCTURE
public static final java.lang.String TITLE
public static final java.lang.String DEPENDENCY
public static final java.lang.String VERSION
public static final java.lang.String SCHEMA
public static final java.lang.String SCHEMALOCATION
public static final java.lang.String SCHEMAVERSION
public static final java.lang.String ISVISIBLE
public static final java.lang.String OLAT_MANIFEST_IDENTIFIER
public static final java.lang.String OLAT_ORGANIZATION_IDENTIFIER
| Constructor Detail |
|---|
public CPCore(org.dom4j.tree.DefaultDocument doc,
VFSContainer rootDir)
| Method Detail |
|---|
public void buildTree()
public org.dom4j.tree.DefaultElement getElementByIdentifier(java.lang.String identifier)
identifier -
public boolean addElement(org.dom4j.tree.DefaultElement newElement,
java.lang.String parentId,
int position)
public void addElement(org.dom4j.tree.DefaultElement newElement)
newElement -
public boolean addElementAfter(org.dom4j.tree.DefaultElement newElement,
java.lang.String id)
newElement - id -
public void removeElement(java.lang.String identifier,
boolean resourceFlag)
identifier - the identifier if the element to removebooleanFlag - indicates whether to remove linked resources as well...!
(needed for moving elements)
public void moveElement(java.lang.String nodeID,
java.lang.String newParentID,
int position)
public java.lang.String copyElement(java.lang.String sourceID,
java.lang.String targetID)
sourceID - targetID - public org.dom4j.tree.DefaultElement findReferencesToResource(java.lang.String resourceIdentifier)
resourceIdentifier -
public CPManifest getRootNode()
public VFSContainer getRootDir()
public org.dom4j.tree.DefaultDocument buildDocument()
public CPOrganization getFirstOrganizationInManifest()
public java.lang.String getPageByItemID(java.lang.String id)
id -
public CPItem getFirstPageToDisplay()
public java.lang.String getItemTitle(java.lang.String itemID)
itemID - the identifier of the item
public boolean isOLATContentPackage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||