|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dom4j.tree.AbstractNode
org.dom4j.tree.AbstractBranch
org.dom4j.tree.AbstractElement
org.dom4j.tree.DefaultElement
org.olat.ims.cp.objects.CPItem
public class CPItem
Description:
This class represents an item-element of a IMS-manifest-file
Initial Date: 26.06.2008
| Field Summary |
|---|
| Fields inherited from interface org.dom4j.Node |
|---|
ANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE |
| Constructor Summary | |
|---|---|
CPItem()
|
|
CPItem(org.dom4j.tree.DefaultElement me,
org.dom4j.tree.DefaultElement parent)
constructor is needed while building the datamodel-tree (parsing XML) |
|
CPItem(java.lang.String identifier)
Constructor is needed when generating a new Item (e.g. |
|
| Method Summary | |
|---|---|
void |
addItem(CPItem newItem)
adds a new CPItem to the childrens-list of this item (inserts at the end) |
void |
addItemAt(CPItem newItem,
int index)
adds a new CPItem to the childrens-list of this item at position index |
void |
buildChildren()
traverses XML-nodes and builds children-objects this function is invoked while the CP is instantiating (parsing-process of the manifest-file) |
void |
buildDocument(org.dom4j.tree.DefaultElement parent)
generates a DefaultElement with all its Attributes and children, and adds it to parent This Function is needed to build the DefaultDocument of the ContentPackage |
java.lang.Object |
clone()
|
java.util.Vector<CPItem> |
getAllItems()
returns a Vector which holds all the children and its subchildren etc. |
org.dom4j.tree.DefaultElement |
getElementByIdentifier(java.lang.String id)
|
CPItem |
getFirstItemWithResource()
searches for the first item with a linked resource (identifierRef id not "") within the children items of this element if this element itself has a referenced resource, this item is returned if no resource is found, null is returned |
java.lang.String |
getIdentifier()
|
java.lang.String |
getIdentifierRef()
|
CPItem |
getItemByID(java.lang.String id)
Returns the Item with the specified identifier Returns null if Item is not found |
java.util.List<java.lang.String> |
getItemIdentifiers()
|
java.util.Iterator<CPItem> |
getItemIterator()
|
java.util.Vector<CPItem> |
getItems()
|
CPMetadata |
getMetadata()
|
org.dom4j.tree.DefaultElement |
getParentElement()
|
int |
getPosition()
|
java.lang.String |
getTitle()
|
boolean |
isVisible()
Returns true, if item is visible |
java.lang.String |
isVisibleString()
return "true" if item is visible "false" otherwise |
void |
removeChild(java.lang.String id)
removes a child |
void |
removeFromManifest()
removes this item from the manifest |
void |
setIdentifier(java.lang.String identifier)
|
void |
setIdentifierRef(java.lang.String identifierRef)
|
void |
setMetadata(CPMetadata md)
|
void |
setNewUniqueID()
generates a new system-unique identifier and sets it |
void |
setNewUniqueIDrev()
Deprecated. |
void |
setParentElement(org.dom4j.tree.DefaultElement parent)
|
void |
setPosition(int position)
|
void |
setTitle(java.lang.String title)
|
void |
setVisible(boolean visible)
|
boolean |
validateElement()
checks whether required attributes are set, and whether required child-elements are present |
| Methods inherited from class org.dom4j.tree.DefaultElement |
|---|
add, additionalNamespaces, additionalNamespaces, attribute, attribute, attribute, attribute, attributeCount, attributeIterator, attributes, clearContent, declaredNamespaces, element, element, element, getDocument, getNamespaceForPrefix, getNamespaceForURI, getParent, getQName, getStringValue, getText, indexOf, node, nodeCount, nodeIterator, processingInstruction, processingInstructions, processingInstructions, remove, removeProcessingInstruction, setAttributes, setContent, setDocument, setParent, setQName, supportsParent |
| Methods inherited from class org.dom4j.tree.AbstractElement |
|---|
accept, add, add, add, add, add, add, add, add, addAttribute, addAttribute, addCDATA, addComment, addElement, addEntity, addNamespace, addProcessingInstruction, addProcessingInstruction, addText, appendAttributes, asXML, attributeValue, attributeValue, attributeValue, attributeValue, createCopy, createCopy, createCopy, elementIterator, elementIterator, elementIterator, elementIterator, elements, elements, elements, elements, elementText, elementText, elementTextTrim, elementTextTrim, ensureAttributesCapacity, getData, getName, getNamespace, getNamespacePrefix, getNamespacesForURI, getNamespaceURI, getNodeType, getPath, getQName, getQualifiedName, getUniquePath, getXPathNameStep, getXPathResult, hasMixedContent, isRootElement, isTextOnly, normalize, remove, remove, remove, remove, remove, remove, remove, remove, setAttributes, setAttributeValue, setAttributeValue, setData, setName, setNamespace, setText, toString, write |
| Methods inherited from class org.dom4j.tree.AbstractBranch |
|---|
addElement, addElement, addElement, appendContent, content, elementByID, getTextTrim, hasContent, isReadOnly, setProcessingInstructions |
| Methods inherited from class org.dom4j.tree.AbstractNode |
|---|
asXPathResult, createPattern, createXPath, createXPathFilter, detach, getNodeTypeName, getPath, getUniquePath, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.dom4j.Element |
|---|
getTextTrim |
| Methods inherited from interface org.dom4j.Branch |
|---|
addElement, addElement, appendContent, content, elementByID, setProcessingInstructions |
| Methods inherited from interface org.dom4j.Node |
|---|
asXPathResult, createXPath, detach, getNodeTypeName, getPath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf |
| Constructor Detail |
|---|
public CPItem(org.dom4j.tree.DefaultElement me,
org.dom4j.tree.DefaultElement parent)
me - public CPItem(java.lang.String identifier)
public CPItem()
| Method Detail |
|---|
public void buildChildren()
CPNode
buildChildren in interface CPNodeCPNode.buildChildren()public boolean validateElement()
CPNode
validateElement in interface CPNodeCPNode.validateElement()public void buildDocument(org.dom4j.tree.DefaultElement parent)
CPNode
buildDocument in interface CPNodeorg.olat.ims.cp.objects.CPNode#getXML(java.lang.StringBuilder)public void addItem(CPItem newItem)
newItem - the new CPItem to add
public void addItemAt(CPItem newItem,
int index)
newItem - the new CPItem to addindex - positionpublic void removeFromManifest()
public void removeChild(java.lang.String id)
public java.lang.Object clone()
clone in interface org.dom4j.Nodeclone in class org.dom4j.tree.DefaultElementDefaultElement.clone()public boolean isVisible()
public java.lang.String isVisibleString()
public CPItem getItemByID(java.lang.String id)
identifier - id
public org.dom4j.tree.DefaultElement getElementByIdentifier(java.lang.String id)
getElementByIdentifier in interface CPNodeCPNode.getElementByIdentifier(java.lang.String)public java.lang.String getTitle()
public java.lang.String getIdentifier()
public java.lang.String getIdentifierRef()
public int getPosition()
getPosition in interface CPNodepublic CPItem getFirstItemWithResource()
public org.dom4j.tree.DefaultElement getParentElement()
public CPMetadata getMetadata()
public java.util.Vector<CPItem> getItems()
public java.util.List<java.lang.String> getItemIdentifiers()
public java.util.Vector<CPItem> getAllItems()
public java.util.Iterator<CPItem> getItemIterator()
public void setTitle(java.lang.String title)
public void setIdentifier(java.lang.String identifier)
public void setIdentifierRef(java.lang.String identifierRef)
public void setVisible(boolean visible)
public void setPosition(int position)
setPosition in interface CPNodepublic void setParentElement(org.dom4j.tree.DefaultElement parent)
public void setMetadata(CPMetadata md)
public void setNewUniqueID()
public void setNewUniqueIDrev()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||