|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface VRMLReader
Representation of a class capable of reading a VRML source and providing event notification of the items in that file.
The class acts as a serial stream of events as the VRML file is parsed. If a given handler is not registered, events of these types will be ignored.
All SAV interfaces are assumed to be Synchronous. The parse methods shall not return until parsing is complete and readers shall wait for an event handler callback to return before reporting the next event.
| Method Summary | |
|---|---|
ContentHandler |
getContentHandler()
Get the currently set ContentHandler instance. |
ErrorReporter |
getErrorHandler()
Get the currently set ErrorHandler instance. |
java.lang.Object |
getProperty(java.lang.String prop)
Get the value of the named property. |
ProtoHandler |
getProtoHandler()
Get the currently set ProtoHandler instance. |
RouteHandler |
getRouteHandler()
Get the currently set RouteHandler instance. |
ScriptHandler |
getScriptHandler()
Get the currently set ScriptHandler instance. |
void |
parse(InputSource is)
Parse a VRML document represented by the given input source. |
void |
setContentHandler(ContentHandler nh)
Set the node handler to the given instance. |
void |
setErrorHandler(ErrorHandler eh)
Set the error handler to the given instance. |
void |
setErrorReporter(ErrorReporter eh)
Set the error handler to the given instance. |
void |
setHeaderIgnore(boolean enable)
Tell the reader that it should not look for the header. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Set the value of the named property to the given value. |
void |
setProtoHandler(ProtoHandler ph)
Set the proto handler to the given instance. |
void |
setRouteHandler(RouteHandler rh)
Set the route handler to the given instance. |
void |
setScriptHandler(ScriptHandler sh)
Set the script handler to the given instance. |
| Method Detail |
|---|
void parse(InputSource is)
throws java.io.IOException,
VRMLException
is - The input source to be used
java.io.IOException - An I/O error while reading the stream
VRMLParseException - A parsing error occurred in the file
VRMLException
java.lang.Object getProperty(java.lang.String prop)
throws SAVNotSupportedException
prop - The name of the property to get the value of
SAVNotSupportedException - The VRMLReader does not recognize
or does not support this property name.
void setProperty(java.lang.String name,
java.lang.Object value)
throws SAVNotSupportedException
name - The name of the property to setvalue - The value of this property
SAVNotSupportedException - The VRMLReader does not recognize
or does not support this property name.void setHeaderIgnore(boolean enable)
enable - true to stop looking for a headerErrorReporter getErrorHandler()
ErrorHandler instance. If nothing is set
it will return null.
void setErrorHandler(ErrorHandler eh)
eh - The error handler instance to usevoid setErrorReporter(ErrorReporter eh)
eh - The error reporter instance to useContentHandler getContentHandler()
ContentHandler instance. If nothing is set
it will return null.
void setContentHandler(ContentHandler nh)
nh - The node handler instance to useScriptHandler getScriptHandler()
ScriptHandler instance. If nothing is set
it will return null.
void setScriptHandler(ScriptHandler sh)
sh - The script handler instance to useProtoHandler getProtoHandler()
ProtoHandler instance. If nothing is set
it will return null.
void setProtoHandler(ProtoHandler ph)
ph - The proto handler instance to useRouteHandler getRouteHandler()
RouteHandler instance. If nothing is set
it will return null.
void setRouteHandler(RouteHandler rh)
rh - The route handler instance to use
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||