ice.pilots.html4
Class DOM

java.lang.Object
  extended byice.storm.DynamicObject
      extended byice.pilots.html4.DOM
All Implemented Interfaces:
Cloneable, DOMImplementation

public class DOM
extends DynamicObject
implements DOMImplementation, Cloneable

ICEsoft's DOM implementation. If you want to have ICE Browser use your own DOM - this is the place to start. You should override createDDocument() and createDStyleSheet() methods. And then call DOM.setInstance(new MyDOM()).


Field Summary
 
Fields inherited from class ice.storm.DynamicObject
NOT_FOUND, SETD_IGNORE, SETD_NOT_FOUND, SETD_OK
 
Constructor Summary
protected DOM()
           
 
Method Summary
protected  void afterClone()
           
 CSSStyleSheet createCSSStyleSheet(String title, String media)
           
 DDocument createDDocument(ThePilot pilot, boolean isHtml)
          This method is used by HTML rendering engine to create a Document.
 Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype)
          Creates an XML Document object of the specified type with its document element.
 DocumentType createDocumentType(String qualifiedName, String publicId, String systemId)
          Creates an empty DocumentType node.
 DocumentType createDocumentType(String qualifiedName, String publicId, String systemId, String internalSubset)
           
 DStyleDeclaration createDStyleDeclaration(DCSSRule parentRule, DElement e)
           
 DStyleSheet createDStyleSheet(int defaultNamespace, DNode ownerNode, DStyleSheet parentStyleSheet, DCSSRule ownerRule)
          This method is used by HTML rendering engine to create a StyleSheet.
 HTMLDocument createHTMLDocument(String documentTitle)
           
 Object execDynamicMethod(String name, Object[] args, DynEnv env)
          Perform function-like actions for `name' with the given args.
 Object getDynamicValue(String name, DynEnv env)
          Returns the `key' field or Defs.NOT_FOUND if `name' does not exist.
static DOM getInstance()
          Deprecated. Use getInstance(StormBase) instead.
static DOM getInstance(StormBase storm)
          Get dom implementation instance associated with the given StormBase.
protected  DDocument getMasterDocument()
           
static TransformerFactory getTransformerFactory()
          Deprecated. Use getTransformFactory(StormBase) instead.
static TransformerFactory getTransformFactory(StormBase storm)
           
 boolean hasFeature(String feature, String version)
          Test if the DOM implementation implements a specific feature.
protected  DOM makeClone()
           
 DDocument parseEmbeddedDocumentFromReader(Reader reader)
           
 DDocument parseEmbeddedDocumentFromString(String str)
           
 int setDynamicValue(String name, Object value, DynEnv env)
          Set field `name' to `value'.
static void setInstance(DOM d)
          Deprecated. Use setInstance(StormBase, DOM) instead.
static void setInstance(StormBase storm, DOM dom)
          Set the instance of default DOMImplementation for the given StormBase instance.
static void setTransformerFactory(TransformerFactory tr)
          Deprecated. Use setTransformFactory(StormBase, TransformerFactory) instead.
static void setTransformFactory(StormBase storm, TransformerFactory tr)
          Set the default transformer factory to be used.
 
Methods inherited from class ice.storm.DynamicObject
deleteSlot, deleteSlot, getDynamicScopeParent, getEnumeratableIds, getMethodPropertySource, getScriptDataLock, getScriptWrapper, getSlot, getSlot, hasSlot, hasSlot, javaReflectionTarget, readOnlySlots, script_toSource, script_toString, setScriptWrapperIfAbsent, setSlot, setSlot, unlinkAllSlots
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOM

protected DOM()
Method Detail

setInstance

public static void setInstance(StormBase storm,
                               DOM dom)
Set the instance of default DOMImplementation for the given StormBase instance. This can be done once per StormBase.


getInstance

public static DOM getInstance(StormBase storm)
Get dom implementation instance associated with the given StormBase.


setInstance

public static void setInstance(DOM d)
Deprecated. Use setInstance(StormBase, DOM) instead.


getInstance

public static DOM getInstance()
Deprecated. Use getInstance(StormBase) instead.


getTransformFactory

public static TransformerFactory getTransformFactory(StormBase storm)

setTransformFactory

public static void setTransformFactory(StormBase storm,
                                       TransformerFactory tr)
Set the default transformer factory to be used. This can be done only once. TransformerFactory is an interface, and must be implemented by an actual transformer/transformerfactory This can be done once per StormBase.


