Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.xml.dom.html2
Class DomHTMLCollection  view DomHTMLCollection download DomHTMLCollection.java

java.lang.Object
  extended bygnu.xml.dom.html2.DomHTMLCollection
All Implemented Interfaces:
org.w3c.dom.html2.HTMLCollection, org.w3c.dom.html2.HTMLOptionsCollection, org.w3c.dom.traversal.NodeFilter, org.w3c.dom.NodeList

class DomHTMLCollection
extends java.lang.Object
implements org.w3c.dom.html2.HTMLCollection, org.w3c.dom.html2.HTMLOptionsCollection, org.w3c.dom.NodeList, org.w3c.dom.traversal.NodeFilter

An HTML element collection.


Field Summary
(package private)  java.util.List attributeNames
           
(package private)  DomHTMLDocument doc
           
(package private)  java.util.List nodeNames
           
(package private)  java.util.List results
           
(package private)  org.w3c.dom.Node root
           
 
Fields inherited from interface org.w3c.dom.traversal.NodeFilter
FILTER_ACCEPT, FILTER_REJECT, FILTER_SKIP, SHOW_ALL, SHOW_ATTRIBUTE, SHOW_CDATA_SECTION, SHOW_COMMENT, SHOW_DOCUMENT, SHOW_DOCUMENT_FRAGMENT, SHOW_DOCUMENT_TYPE, SHOW_ELEMENT, SHOW_ENTITY, SHOW_ENTITY_REFERENCE, SHOW_NOTATION, SHOW_PROCESSING_INSTRUCTION, SHOW_TEXT
 
Constructor Summary
(package private) DomHTMLCollection(DomHTMLDocument doc, org.w3c.dom.Node root)
           
 
Method Summary
private  boolean acceptAttributes(org.w3c.dom.NamedNodeMap attrs)
           
private  boolean acceptName(java.lang.String name)
           
 short acceptNode(org.w3c.dom.Node n)
          Test whether a specified node is visible in the logical view of a TreeWalker or NodeIterator.
(package private)  void addAttributeName(java.lang.String name)
           
(package private)  void addNodeName(java.lang.String name)
           
(package private)  void evaluate()
           
 int getLength()
          This attribute specifies the length or size of the list.
private  org.w3c.dom.Node getNamedItem(org.w3c.dom.NamedNodeMap attrs, java.lang.String name)
          Case-insensitive version of getNamedItem.
 org.w3c.dom.Node item(int index)
          This method retrieves a node specified by ordinal index.
 org.w3c.dom.Node namedItem(java.lang.String name)
          This method retrieves a Node using a name.
 void setLength(int length)
          This attribute specifies the length or size of the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

doc

final DomHTMLDocument doc

root

final org.w3c.dom.Node root

nodeNames

java.util.List nodeNames

attributeNames

java.util.List attributeNames

results

java.util.List results
Constructor Detail

DomHTMLCollection

DomHTMLCollection(DomHTMLDocument doc,
                  org.w3c.dom.Node root)
Method Detail

addNodeName

void addNodeName(java.lang.String name)

addAttributeName

void addAttributeName(java.lang.String name)

acceptNode

public short acceptNode(org.w3c.dom.Node n)
Description copied from interface: org.w3c.dom.traversal.NodeFilter
Test whether a specified node is visible in the logical view of a TreeWalker or NodeIterator. This function will be called by the implementation of TreeWalker and NodeIterator; it is not normally called directly from user code. (Though you could do so if you wanted to use the same filter to guide your own application logic.)

Specified by:
acceptNode in interface org.w3c.dom.traversal.NodeFilter

acceptName

private boolean acceptName(java.lang.String name)

acceptAttributes

private boolean acceptAttributes(org.w3c.dom.NamedNodeMap attrs)

getNamedItem

private org.w3c.dom.Node getNamedItem(org.w3c.dom.NamedNodeMap attrs,
                                      java.lang.String name)
Case-insensitive version of getNamedItem.


evaluate

void evaluate()

getLength

public int getLength()
Description copied from interface: org.w3c.dom.html2.HTMLCollection
This attribute specifies the length or size of the list.

Specified by:
getLength in interface org.w3c.dom.html2.HTMLCollection

setLength

public void setLength(int length)
Description copied from interface: org.w3c.dom.html2.HTMLOptionsCollection
This attribute specifies the length or size of the list.

Specified by:
setLength in interface org.w3c.dom.html2.HTMLOptionsCollection

item

public org.w3c.dom.Node item(int index)
Description copied from interface: org.w3c.dom.html2.HTMLCollection
This method retrieves a node specified by ordinal index. Nodes are numbered in tree order (depth-first traversal order).

Specified by:
item in interface org.w3c.dom.html2.HTMLCollection

namedItem

public org.w3c.dom.Node namedItem(java.lang.String name)
Description copied from interface: org.w3c.dom.html2.HTMLCollection
This method retrieves a Node using a name. With [HTML 4.01] documents, it first searches for a Node with a matching id attribute. If it doesn't find one, it then searches for a Node with a matching name attribute, but only on those elements that are allowed a name attribute. With [XHTML 1.0] documents, this method only searches for Nodes with a matching id attribute. This method is case insensitive in HTML documents and case sensitive in XHTML documents.

Specified by:
namedItem in interface org.w3c.dom.html2.HTMLCollection