|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.datamodel.ifs2.MCRNode
org.mycore.datamodel.ifs2.MCRStoredNode
public abstract class MCRStoredNode
A file or directory really stored by importing it from outside the system. Can be modified, updated and deleted, in contrast to virtual nodes.
| Field Summary | |
|---|---|
protected Element |
data
Any additional data of this node that is not stored in the file object |
| Fields inherited from class org.mycore.datamodel.ifs2.MCRNode |
|---|
fo, parent |
| Constructor Summary | |
|---|---|
protected |
MCRStoredNode(MCRDirectory parent,
org.apache.commons.vfs.FileObject fo,
Element data)
Returns a stored node instance that already exists |
protected |
MCRStoredNode(MCRDirectory parent,
String name,
String type)
Creates a new stored node |
| Method Summary | |
|---|---|
void |
clearLabels()
Removes all labels set |
void |
delete()
Deletes this node with all its data and children |
String |
getCurrentLabel()
Returns the label in the current language, otherwise in default language, otherwise the first label defined, if any at all. |
String |
getLabel(String lang)
Returns the label in the given language |
Map<String,String> |
getLabels()
Returns a map of all labels, sorted by xml:lang, Key is xml:lang, value is the label for that language. |
void |
renameTo(String name)
Renames this node. |
(package private) abstract void |
repairMetadata()
Repairs additional metadata of this node |
void |
setLabel(String lang,
String label)
Sets a label for this node |
void |
setLastModified(Date time)
Sets last modification time of this file to a custom value. |
| Methods inherited from class org.mycore.datamodel.ifs2.MCRNode |
|---|
buildChildNode, getChild, getChildren, getContent, getLastModified, getName, getNodeByPath, getNumChildren, getParent, getPath, getRandomAccessContent, getRoot, getSize, hasChildren, isDirectory, isFile |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Element data
| Constructor Detail |
|---|
protected MCRStoredNode(MCRDirectory parent,
org.apache.commons.vfs.FileObject fo,
Element data)
throws Exception
parent - the parent directory containing this nodefo - the file object in local filesystem representing this nodedata - the additional data of this node that is not stored in the
file object
Exception
protected MCRStoredNode(MCRDirectory parent,
String name,
String type)
throws Exception
parent - the parent directoryname - the name of the nodetype - the node type, dir or file
Exception| Method Detail |
|---|
public void delete()
throws Exception
Exception
public void renameTo(String name)
throws Exception
name - the new file name
Exception
public void setLastModified(Date time)
throws Exception
time - the time to be stored as last modification time
Exception
public void setLabel(String lang,
String label)
throws Exception
lang - the xml:lang language IDlabel - the label in this language
Exception
public void clearLabels()
throws Exception
Exceptionpublic Map<String,String> getLabels()
public String getLabel(String lang)
lang - the xml:lang language ID
public String getCurrentLabel()
abstract void repairMetadata()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||