Package org.web3d.vrml.export
Class X3DXMLRetainedExporter
java.lang.Object
org.web3d.vrml.export.Exporter
org.web3d.vrml.export.BaseRetainedExporter
org.web3d.vrml.export.X3DRetainedSAXExporter
org.web3d.vrml.export.X3DXMLRetainedExporter
- All Implemented Interfaces:
SceneGraphTraversalSimpleObserver
,BinaryContentHandler
,ContentHandler
,ProtoHandler
,RouteHandler
,ScriptHandler
,StringContentHandler
X3D XML exporter using a retained Scenegraph.
Known Issues:
Proto node fields are copied into instances
- Version:
- $Revision: 1.30 $
- Author:
- Alan Hudson
-
Field Summary
Fields inherited from class org.web3d.vrml.export.X3DRetainedSAXExporter
binary, BYTE_ALGORITHM_ID, compress, compressedAttWay, compressionMethod, currentCompressor, DELTA_ZLIB_INT_ARRAY_ALGORITHM_ID, EMPTY_MAP, filterWriter, handler, ignoreData, indent, INDENT_STRING, indentMap, indentString, METHOD_FASTEST_PARSING, METHOD_SMALLEST_LOSSY, METHOD_SMALLEST_NONLOSSY, METHOD_STRINGS, printDocType, printXML, protoDeclSet, protoMap, quantizeParam, root, traverser, usedNodes, useNC, x3dAtts
Fields inherited from class org.web3d.vrml.export.BaseRetainedExporter
builder, componentList, CONTAINER_PROPS_FILE, containerFields, convertOldContent, currentConnection, currentDefMap, currentIsMap, currentPrototypeDecl, defaultNode, defaultNodes, encodingTo, epToUrl, fieldReader, fieldRemap, geospatialFound, geospatialNodes, hanimFound, hanimNodes, isCache, nodeFactory, oldProtos, oStream, p, processingDocument, profile, protoCreator, scene, scriptPatterns, scriptReplacements, sigDigits, startTime, stripWhitespace, upgrading
Fields inherited from class org.web3d.vrml.export.Exporter
errorReporter, lastErrorCode, majorVersion, minorVersion
-
Constructor Summary
ConstructorsConstructorDescriptionX3DXMLRetainedExporter
(OutputStream os, int major, int minor, org.j3d.util.ErrorReporter errorReporter) Create a new exporter for the given spec versionX3DXMLRetainedExporter
(OutputStream os, int major, int minor, org.j3d.util.ErrorReporter errorReporter, int sigDigits) Create a new exporter for the given spec version -
Method Summary
Methods inherited from class org.web3d.vrml.export.X3DRetainedSAXExporter
createX3DString, createX3DString, createX3DString, encodeDoubleArray, encodeFloatArray, endDocument, getPrintDocType, getPrintXML, observedNode, printComponents, printEndNode, printExporterInfo, printExports, printExternalPrototypeDecl, printHeader, printImports, printMetaData, printProfile, printPrototypeDecl, printROUTE, printStartNode, printStartScriptNode, setPrintDocType, setPrintXML, setX3DAttributes, traverse, writeScene
Methods inherited from class org.web3d.vrml.export.BaseRetainedExporter
componentDecl, convertFieldData, endExternProtoDecl, endField, endNode, endProtoBody, endProtoDecl, endScriptDecl, exportDecl, externProtoURI, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, findIS, getPublicId, getSystemId, importDecl, loadContainerProperties, metaDecl, printDefMap, printIS, profileDecl, protoFieldDecl, protoIsDecl, reverseMap, routeDecl, scriptFieldDecl, setConvertOldContent, setDocumentLocator, startExternProtoDecl, startField, startNode, startProtoBody, startProtoDecl, startScriptDecl, useDecl
Methods inherited from class org.web3d.vrml.export.Exporter
getLastErrorCode
-
Constructor Details
-
X3DXMLRetainedExporter
public X3DXMLRetainedExporter(OutputStream os, int major, int minor, org.j3d.util.ErrorReporter errorReporter) Create a new exporter for the given spec version- Parameters:
os
- The stream to export the code tomajor
- The major version number of this sceneminor
- The minor version number of this sceneerrorReporter
- The error reporter to use
-
X3DXMLRetainedExporter
public X3DXMLRetainedExporter(OutputStream os, int major, int minor, org.j3d.util.ErrorReporter errorReporter, int sigDigits) Create a new exporter for the given spec version- Parameters:
os
- The stream to export the code tomajor
- The major version number of this sceneminor
- The minor version number of this sceneerrorReporter
- The error reporter to usesigDigits
- The number of significant digits to use in printing floats
-
-
Method Details
-
startDocument
public void startDocument(String uri, String url, String encoding, String type, String version, String comment) throws SAVException, VRMLException Declaration of the start of the document. The parameters are all of the values that are declared on the header line of the file after the#
start. The type string contains the representation of the first few characters of the file after the #. This allows us to work out if it is VRML97 or the later X3D spec.Version numbers change from VRML97 to X3D and aren't logical. In the first, it is
#VRML V2.0
and the second is#X3D V1.0
even though this second header represents a later spec.- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classBaseRetainedExporter
- Parameters:
uri
- The URI of the file.url
- The base URL of the file for resolving relative URIs contained in the fileencoding
- The encoding of this document - utf8 or binarytype
- The bytes of the first part of the file headerversion
- The VRML version of this documentcomment
- Any trailing text on this line. If there is none, this is null.- Throws:
SAVException
- This call is taken at the wrong time in the structure of the documentVRMLException
- The content provided is invalid for this part of the document or can't be parsed
-