Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.sav
Interface StringContentHandler

All Superinterfaces:
ContentHandler
All Known Subinterfaces:
SceneBuilder
All Known Implementing Classes:
BaseRetainedExporter, BinaryExporter, CRExternProtoBuilder, CRMainSceneBuilder, Exporter, NRExternProtoBuilder, NRVRMLSceneBuilder, NullExporter, OGLExternProtoBuilder, OGLVRMLSceneBuilder, ProtoBuilder, StatisticsCollector, X3DBinaryRetainedDirectExporter, X3DBinaryRetainedExporter, X3DClassicExporter, X3DClassicRetainedExporter, X3DRetainedSAXExporter, X3DXMLExporter, X3DXMLRetainedExporter

public interface StringContentHandler
extends ContentHandler

Receiver of notifications from the VRML document about node declaration information. All field values are sent as strings.

Version:
$Revision: 1.1 $
Author:
Alan Hudson

Method Summary
 void fieldValue(java.lang.String value)
          The value of a normal field.
 void fieldValue(java.lang.String[] values)
          The value of an MFField where the underlying parser knows about how the values are broken up.
 
Methods inherited from interface org.web3d.vrml.sav.ContentHandler
componentDecl, endDocument, endField, endNode, exportDecl, importDecl, metaDecl, profileDecl, setDocumentLocator, startDocument, startField, startNode, useDecl
 

Method Detail

fieldValue

void fieldValue(java.lang.String value)
                throws SAVException,
                       VRMLException
The value of a normal field. This is a string that represents the entire value of the field. MFStrings will have to be parsed. This is a terminating call for startField as well. The next call will either be another startField() or endNode().

If this field is an SFNode with a USE declaration you will have the ContentHandler.useDecl(String) method called rather than this method. If the SFNode is empty the value returned here will be "NULL".

There are times where we have an MFField that is declared in the file to be empty. To signify this case, this method will be called with a parameter value of null. A lot of the time this is because we can't really determine if the incoming node is an MFNode or not.

Parameters:
value - The value of this field
Throws:
SAVException - This call is taken at the wrong time in the structure of the document.
VRMLException - This call is taken at the wrong time in the structure of the document.

fieldValue

void fieldValue(java.lang.String[] values)
                throws SAVException,
                       VRMLException
The value of an MFField where the underlying parser knows about how the values are broken up. The parser is not required to support this callback, but implementors of this interface should understand it. The most likely time we will have this method called is for MFString or URL lists. If called, it is guaranteed to split the strings along the SF node type boundaries.

Parameters:
values - The list of string representing the values
Throws:
SAVException - This call is taken at the wrong time in the structure of the document.
VRMLException - This call is taken at the wrong time in the structure of the document.

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium