|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.cmu.sun.model.FileNodeModel
public class FileNodeModel
Abstracted model of the underlying filesystem. We wanted to hide away Java's view of the filesystem becasue we often had to make changes on our own (such as hiding files that start with a dot). This class hides any filesystem exception, so it gives our protoype a little more robustness. It also models the filesystem more as a clener tree structure than before. Finally, it helps to pull out the displayable file names from the type information (which could be the file extension, or some other metatdata)
| Nested Class Summary | |
|---|---|
static class |
FileNodeModel.Filetype
|
| Field Summary | |
|---|---|
(package private) java.io.File |
file
|
(package private) FileNodeModel |
parent
|
| Constructor Summary | |
|---|---|
FileNodeModel(java.io.File file)
|
|
FileNodeModel(java.io.File file,
FileNodeModel parent)
|
|
| Method Summary | |
|---|---|
java.util.List<FileNodeModel> |
getChildren()
If this node is a folder, it returns a list of visible children to this node. |
java.lang.String |
getExtension()
returns the extension of the file, or an empty string if the file has no extension. |
java.lang.String |
getName()
returns the name of the file. |
FileNodeModel |
getParent()
returns the parent of this node, or null if this node has no parent |
FileNodeModel.Filetype |
getType()
|
boolean |
isFolder()
A container node is a dirrectory (a folder). |
boolean |
isVisible()
returns true if this filesystem node is visible to the user. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
java.io.File file
FileNodeModel parent
| Constructor Detail |
|---|
public FileNodeModel(java.io.File file)
public FileNodeModel(java.io.File file,
FileNodeModel parent)
| Method Detail |
|---|
public boolean isFolder()
public boolean isVisible()
public FileNodeModel getParent()
public java.lang.String getName()
public java.lang.String getExtension()
public FileNodeModel.Filetype getType()
public java.util.List<FileNodeModel> getChildren()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||