Treeviz 0.37 2010-10-17

ch.randelshofer.tree.demo
Class TreevizFileSystemXMLTree

java.lang.Object
  extended by ch.randelshofer.tree.demo.TreevizFileSystemXMLTree
All Implemented Interfaces:
DemoTree

public class TreevizFileSystemXMLTree
extends java.lang.Object
implements DemoTree

TreevizFileSystemXMLTree reads an XML file with the root element named TreevizFileSystem and the top-level child elements Users and Files.

The children of the Users element are interpreted as user account data. Each element should have the following attributes: id(XML-ID), name(Text), created(ISO-Date), isActive(boolean).
Nesting of elements is not allowed. Other than that, there are no more restrictions on the elements.

The children of the Files element are interpreted as a directory tree. Each element should have the following attributes: name(Text), created(ISO-Date), size(Number), and "ownerRef"(id of a user), "creatorRef". Nesting of elements is allowed to form a directory structure. Other than that, there are no more restrictions on the elements. See XMLNodeInfo on how the XML data structure is being interpreted.

Version:
1.0 25. Juni 2008 Created.
Author:
Werner Randelshofer

Constructor Summary
TreevizFileSystemXMLTree(java.io.File xmlFile)
          Creates a new instance.
 
Method Summary
 TreevizFileSystemXMLNodeInfo getInfo()
           
 TreevizFileSystemXMLNode getRoot()
           
 TreevizFileSystemXMLNode getUsersRoot()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreevizFileSystemXMLTree

public TreevizFileSystemXMLTree(java.io.File xmlFile)
                         throws java.io.IOException
Creates a new instance.

Throws:
java.io.IOException
Method Detail

getRoot

public TreevizFileSystemXMLNode getRoot()
Specified by:
getRoot in interface DemoTree

getUsersRoot

public TreevizFileSystemXMLNode getUsersRoot()

getInfo

public TreevizFileSystemXMLNodeInfo getInfo()
Specified by:
getInfo in interface DemoTree

Copyright 2007-2008 (c) Werner Randelshofer.
All rights reserved.