Interface X3DExternProtoDeclaration

All Superinterfaces:
X3DProtoDeclaration
All Known Implementing Classes:
SAIExternProtoDeclaration

public interface X3DExternProtoDeclaration extends X3DProtoDeclaration
The representation of an EXTERNPROTO declaration.

This is the representation of the declaration, not of a runtime node. For this reason you cannot access the internals, nor can you work with the individual field values. You can, however, perform basic introspection tasks such as looking at the available field definitions and seeing the basic node type.

The implementation extends the basic proto declaration class to represent externally represented information. While all the basic method calls are supported, they do need to have their behaivour modified somewhat to deal with the external nature of this structure. The following modifications to the behaviours are made:

createInstance()
getNodeType()
If the instance has not loaded yet or failed to load, this will generate an InvalidNodeException in addition to the normal reasons. A user should check the load state first before trying to create an instance if they wish to avoid this error.

getFieldDeclarations()
When queried, this will return the definitions of the fields as declared in the externproto, not the underlying proto definition.

No access is provided to the underlying proto declaration that fulfills this external representation. If the user wishes to access that, then they may make use of the createVrmlFromURL feature of the browser to load the individual file as needed.

Version:
$Revision: 1.3 $
Author:
Justin Couch