org.eclipse.actf.model.dom
Class DomModel

java.lang.Object
  extended by org.eclipse.actf.model.AbstractModel
      extended by org.eclipse.actf.model.dom.DomModel
All Implemented Interfaces:
IModel

public class DomModel
extends AbstractModel

serves as a model of a hierarchy of nodes that represent the basic elements of an XML document. Nodes are represented by instances of org.w3c.dom.Node instances as specified by the W3C DOM Level 2 specification.

Objects passed to the methods of this class should be instances of org.w3c.dom.Node. Clients can extend this class to validate XML or HTML documents.

Author:
Mike Squillace
See Also:
Node, Document Object Model (DOM) Level 2 Core Specification

Field Summary
static String DOM_MODEL
           
 
Fields inherited from class org.eclipse.actf.model.AbstractModel
baseType, configuration, locator, runtimeContext, treeNodeWalker
 
Constructor Summary
DomModel()
          new DomModel instance; default is org.eclipse.actf.core.config.Configuration.DOM_MODEL
DomModel(String type)
           
 
Method Summary
 INodeLocator getNodeLocator()
          retrieves a locator for finding and identifying nodes in the model.
 String getNodeName(Object element)
          return the short name of this element. The id for an element is model-specific. For example, it may be the tag name of an element of a model representing a structure that conforms to W3the C DOM specification or the simple class name of the object. returns the qualified class name (i.e. without the package name) of the given element returns the tag name of this element if it is a W3C Dom element
 String[] getPackageNames()
          returns empty array Includes packages: java.lang org.w3c.dom
 boolean isTopDown()
          
 
Methods inherited from class org.eclipse.actf.model.AbstractModel
addModelChangeListener, fireModelChangeEvent, getBaseType, getDefaultAliasPrefix, getName, getNodeId, getOrder, getTreeWalker, removeModelChangeListener, setFilters, setModelType, setNodeID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOM_MODEL

public static final String DOM_MODEL
See Also:
Constant Field Values
Constructor Detail

DomModel

public DomModel()
new DomModel instance; default is org.eclipse.actf.core.config.Configuration.DOM_MODEL


DomModel

public DomModel(String type)
Method Detail

getNodeName

public String getNodeName(Object element)
return the short name of this element. The id for an element is model-specific. For example, it may be the tag name of an element of a model representing a structure that conforms to W3the C DOM specification or the simple class name of the object. returns the qualified class name (i.e. without the package name) of the given element returns the tag name of this element if it is a W3C Dom element

Specified by:
getNodeName in interface IModel
Overrides:
getNodeName in class AbstractModel
Parameters:
element - - element for which name is desired
Returns:
name of element or null if not available

getPackageNames

public String[] getPackageNames()
returns empty array

Includes packages:

Specified by:
getPackageNames in interface IModel
Overrides:
getPackageNames in class AbstractModel
Returns:
init packages
See Also:
org.eclipse.actf.core.processor.CodeProcessor

isTopDown

public boolean isTopDown()


getNodeLocator

public INodeLocator getNodeLocator()
Description copied from class: AbstractModel
retrieves a locator for finding and identifying nodes in the model. The locator can provide an XPath expression that describes a node in the model or, given a valid XPath expression, find an object in the model.

Specified by:
getNodeLocator in interface IModel
Overrides:
getNodeLocator in class AbstractModel
Returns:
node locator