DhBaseContainer Class

DhBaseContainer Class

This Package | All Packages

DhElement
  |
  +--DhBaseContainer
public abstract class DhBaseContainer
extends DhElement

Represents the base class for all container elements. This class should be derived from but never instantiated itself.

Methods
Name Description
ensureElemsComplete() Ensures that the m_elems collection is fully populated from peers.
getAllElements() Recursively returns all child elements and their children.
getElementCount() Topic under construction.
getElements() Returns the child elements of this element.
getMatchingChildElements( String strQuery, boolean fRecursive ) Retrieves an enumeration of the child elements that conform to the contraints of strQuery.
setDocument( DhDocument document ) Topic under construction.
setHTMLGenerator( DhHTMLGenerator htmlGen ) Topic under construction.

Methods

DhBaseContainer.ensureElemsComplete

Syntax
protected void ensureElemsComplete();
Description

Ensures that the m_elems collection is fully populated from peers. If the DhSection was created using findElement then we may have deferred creating DhElement derived instances for all the section's contents (that is, we may have only the ones explicitly added if any).

This method fully populates the m_elems array (but just one level down, not recursively).

DhBaseContainer.getAllElements

Syntax
public DhElement[] getAllElements();
Return Value

Returns An array of all child elements

Description

Recursively returns all child elements and their children.

DhBaseContainer.getElementCount

Syntax
public int getElementCount();
Description

Topic under construction.

DhBaseContainer.getElements

Syntax
public DhElement[] getElements();
Return Value

Returns An array of direct child elements.

Description

Returns the child elements of this element.

DhBaseContainer.getMatchingChildElements

Syntax
public IEnumerator getMatchingChildElements( String strQuery, boolean fRecursive );
Parameters
strQuery
A query string of the following format:

<predicate>=<query>

where

<predicate> ::= (style | attr | tag : <name>)|tag (=|<>) (* |'<value>')

<query> ::= {(} <predicate> { ( AND | OR ) <query> ) }

Queries are not case sensitive. A value of '*' indicates all elements where a non-null value of the specific type is present.

fRecursive
Set to true to recursively query child elements and their children, and false to query only direct children.
Return Value

Returns the enumeration of elements which conform to the query

Description

Retrieves an enumeration of the child elements that conform to the contraints of strQuery. The folowing are examples of queries:

Exceptions

DhQueryParseException When the query is not properly formed.

DhBaseContainer.setDocument

Syntax
public void setDocument( DhDocument document );
Description

Topic under construction.

DhBaseContainer.setHTMLGenerator

Syntax
public synchronized void setHTMLGenerator( DhHTMLGenerator htmlGen );
Description

Topic under construction.