VRML97 logo

Annex D
(normative)

Access to services via DOM

 

--- VRML separator bar ---

B.1 Table of contents and introduction

B.1.1 Introduction

This annex provides a detailed description of the manner of accessing the services defined in this standard via the Document Object Model (DOM). Note that support for the Java platform is not required by this standard but any access of the Java platform as an external application to a VRML browser  shall conform with the requirements specified in this annex.

B.1.2 Table of contents

See Table B.1 for the contents of this annex.
 
 
Table B.1 --Table of contents
B.1 Table of contents and introduction 
 B.1.1 Table of contents 
 B.1.2 Introduction 
 B.1.3 Conventions 

B.2 Concepts 
 B.2.1 The browser script interface 
 B.2.2 Relationship to ISO/IEC 14772-1, Annex B Java scripting interface 
 B.2.3 Scope of specification 
 B.2.4 Conformance 
 B.2.5 Types of Java browsers 
 B.2.6 Implementation dependencies 
 B.2.7 Backwards Compatibility 

B.3 Data type implementation 
 B.3.1 Data type Definitions 
  B.3.1.1 SAIAction 
  B.3.1.2 SAIBrowserApp 
  B.3.1.3 SAIBrowserName 
  B.3.1.4 SAIBrowserRef  
  B.3.1.5 SAIBrowserVersion 
  B.3.1.6 SAIFieldAccess  
  B.3.1.7 SAIFieldID  
  B.3.1.8 SAIFieldName  
  B.3.1.9 SAIFieldType  
  B.3.1.10 SAIFieldValue  
  B.3.1.11 SAIFrameRate 
  B.3.1.12 SAINavSpeed 
  B.3.1.13 SAINodeID  
  B.3.1.14 SAINodeType  
  B.3.1.15 SAIParameterList 
  B.3.1.16 SAIPropertyList 
  B.3.1.17 SAIRequestorID 
  B.3.1.18 SAIURL 
  B.3.1.19 SAIString 
 B.3.2 Error data types 
  B.3.2.1 SAIError 
  B.3.2.2 SAI_BROWSER_UNAVAILABLE 
  B.3.2.3 SAI_CONNECTION_ERROR 
  B.3.2.4 SAI_DISPOSED 
  B.3.2.5 SAI_INVALID_ACCESS_TYPE 
  B.3.2.6 SAI_INVALID_BROWSER 
  B.3.2.7 SAI_INVALID_NAME 
  B.3.2.8 SAI_INVALID_NODE 
  B.3.2.9 SAI_INVALID_FIELD 
  B.3.2.10 SAI_INVALID_URL 
  B.3.2.11 SAI_INVALID_VRML 
  B.3.2.12 SAI_URL_UNAVAILABLE 
 B.3.3 Event Types 
  B.3.3.1 Concepts 
  B.3.3.2 SAIBrowserEvent 
  B.3.3.3 SAI_B_Initialized 
  B.3.3.4 SAI_B_Shutdown 
  B.3.3.5 SAI_B_ConnectionError 
  B.3.3.6 SAI_B_URLError 
  B.3.3.7 SAIFieldEvent 

B.4 Language specific concepts 
 B.4.1 Class implementation 
  B.4.1.1 Introduction 
  B.4.1.2 Provision of classes 
  B.4.1.3 Required Java version 
  B.4.1.4 Package Structure 
 B.4.2 Sessions 
  B.4.2.1 Introduction 
  B.4.2.2 Component 
  B.4.2.3 Web browser plugin 
 B.4.3 Identifiers 
  B.4.3.1 Identifier equivalence 
  B.4.3.2 Data storage 
 B.4.4 Serialisation 
 B.4.5 Relative URLs 
  B.4.5.1 Introduction 
  B.4.5.2 Java applications 
  B.4.5.3 Applets 
  B.4.5.4 Remote applications 
 B.4.6 Field access 
  B.4.6.1 NULL nodes 
  B.4.6.2 Setting MFNode fields 
  B.4.6.3 Array representations 
  B.4.6.4 set1Value 
 B.4.7 Disposing of resources

