Xj3D 2.0 VRML/X3D Code API

Package org.web3d.net.resolve

URN resolver implementation code to allow the Xj3D code to load any item that defines a URN in it's URL field (eg EXTERNPROTO and ImageTexture).

See:
          Description

Class Summary
Web3DURNResolver A URN resolver to allow the integration of URNs that use the web3d Namespace ID.
 

Package org.web3d.net.resolve Description

URN resolver implementation code to allow the Xj3D code to load any item that defines a URN in it's URL field (eg EXTERNPROTO and ImageTexture).

Registering VRML URN Resolvers

URN resolvers are not automatically registered with the system. This means that externprotos and other nodes will fail to load using the URN system unless you register one of these handlers with the URI resolver system within your own code. To register one, you need to use the following code guide.
import org.ietf.uri.URN;
import org.ietf.uri.URNResolverService;

import org.web3d.net.resolve.Web3DURNResolverService;

...
    URNResolverService resolver = new Web3DURNResolver();

    resolver.registerPrefixLocation("geovrml", "c:\\Program Files\\GeoVRML");
    // add more calls here for other systems like UMEL

    URN.addResolver(resolver);

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 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium