org.nodal.filesystem
Interface Directory.Editor

All Superinterfaces:
Directory, Document
Enclosing interface:
Directory

public static interface Directory.Editor
extends Directory

Interface for modifying a Directory.


Nested Class Summary
 
Nested classes inherited from class org.nodal.filesystem.Directory
Directory.Editor
 
Method Summary
 Document createDocument(java.lang.String name, DocumentFormat type)
          Create a new Document conforming to the given DocumentFormat.
 Document createDocument(java.lang.String name, java.lang.String mimeType)
          Create a new Document conforming to the DocumentFormat identified by the given MIME type string.
 Directory createSubdirectory(java.lang.String name)
          Create a subdirectory of this Directory.
 Document link(java.lang.String name, Document doc)
          Attach a Document to this Directory with the given name.
 boolean unlink(java.lang.String name)
          Detach a Document from this Directory.
 
Methods inherited from interface org.nodal.filesystem.Directory
edit, entries, get
 
Methods inherited from interface org.nodal.filesystem.Document
asDirectory, docNode, format, nodeNamed, nodeNamed, path, repository, root, write
 

Method Detail

createSubdirectory

public Directory createSubdirectory(java.lang.String name)
Create a subdirectory of this Directory.


createDocument

public Document createDocument(java.lang.String name,
                               DocumentFormat type)
Create a new Document conforming to the given DocumentFormat.


createDocument

public Document createDocument(java.lang.String name,
                               java.lang.String mimeType)
Create a new Document conforming to the DocumentFormat identified by the given MIME type string.


link

public Document link(java.lang.String name,
                     Document doc)
Attach a Document to this Directory with the given name.

Parameters:
name - the name of the linked Document
doc - the Document to place at this location
Returns:
a new Document that shares content but with a new Path

unlink

public boolean unlink(java.lang.String name)
Detach a Document from this Directory.