Java Doc for CollectionImpl.java in  » Database-DBMS » Ozone-1.1 » org » ozoneDB » xml » dom » 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 » Database DBMS » Ozone 1.1 » org.ozoneDB.xml.dom 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.ozoneDB.xml.dom.CollectionImpl

All known Subclasses:   org.ozoneDB.xml.dom.html.HTMLCollectionImpl,
CollectionImpl
public class CollectionImpl implements HTMLCollection(Code)
Implements a live collection of elements. This collection is based on the org.w3c.dom.html.HTMLCollection defined for HTML documents but works with XML documents.

The collection is defined in terms of a root element and the elements to look for under this root. Only elements of the specified type are contained in the collection. Elements are returned by index or by identifier (the id attribute). The collection is live, meaning that changes to the document tree are immediately reflected in the collection. The collection is not optimized for traversing large document trees.

The collection has to meet two requirements: it has to be live, and it has to traverse depth first and always return results in that order. As such, using an object container (such as java.util.Vector ) is expensive on insert/remove operations. Instead, the collection has been implemented using three traversing functions. As a result, operations on large documents will result in traversal of the entire document tree and consume a considerable amount of time. *

* Note that synchronization on the traversed document cannot be achieved. The document itself cannot be locked, and locking each traversed node is likely to lead to a dead lock condition. Therefore, there is a chance of the document being changed as results are fetched; in all likelihood, the results might be out dated, but not erroneous.

Used to implement both org.openxml.XMLCollection and org.openxml.dom.html.HTMLAnchorElementImpl . *
version:
   $Revision: 1.1 $ $Date: 2001/12/18 11:03:24 $
author:
   Assaf Arkin
See Also:   org.w3c.dom.html.HTMLCollection




Constructor Summary
public  CollectionImpl(Element topLevel, String lookFor)
     Construct a new collection that retrieves element of the specific type (lookFor) from the specific document portion (topLevel).
public  CollectionImpl(Element topLevel)
     Hidden constructor used by derived classes that might have different _lookfor properties.

Method Summary
protected  booleancollectionMatch(Element elem, String name)
     Determines if current element matches based on what we're looking for. The element is passed along with an optional identifier name.
final public  intgetLength()
     Returns the length of the collection.
final public  Nodeitem(int index)
     Retrieves the indexed node from the collection.
final public  NodenamedItem(String name)
     Retrieves the named node from the collection.
protected  booleanrecurse()
     Returns true if scanning methods should iterate through the collection. When looking for elements in the document, recursing is needed to traverse the full document tree.


Constructor Detail
CollectionImpl
public CollectionImpl(Element topLevel, String lookFor)(Code)
Construct a new collection that retrieves element of the specific type (lookFor) from the specific document portion (topLevel).
Parameters:
  topLevel - The element underneath which the collection exists
Parameters:
  lookFor - Tag of element to look for



CollectionImpl
public CollectionImpl(Element topLevel)(Code)
Hidden constructor used by derived classes that might have different _lookfor properties.
Parameters:
  topLevel - The element underneath which the collection exists




Method Detail
collectionMatch
protected boolean collectionMatch(Element elem, String name)(Code)
Determines if current element matches based on what we're looking for. The element is passed along with an optional identifier name. If the element is the one we're looking for, return true. If the name is also specified, the name must match the id attribute.
Parameters:
  elem - The current element
Parameters:
  name - The identifier name or null The element matches what we're looking for



getLength
final public int getLength()(Code)
Returns the length of the collection. This method might traverse the entire document tree. Length of the collection



item
final public Node item(int index)(Code)
Retrieves the indexed node from the collection. Nodes are numbered in tree order - depth-first traversal order. This method might traverse the entire document tree.
Parameters:
  index - The index of the node to return The specified node or null if no such node found



namedItem
final public Node namedItem(String name)(Code)
Retrieves the named node from the collection. The name is matched case sensitive against the id attribute of each element in the collection, returning the first match. The tree is traversed in depth-first order. This method might traverse the entire document tree.
Parameters:
  name - The name of the node to return The specified node or null if no such node found



recurse
protected boolean recurse()(Code)
Returns true if scanning methods should iterate through the collection. When looking for elements in the document, recursing is needed to traverse the full document tree. When looking inside a specific element (e.g. for a cell inside a row), recursing can lead to erroneous results. True if methods should recurse to traverse entire tree



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.