getTransformerFactory

public static TransformerFactory getTransformerFactory()
Deprecated. Use getTransformFactory(StormBase) instead.


setTransformerFactory

public static void setTransformerFactory(TransformerFactory tr)
Deprecated. Use setTransformFactory(StormBase, TransformerFactory) instead.


makeClone

protected final DOM makeClone()

afterClone

protected void afterClone()

getMasterDocument

protected DDocument getMasterDocument()

parseEmbeddedDocumentFromString

public DDocument parseEmbeddedDocumentFromString(String str)

parseEmbeddedDocumentFromReader

public DDocument parseEmbeddedDocumentFromReader(Reader reader)
                                          throws IOException
Throws:
IOException

hasFeature

public boolean hasFeature(String feature,
                          String version)
Description copied from interface: DOMImplementation
Test if the DOM implementation implements a specific feature.

Specified by:
hasFeature in interface DOMImplementation
Returns:
true if the feature is implemented in the specified version, false otherwise.

createDocumentType

public DocumentType createDocumentType(String qualifiedName,
                                       String publicId,
                                       String systemId,
                                       String internalSubset)

createDocument

public Document createDocument(String namespaceURI,
                               String qualifiedName,
                               DocumentType doctype)
Description copied from interface: DOMImplementation
Creates an XML Document object of the specified type with its document element. HTML-only DOM implementations do not need to implement this method.

Specified by:
createDocument in interface DOMImplementation
Returns:
A new Document object.

createHTMLDocument

public HTMLDocument createHTMLDocument(String documentTitle)

createCSSStyleSheet

public CSSStyleSheet createCSSStyleSheet(String title,
                                         String media)

createDStyleSheet

public DStyleSheet createDStyleSheet(int defaultNamespace,
                                     DNode ownerNode,
                                     DStyleSheet parentStyleSheet,
                                     DCSSRule ownerRule)
This method is used by HTML rendering engine to create a StyleSheet. It is not part of the official DOM specs. If you are extending this DOM implementation, it is sufficient to override this method to make the browser use your own StyleSheet implementation. Your new StyleSheet MUST extend DStyleSheet.


createDDocument

public DDocument createDDocument(ThePilot pilot,
                                 boolean isHtml)
This method is used by HTML rendering engine to create a Document. It is not part of the official DOM specs. If you are extending this DOM implementation, it is sufficient to override this method to make the browser use your own Document implementation. Your new Document MUST extend DDocument.


createDStyleDeclaration

public DStyleDeclaration createDStyleDeclaration(DCSSRule parentRule,
                                                 DElement e)

createDocumentType

public DocumentType createDocumentType(String qualifiedName,
                                       String publicId,
                                       String systemId)
Description copied from interface: DOMImplementation
Creates an empty DocumentType node. Entity declarations and notations are not made available. Entity reference expansions and default attribute additions do not occur. It is expected that a future version of the DOM will provide a way for populating a DocumentType.
HTML-only DOM implementations do not need to implement this method.

Specified by:
createDocumentType in interface DOMImplementation
Returns:
A new DocumentType node with Node.ownerDocument set to null.

getDynamicValue

public Object getDynamicValue(String name,
                              DynEnv env)
Description copied from class: DynamicObject
Returns the `key' field or Defs.NOT_FOUND if `name' does not exist. Returns `FUNCTION_MARK' if `name' represent a function that can be invoke via execDynamicMethod. Note that returned `null' indicates that value is present but set to null.

Overrides:
getDynamicValue in class DynamicObject

setDynamicValue

public int setDynamicValue(String name,
                           Object value,
                           DynEnv env)
Description copied from class: DynamicObject
Set field `name' to `value'. Use `env' to unwrap `value' to a particular type or store it as is

Overrides:
setDynamicValue in class DynamicObject
Returns:
SETD_NOT_FOUND if fied `name' is absent, SETD_IGNORE if field exist but set is ignored SETD_OK if set opeartion was ok

execDynamicMethod

public Object execDynamicMethod(String name,
                                Object[] args,
                                DynEnv env)
Description copied from class: DynamicObject
Perform function-like actions for `name' with the given args. Returns the result or Defs.NOT_FOUND if name is not associated with function action. Should return result of env.wrapVoid() to indicate method without return value. Use `env' to unwrap `args' elements to a particular type.

Overrides:
execDynamicMethod in class DynamicObject
See Also:
DynEnv