|
||||||||||
| 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.CPResource
public class CPResource
Description:
This class represents a resource-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 | |
|---|---|
CPResource()
|
|
CPResource(org.dom4j.tree.DefaultElement me)
this constructor is needed when building up the datamodel (parsing XML-manifest) |
|
CPResource(java.lang.String identifier)
this constructor is used when creating a new resource (adding a new resource to the cp) |
|
| Method Summary | |
|---|---|
void |
addDependency(CPDependency newDependency)
adds a new CPDependency to the end of the dependencies vector |
void |
addFile(CPFile newFile)
adds a new CPFile to the end of the files-vector (at the end) |
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<CPDependency> |
getDependencies()
|
java.util.Iterator<CPDependency> |
getDependencyIterator()
|
org.dom4j.tree.DefaultElement |
getElementByIdentifier(java.lang.String id)
|
java.util.Vector<CPFile> |
getFiles()
|
java.lang.String |
getFullHref()
|
java.lang.String |
getHref()
|
java.lang.String |
getIdentifier()
|
CPResources |
getParentElement()
|
int |
getPosition()
|
java.lang.String |
getType()
|
java.lang.String |
getXMLBase()
|
void |
removeFromManifest()
removes this |
void |
removeLinkedFiles()
Removes all linked files from the file-system |
void |
removeReferencedFile()
Removes the single file that the resource references to. |
void |
setHref(java.lang.String href)
|
void |
setIdentifier(java.lang.String identifier)
|
void |
setMetadata(CPMetadata md)
|
void |
setParentElement(CPResources parent)
|
void |
setPosition(int pos)
|
void |
setType(java.lang.String type)
|
void |
setXMLBase(java.lang.String xmlBase)
|
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 CPResource(org.dom4j.tree.DefaultElement me)
me - public CPResource(java.lang.String identifier)
public CPResource()
| Method Detail |
|---|
public java.lang.Object clone()
clone in interface org.dom4j.Nodeclone in class org.dom4j.tree.DefaultElementDefaultElement.clone()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 addFile(CPFile newFile)
public void addDependency(CPDependency newDependency)
newDependency - public void removeFromManifest()
public void removeLinkedFiles()
public void removeReferencedFile()
public java.lang.String getHref()
public java.lang.String getFullHref()
public java.lang.String getType()
public java.lang.String getIdentifier()
public java.lang.String getXMLBase()
public java.util.Vector<CPFile> getFiles()
public java.util.Vector<CPDependency> getDependencies()
public java.util.Iterator<CPDependency> getDependencyIterator()
public org.dom4j.tree.DefaultElement getElementByIdentifier(java.lang.String id)
getElementByIdentifier in interface CPNodeCPNode.getElementByIdentifier(java.lang.String)public int getPosition()
getPosition in interface CPNodepublic CPResources getParentElement()
public void setHref(java.lang.String href)
public void setIdentifier(java.lang.String identifier)
public void setType(java.lang.String type)
public void setXMLBase(java.lang.String xmlBase)
public void setPosition(int pos)
setPosition in interface CPNodepublic void setParentElement(CPResources parent)
public void setMetadata(CPMetadata md)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||