|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.web3d.vrml.scripting.sai.BaseExecutionContext
X3DExecutionContext implementation that is used for Protos and the base of a X3DScene.
| Field Summary | |
protected ComponentInfo[] |
components
The list of components in use |
protected int |
encoding
The encoding type constant |
protected ErrorReporter |
errorReporter
Class that represents the external reporter |
protected VRMLExecutionSpace |
executionSpace
The execution space that this context works in |
protected X3DExternProtoDeclaration[] |
externprotos
The list of extern protos declared |
protected java.util.ArrayList |
nodeWrapperList
Listing of all the valid X3DNode wrappers. |
protected java.util.HashMap |
nodeWrapperMap
Mapping of the VRMLNodeType to its X3DNode wrapper |
protected ProfileInfo |
profile
The list of profiles in use |
protected X3DProtoDeclaration[] |
protos
The array of protos declared |
protected org.web3d.vrml.scripting.sai.BaseNode[] |
rootNodes
Listing of root nodes |
protected RouteManager |
routeManager
Route manager for handling user added/removed routes |
protected X3DRoute[] |
routes
The list of routes in use |
protected java.util.HashMap |
routeWrapperMap
Mapping of the ROUTE to its X3DRoute wrapper |
protected BasicScene |
scene
The basic scene type |
protected java.lang.String |
specVersion
The version of the specification represented |
protected FrameStateManager |
stateManager
FrameState manager for creating nodes |
protected java.lang.String |
url
The world URL |
| Fields inherited from interface org.web3d.x3d.sai.X3DExecutionContext |
ASCII_ENCODING, BIFS_ENCODING, BINARY_ENCODING, LAST_STD_ENCODING, NO_SCENE, SCRIPTED_ENCODING, VRML_ENCODING, XML_ENCODING |
| Constructor Summary | |
BaseExecutionContext(VRMLExecutionSpace space,
RouteManager rm,
FrameStateManager fsm,
ProfileInfo profile,
ComponentInfo[] components,
java.lang.ref.ReferenceQueue refQueue,
FieldFactory fac,
org.web3d.vrml.scripting.sai.FieldAccessListener fal)
Construct an execution context descriptor for the given information. |
|
BaseExecutionContext(VRMLExecutionSpace space,
RouteManager rm,
FrameStateManager fsm,
ProfileInfo profile,
java.lang.ref.ReferenceQueue refQueue,
FieldFactory fac,
org.web3d.vrml.scripting.sai.FieldAccessListener fal)
Construct an execution context descriptor for the given information. |
|
| Method Summary | |
X3DRoute |
addRoute(X3DNode fromX3DNode,
java.lang.String readableField,
X3DNode toX3DNode,
java.lang.String writableField)
Add a route in this scene. |
X3DNode |
createNode(java.lang.String name)
Create a new node in this scene. |
X3DProtoInstance |
createProto(java.lang.String name)
Create a new proto instance in this scene. |
ComponentInfo[] |
getComponents()
Get the list of all the components declared in the scene. |
int |
getEncoding()
Get the encoding of the original file type. |
X3DExternProtoDeclaration |
getExternProtoDeclaration(java.lang.String name)
Get the EXTERNPROTO declaration representing the given name. |
java.lang.String[] |
getExternProtoNames()
Get the list of EXTERNPROTOs declared in this scene. |
X3DNode |
getImportedNode(java.lang.String name)
Get the imported node instance represented by a given name. |
X3DNode |
getNamedNode(java.lang.String name)
Get the node instance represented by the given name. |
java.lang.String[] |
getNamedNodes()
Get a list of the nodes that have been named with DEF or keyword in this scene. |
ProfileInfo |
getProfile()
Get the name of the profile used by this scene. |
X3DProtoDeclaration |
getProtoDeclaration(java.lang.String name)
Get the PROTO declaration representing the given name. |
java.lang.String[] |
getProtosNames()
Get the list of ordinary PROTO's declared in this scene. |
X3DNode[] |
getRootNodes()
Get the list of current root nodes in the scene. |
X3DRoute[] |
getRoutes()
Get the list of ROUTEs in this scene. |
java.lang.String |
getSpecificationVersion()
Get the specification version name that was used to describe this scene. |
java.lang.String |
getWorldURL()
Get the fully qualified URL of this scene. |
void |
removeExternProtoDeclaration(java.lang.String name)
Remove the externproto declaration registered under the given name. |
void |
removeImportedNode(java.lang.String importName)
Remove the IMPORT statement associated with a given local import name. |
void |
removeNamedNode(java.lang.String name)
Calling this method removes any existing mapping between a given literal name and any X3D nodes. |
void |
removeProtoDeclaration(java.lang.String name)
Remove the proto declaration registered under the given name. |
void |
removeRoute(X3DRoute route)
Delete the route from this scene. |
void |
setErrorReporter(ErrorReporter reporter)
Register an error reporter with the engine so that any errors generated by the script code can be reported in a nice, pretty fashion. |
void |
updateExternProtoDeclaration(java.lang.String name,
X3DExternProtoDeclaration externproto)
Add the EXTERNPROTO declaration representing the given name. |
void |
updateImportedNode(java.lang.String exportedName,
java.lang.String importedName,
X3DNode inline)
Create or modify an IMPORT from the specified inline node to a given import name. |
void |
updateNamedNode(java.lang.String nodeName,
X3DNode node)
Calling this method creates an association between a literal name and a node. |
void |
updateProtoDeclaration(java.lang.String name,
X3DProtoDeclaration proto)
Add the PROTO declaration representing the given name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final java.lang.String specVersion
protected final int encoding
protected final ProfileInfo profile
protected ComponentInfo[] components
protected ErrorReporter errorReporter
protected final java.lang.String url
protected org.web3d.vrml.scripting.sai.BaseNode[] rootNodes
protected X3DProtoDeclaration[] protos
protected X3DExternProtoDeclaration[] externprotos
protected X3DRoute[] routes
protected VRMLExecutionSpace executionSpace
protected BasicScene scene
protected RouteManager routeManager
protected FrameStateManager stateManager
protected java.util.ArrayList nodeWrapperList
protected java.util.HashMap nodeWrapperMap
protected java.util.HashMap routeWrapperMap
| Constructor Detail |
public BaseExecutionContext(VRMLExecutionSpace space,
RouteManager rm,
FrameStateManager fsm,
ProfileInfo profile,
ComponentInfo[] components,
java.lang.ref.ReferenceQueue refQueue,
FieldFactory fac,
org.web3d.vrml.scripting.sai.FieldAccessListener fal)
space - The space to source information for this scenerm - A route manager for users creating/removing routesfsm - state manager for dealing with dynamic scene graph changesprofile - Instance of the ProfileInfo that describes this scenecomponents - The component definitions for this scenerefQueue - The queue used for dealing with field referencesfac - Factory used to create field wrappersfal - The access listener for propogating s2 requests
public BaseExecutionContext(VRMLExecutionSpace space,
RouteManager rm,
FrameStateManager fsm,
ProfileInfo profile,
java.lang.ref.ReferenceQueue refQueue,
FieldFactory fac,
org.web3d.vrml.scripting.sai.FieldAccessListener fal)
space - The space to source information for this scenerm - A route manager for users creating/removing routesprofile - Instance of the ProfileInfo that describes this scenerefQueue - The queue used for dealing with field referencesfac - Factory used to create field wrappersfal - The access listener for propogating s2 requests| Method Detail |
public java.lang.String getSpecificationVersion()
getSpecificationVersion in interface X3DExecutionContextpublic int getEncoding()
getEncoding in interface X3DExecutionContextpublic ProfileInfo getProfile()
getProfile in interface X3DExecutionContextpublic ComponentInfo[] getComponents()
getComponents in interface X3DExecutionContext
public java.lang.String getWorldURL()
throws InvalidBrowserException
getWorldURL in interface X3DExecutionContextInvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.public X3DRoute[] getRoutes()
getRoutes in interface X3DExecutionContext
public X3DRoute addRoute(X3DNode fromX3DNode,
java.lang.String readableField,
X3DNode toX3DNode,
java.lang.String writableField)
throws InvalidBrowserException,
InvalidReadableFieldException,
InvalidWritableFieldException,
InvalidNodeException
addRoute in interface X3DExecutionContextfromX3DNode - The source node for the routereadableField - The readable field source of the routetoX3DNode - The destination node of the routewritableField - The writable field destination of the route
InvalidReadableFieldException - if the named readable field does not exist
InvalidWritableFieldException - if the named writable field does not exist.
InvalidNodeException - The nominated destination or source node
has been disposed of
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
public void removeRoute(X3DRoute route)
throws InvalidBrowserException
removeRoute in interface X3DExecutionContextroute - The route reference to delete
InvalidBrowserException - The dispose method has been called on
this browser reference.public java.lang.String[] getProtosNames()
getProtosNames in interface X3DExecutionContextpublic X3DProtoDeclaration getProtoDeclaration(java.lang.String name)
getProtoDeclaration in interface X3DExecutionContextname - The name of the proto to fetch
public void updateProtoDeclaration(java.lang.String name,
X3DProtoDeclaration proto)
updateProtoDeclaration in interface X3DExecutionContextname - The name of the proto to fetchproto - The declaration for the namepublic void removeProtoDeclaration(java.lang.String name)
removeProtoDeclaration in interface X3DExecutionContextname - The name of the proto to fetchpublic java.lang.String[] getExternProtoNames()
getExternProtoNames in interface X3DExecutionContextpublic X3DExternProtoDeclaration getExternProtoDeclaration(java.lang.String name)
getExternProtoDeclaration in interface X3DExecutionContextname - The name of the externproto to fetch
public void updateExternProtoDeclaration(java.lang.String name,
X3DExternProtoDeclaration externproto)
updateExternProtoDeclaration in interface X3DExecutionContextname - The name of the externproto to fetchexternproto - The declaration for the namepublic void removeExternProtoDeclaration(java.lang.String name)
removeExternProtoDeclaration in interface X3DExecutionContextname - The name of the externproto to fetchpublic java.lang.String[] getNamedNodes()
X3DNode instances. If there are no nodes marked with DEF then
the map will be empty.
getNamedNodes in interface X3DExecutionContextpublic X3DNode getNamedNode(java.lang.String name)
getNamedNode in interface X3DExecutionContextname - The name of the node to fetch the definition for
public void removeNamedNode(java.lang.String name)
removeNamedNode in interface X3DExecutionContextname - The literal name of the mapping to remove.
public void updateNamedNode(java.lang.String nodeName,
X3DNode node)
updateNamedNode in interface X3DExecutionContextnodeName - The literal name to change.node - The node to map to.public X3DNode getImportedNode(java.lang.String name)
getImportedNode in interface X3DExecutionContextname - The name of the import to fetch
public void removeImportedNode(java.lang.String importName)
removeImportedNode in interface X3DExecutionContextimportName - The local name used in the IMPORT
public void updateImportedNode(java.lang.String exportedName,
java.lang.String importedName,
X3DNode inline)
updateImportedNode in interface X3DExecutionContextexportedName - The node name as exported from the inlineimportedName - The name to use locally for the imported nodeinline - The "DEF'd Inline" of the IMPORT (ISO 19775:2005).public X3DNode[] getRootNodes()
getRootNodes in interface X3DExecutionContextpublic X3DNode createNode(java.lang.String name)
createNode in interface X3DExecutionContextname - The node's name to create
InvalidNodeException - The name does not represent a node in the
given list of profile and components for this scenepublic X3DProtoInstance createProto(java.lang.String name)
createProto in interface X3DExecutionContextname - The proto's name to create
InvalidNodeException - The name does not represent a known proto
declaration in the available namespacespublic void setErrorReporter(ErrorReporter reporter)
reporter - The instance to use or null
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||