|
||||||||||
| 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
org.mycore.datamodel.ifs2.MCRDirectory
org.mycore.datamodel.ifs2.MCRFileCollection
public class MCRFileCollection
Represents a set of files and directories belonging together, that are stored in a persistent MCRFileStore. A FileCollection has a unique ID within the store, it is the root folder of all files and directories in the collection.
| Field Summary |
|---|
| Fields inherited from class org.mycore.datamodel.ifs2.MCRStoredNode |
|---|
data |
| Fields inherited from class org.mycore.datamodel.ifs2.MCRNode |
|---|
fo, parent |
| Constructor Summary | |
|---|---|
protected |
MCRFileCollection(MCRStore store,
int id)
Creates a new file collection in the given store, or retrieves an existing one. |
| Method Summary | |
|---|---|
MCRNode |
getChild(String name)
Returns the child node with the given filename, or null |
int |
getID()
Returns the ID of this file collection |
(package private) Document |
getMetadata()
Returns additional metadata stored for all files and directories in this collection |
String |
getName()
Returns the file or directory name |
int |
getNumChildren()
Returns the number of child nodes of this node. |
MCRFileCollection |
getRoot()
Returns this object, because the FileCollection instance is the root of all files and directories contained in the collection. |
MCRStore |
getStore()
Returns the store this file collection is stored in. |
void |
renameTo(String name)
Throws a exception, because a file collection's name is always the empty string and therefore can not be renamed. |
void |
repairMetadata()
Repairs additional metadata stored for all files and directories in this collection |
protected void |
saveAdditionalData()
|
| Methods inherited from class org.mycore.datamodel.ifs2.MCRDirectory |
|---|
buildChildNode, createDir, createFile |
| Methods inherited from class org.mycore.datamodel.ifs2.MCRStoredNode |
|---|
clearLabels, delete, getCurrentLabel, getLabel, getLabels, setLabel, setLastModified |
| Methods inherited from class org.mycore.datamodel.ifs2.MCRNode |
|---|
getChildren, getContent, getLastModified, getNodeByPath, getParent, getPath, getRandomAccessContent, getSize, hasChildren, isDirectory, isFile |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected MCRFileCollection(MCRStore store,
int id)
throws Exception
store - the store this file collection is stored inid - the ID of this file collection
ExceptionMCRFileStore| Method Detail |
|---|
protected void saveAdditionalData()
throws Exception
Exceptionpublic void renameTo(String name)
renameTo in class MCRStoredNodename - the new file namepublic MCRStore getStore()
public int getID()
public MCRFileCollection getRoot()
getRoot in class MCRNode
public int getNumChildren()
throws Exception
MCRNode
getNumChildren in class MCRNodeException
public MCRNode getChild(String name)
throws Exception
MCRNode
getChild in class MCRNodename - the name of the child node
Exceptionpublic String getName()
MCRNode
getName in class MCRNode
public void repairMetadata()
throws Exception
repairMetadata in class MCRDirectoryException
Document getMetadata()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||