|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.model.AbstractModel
org.eclipse.actf.model.dom.DomModel
public class DomModel
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.
Node
,
Document Object Model
(DOM) Level 2 Core SpecificationField Summary | |
---|---|
static String |
DOM_MODEL
|
Fields inherited from class org.eclipse.actf.model.AbstractModel |
---|
baseType, configuration, locator, nodeToTypeNameMap, 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 an array of the names of packages to be imported by CodeProcessors. Includes packages: java.lang org.w3c.dom |
String |
getTypeName(String nodeName)
returns the type name associated with this nodeName. The nodeName parameter is most frequently formed by calling getNodeName . The name returned identifies
the type that is represented by this node name in the graph.
If the specified nodeName was not obtained from org.w3c.dom.Element |
boolean |
isTopDown()
|
Methods inherited from class org.eclipse.actf.model.AbstractModel |
---|
addModelChangeListener, fireModelChangeEvent, getBaseType, getDefaultAliasPrefix, getName, getNodeId, getNodeWalker, getOrder, removeModelChangeListener, setFilters, setModelType, setNodeID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DOM_MODEL
Constructor Detail |
---|
public DomModel()
org.eclipse.actf.core.config.Configuration.DOM_MODEL
public DomModel(String type)
Method Detail |
---|
public String getNodeName(Object element)
getNodeName
in interface IModel
getNodeName
in class AbstractModel
element
- - element for which name is desired
null
if not availablepublic String getTypeName(String nodeName)
getNodeName
. The name returned identifies
the type that is represented by this node name in the graph.
If the specified nodeName was not obtained from getNodeName
, then
implementers should make a rough guess regarding the underlying type on the basis of the package names
associated with this model via getPackageNames
.
org.w3c.dom.Element
getTypeName
in interface IModel
getTypeName
in class AbstractModel
nodeName
- - as returned by getNodeName
#getNodeName(Object)Object)
,
IModel.getPackageNames()
public String[] getPackageNames()
IModel
will, upon its
instantiation and initialization, import the list of packages and make their traditional short-forms available.
(Of course, short-forms are language-dependent.) Each element of the array is only a name for a
package (e.g. 'my.java.package').
Includes packages:
public boolean isTopDown()
public INodeLocator getNodeLocator()
AbstractModel
getNodeLocator
in interface IModel
getNodeLocator
in class AbstractModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |