Xj3D VRML/X3D Code API

org.web3d.vrml.nodes.loader
Interface WorldLoader


public interface WorldLoader

Independent thread used to load a world from a list of URLs and then place it in the given node.

This implementation is designed to work as both a loadURL() and createVrmlFromUrl() call handler. The difference is defined by what data is supplied to the thread. If the target node is specified, then we assume that the caller wants us to put the results there. If it is null, then assume that we're doing a loadURL call and replace the entire world.

Version:
$Revision: 1.4 $
Author:
Justin Couch

Method Summary
 VRMLScene loadNow(BrowserCore core, InputSource source)
          Request to load the world immediately.
 VRMLScene loadNow(BrowserCore core, InputSource source, boolean ignoreHeader)
          Request to load the world immediately.
 VRMLScene loadNow(BrowserCore core, InputSource source, boolean ignoreHeader, int majorVersion, int minorVersion)
          Request to load the world immediately and constrain that loading to using a specific specification version.
 

Method Detail

loadNow

public VRMLScene loadNow(BrowserCore core,
                         InputSource source)
                  throws java.io.IOException,
                         VRMLParseException
Request to load the world immediately. The method is blocking and will not return until the base file has been loaded. It will not load any chained content such as externprotos, scripts, textures etc.

Parameters:
source - The source to take the content from
core - The browser core needed for obtaining information
Returns:
The completely loaded scene
Throws:
java.io.IOException - There was an I/OError reading the file
VRMLParseException - Some parsing error occurred during this scene processing

loadNow

public VRMLScene loadNow(BrowserCore core,
                         InputSource source,
                         boolean ignoreHeader)
                  throws java.io.IOException,
                         VRMLParseException
Request to load the world immediately. The method is blocking and will not return until the base file has been loaded. It will not load any chained content such as externprotos, scripts, textures etc.

Parameters:
source - The source to take the content from
core - The browser core needed for obtaining information
ignoreHeader - false if it should look for the file header to check version information
Returns:
The completely loaded scene
Throws:
java.io.IOException - There was an I/OError reading the file
VRMLParseException - Some parsing error occurred during this scene processing

loadNow

public VRMLScene loadNow(BrowserCore core,
                         InputSource source,
                         boolean ignoreHeader,
                         int majorVersion,
                         int minorVersion)
                  throws java.io.IOException,
                         VRMLParseException
Request to load the world immediately and constrain that loading to using a specific specification version. The method is blocking and will not return until the base file has been loaded. It will not load any chained content such as externprotos, scripts, textures etc.

A major version of 0 means to ignore the required version and just load whatever can be found.

Parameters:
source - The source to take the content from
core - The browser core needed for obtaining information
ignoreHeader - false if it should look for the file header to check version information
majorVersion - Require the given major version
minorVersion - Require the given minor version
Returns:
The completely loaded scene
Throws:
java.io.IOException - There was an I/OError reading the file
VRMLParseException - Some parsing error occurred during this scene processing

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium