|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.web3d.vrml.export.Exporter
org.web3d.vrml.export.BaseRetainedExporter
org.web3d.vrml.export.X3DXMLRetainedExporter
X3D XML exporter using a retained Scenegraph. Known Issues: Proto node fields are copied into instances
| Field Summary | |
protected java.io.Writer |
filterWriter
The passed in writer |
protected java.io.PrintWriter |
p
The printer |
protected boolean |
printDocType
Should we print the DOCTYPE |
protected java.util.HashMap |
protoMap
Single level proto map |
protected boolean |
useNC
Should we use node compressors |
| Fields inherited from class org.web3d.vrml.export.BaseRetainedExporter |
builder, componentList, CONTAINER_PROPS_FILE, containerFields, convertOldContent, currentDefMap, currentIsMap, currentPrototypeDecl, defaultNode, defaultNodes, encodingTo, epToUrl, fieldReader, fieldRemap, geospatialFound, geospatialNodes, hanimFound, hanimNodes, isCache, majorVersion, minorVersion, nodeFactory, oldProtos, oStream, processingDocument, profile, protoCreator, scene, scriptPatterns, scriptReplacements, stripWhitespace, upgrading |
| Constructor Summary | |
X3DXMLRetainedExporter(java.io.OutputStream os,
int major,
int minor)
Create a new exporter for the given spec version |
|
X3DXMLRetainedExporter(java.io.Writer w,
int major,
int minor)
Create a new exporter for the given spec version |
|
| Method Summary | |
void |
endDocument()
Declaration of the end of the document. |
void |
observedNode(VRMLNodeType parent,
VRMLNodeType child,
int field,
boolean used)
Notification of a child node. |
void |
printComponents(ComponentInfo[] comps)
Print the component decl |
void |
printEndNode(VRMLNodeType node,
boolean hadChildren,
boolean compressed,
java.util.Map isMap)
Print the end of a node. |
void |
printExports(java.util.Map exports)
Print Exports. |
void |
printExternalPrototypeDecl(CRExternPrototypeDecl proto)
Print an external proto declaration. |
void |
printHeader(int major,
int minor)
Print the header. |
void |
printImports(java.util.Map imports)
Print Imports. |
void |
printMetaData(java.util.Map meta)
Print the MetaData. |
void |
printProfile(java.lang.String profile)
Print the profile decl. |
void |
printPrototypeDecl(PrototypeDecl proto)
Print a proto declaration. |
void |
printROUTE(ROUTE route,
java.util.Map defMap)
Print a ROUTE statement. |
boolean |
printStartNode(VRMLNodeType node,
boolean use,
java.util.Map defMap,
java.util.Map isMap,
java.lang.String containerField,
boolean compressed)
Print the start of a node, and all its non node fields. |
void |
printStartScriptNode(AbstractDynamicFieldNode node,
boolean use,
java.util.Map defMap,
java.util.Map isMap)
Print the start of a node, and all its non node fields. |
void |
traverse(VRMLNode source,
boolean ignoreFirst)
Print a node and its children. |
void |
writeScene(VRMLScene scene)
Write a scene out. |
| 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, startDocument, startExternProtoDecl, startField, startNode, startProtoBody, startProtoDecl, startScriptDecl, useDecl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.io.PrintWriter p
protected java.io.Writer filterWriter
protected boolean printDocType
protected boolean useNC
protected java.util.HashMap protoMap
| Constructor Detail |
public X3DXMLRetainedExporter(java.io.OutputStream os,
int major,
int minor)
os - The stream to export the code tomajor - The major version number of this sceneminor - The minor version number of this scene
public X3DXMLRetainedExporter(java.io.Writer w,
int major,
int minor)
w - The writer to write tomajor - The major version number of this sceneminor - The minor version number of this scene| Method Detail |
public void writeScene(VRMLScene scene)
scene - The scene to write
public void endDocument()
throws SAVException,
VRMLException
endDocument in interface ContentHandlerendDocument in class BaseRetainedExporterSAVException - 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.
public void printHeader(int major,
int minor)
printHeader in class BaseRetainedExportermajor - The major versionminor - The minor versionpublic void printProfile(java.lang.String profile)
printProfile in class BaseRetainedExporterprofile - The profilepublic void printComponents(ComponentInfo[] comps)
printComponents in class BaseRetainedExportercomps - The component listpublic void printMetaData(java.util.Map meta)
printMetaData in class BaseRetainedExportermeta - The scene Metadata map
public void printROUTE(ROUTE route,
java.util.Map defMap)
printROUTE in class BaseRetainedExporterroute - The ROUTE to printdefMap - The DEF mappublic void printExports(java.util.Map exports)
printExports in class BaseRetainedExporterexports - A map of exports(name,AS).public void printImports(java.util.Map imports)
printImports in class BaseRetainedExporterimports - A map of imports(exported, String[] {def, as}.
public void traverse(VRMLNode source,
boolean ignoreFirst)
source - The root nodeignoreFirst - Should we ignore the first node. Used for WorldRoot and ProtoBody
public void printStartScriptNode(AbstractDynamicFieldNode node,
boolean use,
java.util.Map defMap,
java.util.Map isMap)
node - The node to printuse - Is it a USEdefMap - The current mapping of nodes to DEF namesisMap - The current mapping of fields to IS names
public boolean printStartNode(VRMLNodeType node,
boolean use,
java.util.Map defMap,
java.util.Map isMap,
java.lang.String containerField,
boolean compressed)
node - The node to printuse - Is it a USEdefMap - The current mapping of nodes to DEF namesisMap - The current mapping of fields to IS namescontainerField - The container field value, null if not neededcompressed - Is this the start of a sg compression
public void printEndNode(VRMLNodeType node,
boolean hadChildren,
boolean compressed,
java.util.Map isMap)
node - The nodehadChildren - Where there any children nodescompressed - Is this node compressedisMap - The current isMap
public void observedNode(VRMLNodeType parent,
VRMLNodeType child,
int field,
boolean used)
observedNode in interface SceneGraphTraversalSimpleObserverparent - The parent node of this nodechild - The child node that is being observedfield - The index of the child field in its parent nodeused - true if the node reference is actually a USEpublic void printPrototypeDecl(PrototypeDecl proto)
printPrototypeDecl in class BaseRetainedExporterproto - The decl to printpublic void printExternalPrototypeDecl(CRExternPrototypeDecl proto)
proto - The decl to print
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||