Java Doc for DirectoryTable.java in  » Scripting » oscript-2.10.4 » ti » chimera » registry » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » oscript 2.10.4 » ti.chimera.registry 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   ti.chimera.registry.DirectoryTable

DirectoryTable
public class DirectoryTable (Code)
A directory node is simply a regular node whose contents is a directory table. A directory table is an immutable table, which maps node names to nodes. A directory table can only be created empty, and only way to mutate one (ie. add or remove a child) is by using the DirectoryTable.add or DirectoryTable.remove methods, which return a new directory table. The table also implements DirectoryTable.notIn to compare two directory tables and determine the differences between the two. (Note the DirectoryTable.notIn comparision does not need to be made between successive versions of a directory table, but can be made between arbitrary directory tables.)

The directory table is mainly used internally by the registry.

Note that the current table implementation isn't particularly clever and basically all operations are O(n) where n is number of children, except DirectoryTable.notIn which is O(n^2).
author:
   ;Rob Clark;a0873619;San Diego;;
version:
   0.1




Constructor Summary
public  DirectoryTable()
     Class Constructor, create an empty directory table.

Method Summary
 DirectoryTableadd(Node node, String name)
     Construct a directory table whose contents is the same as the current table, with the specified node added.
public  Nodeget(String name)
     Get the node in this table with the specified name.
public  intgetChildCount()
     Get the number of children of this directory node.
 StringgetChildName(int idx)
     Get the name of the child at the specified index.
public  IteratorgetChildNames()
     Get an iterator of child names of the contents of this directory.
 NodegetChildNode(int idx)
     Get the node of the child at the specified index.
public  IteratornotIn(DirectoryTable otherTable)
     Determine the differences between directory tables, by returning an array of files that are only contained in this table.
 DirectoryTableremove(String name, boolean errIfLastLink)
     Construct a directory table whose contents is the same as the current table, with the specified node removed.
public  StringtoString()
     for debug...


Constructor Detail
DirectoryTable
public DirectoryTable()(Code)
Class Constructor, create an empty directory table.




Method Detail
add
DirectoryTable add(Node node, String name) throws RegistryException(Code)
Construct a directory table whose contents is the same as the current table, with the specified node added. Called by the registry when linking a new node into the tree, this should not be called anywhere else. (Nothing to see here, move along.)
Parameters:
  node - the node to add
Parameters:
  name - name of node to add the new directory table
throws:
  RegistryException - already contains node with same name



get
public Node get(String name)(Code)
Get the node in this table with the specified name. Returns null if none.
Parameters:
  name - name of node to find the requested node, or null if none



getChildCount
public int getChildCount()(Code)
Get the number of children of this directory node. the number of children
See Also:   DirectoryTable.getChildName
See Also:   DirectoryTable.getChildNode



getChildName
String getChildName(int idx)(Code)
Get the name of the child at the specified index.
Parameters:
  idx - the index the child name



getChildNames
public Iterator getChildNames()(Code)
Get an iterator of child names of the contents of this directory. an iterator of child names



getChildNode
Node getChildNode(int idx)(Code)
Get the node of the child at the specified index.
Parameters:
  idx - the index the child name



notIn
public Iterator notIn(DirectoryTable otherTable)(Code)
Determine the differences between directory tables, by returning an array of files that are only contained in this table. For example:
 Iterator added   = newDirTable.notIn(oldDirTable);
 Iterator removed = oldDirTable.notIn(newDirTable);
 
If otherTable is null, this returns the same thing as DirectoryTable.getChildNames .
Parameters:
  otherTable - the other table to compare to, or null an iterator of names of children that exist in this tablebut not otherTable



remove
DirectoryTable remove(String name, boolean errIfLastLink) throws RegistryException(Code)
Construct a directory table whose contents is the same as the current table, with the specified node removed. If an attempt is made to remove a child who is a non-empty directory, this will throw an exception, because much depends on being able to detect a node being removed by detecting a change in the node's parent. Called by the registry when unlinking a node from the tree, this should not be called by anyone else.
Parameters:
  name - name of node to remove
Parameters:
  errIfLastLink - should we throw an exception if this link to the node is the last
throws:
  RegistryException - does not contain node with same nameor if said node is a directory node that still has childrenand errIfLastLink is true



toString
public String toString()(Code)
for debug...



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.