|
Xj3D VRML/X3D Code API | ||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||||
See:
Description
| Class Summary | |
| VRMLContentHandlerFactory | A Factory implementation for VRML content handlers that produces VRML output. |
| VRMLFileNameMap | An implementation of a file name mapping for handling VRML file types. |
Content handler implementation code to allow the Xj3D code to load inline data or run as a standalone system without needing to use other loader interfaces.
As our asynchronous load mechanism for Xj3D does not use the standard
java.net packages for loading external content, we extend the
classes used by our system. It can be used with the standard java.net system,
but will not use it for it's own internal loading.
import org.ietf.uri.URI;
import org.ietf.uri.FileNameMap;
...
ContentHandlerFactory fac = URI.getContentHandlerFactory();
if(!(fac instanceof J3DContentHandlerFactory)) {
fac = new J3DContentHandlerFactory(fac);
URI.setContentHandlerFactory(fac);
}
FileNameMap
interface.
The registration process is very similar to the content handler factory process:
import org.ietf.uri.URI;
import org.ietf.uri.FileNameMap;
...
FileNameMap fn_map = URI.getFileNameMap();
if(!(fn_map instanceof VRMLFileNameMap)) {
fn_map = new VRMLFileNameMap(fn_map);
URI.setFileNameMap(fn_map);
}
The URI packages are included as part of the CVS download or install and should
be registered in your classpath.
If you wish to get the source for the URI system, the handler makes use of
Justin Couch's URIlib Java library
for loading URNs and URLs. The standard java.net library is not
used. Note that if you are using URNs, you will need to set a few system
properties defined by that package.
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||||