|
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.lang.AbstractScene
Abstract implementation of the BasicScene interface.
| Field Summary | |
protected HashSet |
allNodes
All nodes currently held by this class |
protected java.lang.String |
loadedURI
The URI that created this scene |
protected int |
majorVersion
Major version number of this scene |
protected SceneMetaData |
metaData
The meta data for the scene |
protected int |
minorVersion
Minor version number of this scene |
protected VRMLNodeFactory |
nodeFactory
The node factory for this scene |
protected VRMLNode |
rootNode
The root node of the scene |
protected java.util.ArrayList |
routeList
List of all the routes stored |
protected java.util.ArrayList |
templateList
List of all protos/externprotos held by this class |
protected java.util.HashMap |
templateMap
The list of template declarations stored here by name (key) |
protected java.lang.String |
worldURL
The root URL for the world location |
| Constructor Summary | |
protected |
AbstractScene(int major,
int minor)
Construct a new instance of the abstract scene. |
| Method Summary | |
void |
addDEFNode(java.lang.String name,
VRMLNode node)
Add a new def name to the map. |
void |
addImportedNode(java.lang.String as,
java.lang.String def,
java.lang.String exported)
Add a new import name to the map. |
void |
addNode(VRMLNode node)
Add a node to this scene. |
void |
addTemplate(VRMLNodeTemplate template)
Add a new template to this scene. |
java.util.ArrayList |
getByPrimaryType(int type)
Get the list of nodes of the given primary type declared in this scene. |
java.util.ArrayList |
getBySecondaryType(int type)
Get the list of nodes of the given secondary type declared in this scene. |
java.util.Map |
getDEFNodes()
Get a list of the nodes that have been named with DEF in this scene. |
java.util.Map |
getImports()
Get the IMPORT declaration information from this scene. |
java.lang.String |
getLoadedURI()
Get the URI of the world that this scene represents. |
SceneMetaData |
getMetaData()
Get the meta data associated with this scene. |
VRMLNodeFactory |
getNodeFactory()
Get the node factory that represents the setup of this scene. |
VRMLNodeTemplate |
getNodeTemplate(java.lang.String name)
Get the proto defined by the name. |
java.util.ArrayList |
getNodeTemplates()
Get the list of top-level node templates declared in this scene. |
VRMLNode |
getRootNode()
Get the node that forms the root of this scene. |
java.util.ArrayList |
getRoutes()
Get the list of ROUTEs declared in this scene. |
int |
getSpecificationMajorVersion()
Get the specification major version that this scene belongs to. |
int |
getSpecificationMinorVersion()
Get the specification minor version that this scene belongs to. |
java.lang.String |
getWorldRootURL()
Get the Root URL of the world that this scene represents. |
void |
removeDEFNode(java.lang.String name)
Remove a def name from the map. |
void |
removeImportedNode(java.lang.String name)
Remove a import name from the map. |
void |
removeNode(VRMLNode node)
Add a node to this scene. |
void |
removeTemplate(VRMLNodeTemplate template)
Remove a template from this scene. |
void |
setLoadedURI(java.lang.String uri)
Set the URI of the world that this scenegraph represents |
void |
setNodeFactory(VRMLNodeFactory fac)
Set the node factory instance to be used with this scene. |
void |
setRootNode(VRMLNode node)
Set the root node of the scene. |
void |
setWorldRootURL(java.lang.String url)
Set the root URL of the world that this scenegraph represents |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected SceneMetaData metaData
protected VRMLNode rootNode
protected java.util.ArrayList routeList
protected HashSet allNodes
protected java.util.ArrayList templateList
protected java.util.HashMap templateMap
protected int majorVersion
protected int minorVersion
protected VRMLNodeFactory nodeFactory
protected java.lang.String worldURL
protected java.lang.String loadedURI
| Constructor Detail |
protected AbstractScene(int major,
int minor)
major - The major version number of this sceneminor - The minor version number of this scene| Method Detail |
public void setWorldRootURL(java.lang.String url)
url - The full URL of the world's locationpublic void setLoadedURI(java.lang.String uri)
uri - The full URI of the world's locationpublic java.lang.String getWorldRootURL()
getWorldRootURL in interface BasicScenepublic java.lang.String getLoadedURI()
getLoadedURI in interface BasicScenepublic void setRootNode(VRMLNode node)
node - The root node of the scene to usepublic VRMLNode getRootNode()
getRootNode in interface BasicScenepublic SceneMetaData getMetaData()
getMetaData in interface BasicScenepublic int getSpecificationMajorVersion()
getSpecificationMajorVersion in interface BasicScenepublic int getSpecificationMinorVersion()
getSpecificationMinorVersion in interface BasicScenepublic VRMLNodeFactory getNodeFactory()
getNodeFactory in interface BasicScene
public void setNodeFactory(VRMLNodeFactory fac)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException
setNodeFactory in interface BasicScenefac - The factory instance to use
java.lang.IllegalArgumentException - The factory instance provided was null
java.lang.IllegalStateException - A factory has already been setpublic void addNode(VRMLNode node)
addNode in interface BasicScenenode - The node to addpublic void removeNode(VRMLNode node)
removeNode in interface BasicScenenode - The node to addpublic void addTemplate(VRMLNodeTemplate template)
addTemplate in interface BasicScenetemplate - The new template instance to usepublic void removeTemplate(VRMLNodeTemplate template)
removeTemplate in interface BasicScenetemplate - The template instance to removepublic java.util.ArrayList getRoutes()
getRoutes in interface BasicScenepublic java.util.ArrayList getNodeTemplates()
getNodeTemplates in interface BasicScenepublic java.util.ArrayList getByPrimaryType(int type)
getByPrimaryType in interface BasicScenepublic java.util.ArrayList getBySecondaryType(int type)
getBySecondaryType in interface BasicScenepublic VRMLNodeTemplate getNodeTemplate(java.lang.String name)
getNodeTemplate in interface BasicScenename - The name of the proto to fetch.
public void addDEFNode(java.lang.String name,
VRMLNode node)
name - The name of the node to be replacednode - The new node instance to be registered for the nodepublic void removeDEFNode(java.lang.String name)
name - The name of the node to be removedpublic java.util.Map getDEFNodes()
VRMLNode instances. If there are no nodes marked with
DEF then the map will be empty.
getDEFNodes in interface BasicScene
public void addImportedNode(java.lang.String as,
java.lang.String def,
java.lang.String exported)
as - The name of the node in the local file (AS value)def - The DEF name of the local inline nodeexported - The exported namepublic void removeImportedNode(java.lang.String name)
name - The name of the node to be removedpublic java.util.Map getImports()
getImports in interface BasicScene
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||