B.5 Services Binding 
 B.5.1 Establishing browser connections 
  B.5.1.1 BrowserFactory 
  B.5.1.2 getBrowser 
   B.5.1.2.1 Web browser plugin  
    B.5.1.2.2 Remote browser 
  B.5.1.3 createBrowser 
   B.5.1.3.1 AWT Component browser 
 B.5.2 Browser services 
  B.5.2.1 getName 
  B.5.2.2 getVersion 
  B.5.2.3 getCurrentSpeed 
  B.5.2.4 getCurrentFrameRate 
  B.5.2.5 getWorldURL 
  B.5.2.6 replaceWorld 
  B.5.2.7 loadURL 
  B.5.2.8 setDescription 
  B.5.2.9 createVrmlFromString 
  B.5.2.10 createVrmlFromURL 
  B.5.2.11 Dynamic Route Handling 
  B.5.2.12 Update Control 
  B.5.2.13 Register Browser Interest 
  B.5.2.14 getNode 
  B.5.2.15 Dispose 
 B.5.3 Node services 
  B.5.3.1 Node Representation 
  B.5.3.2 getName/getType 
  B.5.3.3 getField 
  B.5.3.4 Dispose 
 B.5.4 Field services 
  B.5.4.1 Field Representation 
  B.5.4.2 getAccessType 
  B.5.4.3 getType 
  B.5.4.4 getName 
  B.5.4.5 getValue 
  B.5.4.6 setValue 
  B.5.4.7 Register Field Interest 

B.6 Java Class Heirarchy 
 B.6.1 Establishing browser connections 
 B.6.2 Browser services 
 B.6.3 Node services 
 B.6.4 Field services 
 B.6.5 Class hierarchy/package arrangements 

B.7 Package, Class and Method definitions 
 

B.1.3 Conventions

--- VRML separator bar ---

B.2 Concepts

B.2.1 The Browser script interface

The SAI allows access to the full functionality of the described in this part of ISO/IEC 14772. Browser state can be queried, routes can be added and deleted, and new nodes can be created. This annex describes how these services may be accessed using the Document Object Model (DOM).

B.2.3 Scope of specification

The DOM platform provides an implementation of the SAI specification. It provides a complete binding to the specification within the restrictions and implementation specific capabilities as defined in this standard. The specification provides a browser implementation independent way of accessing the browser capabilities through the DOM facilities.

B.2.4 Conformance

DOM support is not required for a conforming implementation of the SAI. If a browser supports a DOM interface from an external environment, it shall conform with all of the requirements specified in this annex.

An implementation shall not modify the classes defined in this specification with their own specific methods or additional methods.

B.2.6 Implementation dependencies

B.2.7 Backwards compatibility

--- VRML separator bar ---

B.3 Data Type Implementation

B.3.1 Data type Definitions

B.3.1.1 SAIAction

The action type is dependent on the method used. Table B.2 defines the mapping between each service, the valid action types for that service and the java implementation of that action. Actions are mapped as method names describing the action rather than strict primitive types.
 
Table B.2 SAIAction to DOM access mapping
Service Action Type DOM Implementation
Dynamic Route Handling Add Route Browser.addRoute()
Delete Route Browser.deleteRoute()
Update Control Begin Update Browser.beginUpdate()
End Update Browser.endUpdate()
Register Browser Interest Add Browser.addBrowserListener()
Remove Browser.removeBrowserListener()
Register Event Interest Add EventOut.addVrmlEventListener()
Remove EventOut.removeVrmlEventListener()

B.3.1.2 SAIBrowserApp

 

B.3.1.3 SAIBrowserName

 

B.3.1.4 SAIBrowserRef

 

B.3.1.5 SAIBrowserVersion

 

B.3.1.6 SAIFieldAccess

B.3.1.7 SAIFieldID

B.3.1.8 SAIFieldName

 

B.3.1.9 SAIFieldType

 

B.3.1.10 SAIFieldValue

 

B.3.1.11 SAIFrameRate

 

B.3.1.12 SAINavSpeed

 

B.3.1.13 SAINodeID

 

B.3.1.14 SAINodeType

 

B.3.1.15 SAIParameterList

 

B.3.1.16 SAIPropertyList

 

B.3.1.17 SAIRequesterID

 

B.3.1.18 SAIURL

 

B.3.1.19 SAIString

 

B.3.2 Error data types

B.3.2.1 SAIError

 

B.3.2.2 SAI_BROWSER_UNAVAILABLE

 

B.3.2.3 SAI_CONNECTION_ERROR

 

B.3.2.4 SAI_DISPOSED

 

B.3.2.5 SAI_INVALID_ACCESS_TYPE

 

B.3.2.6 SAI_INVALID_BROWSER

 

B.3.2.7 SAI_INVALID_NAME

 

B.3.2.8 SAI_INVALID_NODE

 

B.3.2.9 SAI_INVALID_FIELD

 

B.3.2.10 SAI_INVALID_URL

 

B.3.2.11 SAI_INVALID_VRML

 

B.3.2.12 SAI_URL_UNAVAILABLE

 

B.3.3 Event Types

B.3.3.1 Concepts

 

B.3.3.2 SAIBrowserEvent

 

B.3.3.3 SAI_B_Initialized

 

B.3.3.4 SAI_B_Shutdown

 

B.3.3.5 SAI_B_ConnectionError

 

B.3.3.6 SAI_B_URLError

 

B.3.3.7 SAIFieldEvent

 

--- VRML separator bar ---

B.4 Language specific concepts

B.4.1 Class implementation

B.4.1.1 Introduction

 

B.4.1.2 Provision of Classes

 

B.4.1.3 Required Java version

 

B.4.1.4 Package Structure

 

B.4.2 Sessions

B.4.2.1 Introduction

 

B.4.2.2 Component

 

B.4.2.3 Web Browser Plugin

 

B.4.3 Identifiers

B.4.3.1 Identifier equivalence

 

B.4.3.2 Data Storage

 

B.4.4 Serialization

 

B.4.5 Relative URLs

B.4.5.1 Introduction

 

B.4.5.3 Applets

 

B.4.5.4 Remote applications

 

B.4.6 Field access

B.4.6.1 NULL nodes

 

B.4.6.2 Setting MFNode fields

 

B.4.6.3 Array representations

 

B.4.6.4 set1Value

 

B.4.7 Disposing of Resources

 

--- VRML separator bar ---

B.5 Services Binding

B.5.1 Establishing browser connections

B.5.1.1 BrowserFactory

 

B.5.1.2 getBrowser

B.5.1.2.1 Web Plugin browser

 

B.5.1.2.2 Remote browser

 

B.5.1.3 createBrowser

B.5.1.3.1 AWT Component browser

 

B.5.2 Browser services

B.5.2.1 getName

 

B.5.2.2 getVersion

 

B.5.2.3 getCurrentSpeed

 

B.5.2.4 getCurrentFrameRate

 

B.5.2.5 getWorldURL

 

B.5.2.6 replaceWorld

 

B.5.2.7 loadURL

 

B.5.2.8 setDescription

 

B.5.2.9 createVrmlFromString

 

B.5.2.10 createVrmlFromURL

 

B.5.2.11 Dynamic Route Handling

 

B.5.2.12 Update Control

 

B.5.2.13 Register Browser Interest

 

B.5.2.14 getNode

 

B.5.2.15 Dispose

 

B.5.3 Node services

B.5.3.1 Node Representation

 

B.5.3.2 getName/getType

 

B.5.3.3 getField

 

B.5.3.4 Dispose

 

B.5.4 Field services

B.5.4.1 Field Representation

 

B.5.4.2 getAccessType

 

B.5.4.3 getType

 

B.5.4.4 getName

 

B.5.4.5 getValue

 

B.5.4.6 setValue

 

B.5.4.7 Register Field Interest

 

--- VRML separator bar ---

B.6 DOM Heirarchy

B.6.1 Establishing Browser Connections

Classes/Interfaces
 
Exceptions
 

B.6.2 Browser Services

Classes/Interfaces
 
Exceptions
 

B.6.3 Node Services

Classes/Interfaces
 
Exceptions
 

B.6.4 Field Services

Classes/Interfaces
 
Exceptions
 

B.6.5 Class Heirarchy/Package Arrangements

 
--- VRML separator bar ---

B.7 Package, Class and Method Definitions

 
--- VRML separator bar ---