de.grogra.ext.x3d
Class X3DParser

java.lang.Object
  extended by de.grogra.ext.x3d.X3DParser

public class X3DParser
extends java.lang.Object


Field Summary
protected  org.apache.xmlbeans.XmlCursor cursor
          Cursor for traverse x3d file.
protected  java.io.File file
          Currently parsed file.
protected  java.util.HashMap<java.lang.String,ProtoDeclareImport> protoMap
          Map of all proto declares.
 
Constructor Summary
X3DParser(org.apache.xmlbeans.XmlTokenSource node, java.io.File file)
           
 
Method Summary
protected  void addChild(java.lang.Object parent, Node child)
           
 java.io.File getFile()
          Returns the url of the x3d file to parse.
 java.util.HashMap<java.lang.String,ProtoDeclareImport> getProtoMap()
          Returns the current proto declare map.
 java.util.HashMap<java.lang.String,java.lang.Object> getReferenceMap()
          Returns the current reference map.
protected  java.lang.Object handleAppearance(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.AppearanceDocument.Appearance appearance)
           
protected  java.lang.Object handleAppearanceNode(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.X3DAppearanceNode appearanceNode)
           
protected  java.lang.Object handleArc2D(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.Arc2DDocument.Arc2D arc)
           
protected  java.lang.Object handleBackground(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.BackgroundDocument.Background background)
           
protected  java.lang.Object handleBackgroundNode(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.X3DBackgroundNode backgroundNode)
           
protected  java.lang.Object handleBillboard(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.BillboardDocument.Billboard billboard)
           
protected  java.lang.Object handleBindableNode(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.X3DBindableNode bindableNode)
           
protected  java.lang.Object handleBox(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.BoxDocument.Box box)
           
protected  java.lang.Object handleChildNode(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.X3DChildNode childNode)
           
protected  java.lang.Object handleCircle2D(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.Circle2DDocument.Circle2D circle)
           
protected  java.lang.Object handleComposedGeometryNode(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.X3DComposedGeometryNode composedGeometryNode)
           
protected  java.lang.Object handleCone(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.ConeDocument.Cone cone)
           
protected  java.lang.Object handleCylinder(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.CylinderDocument.Cylinder cylinder)
           
protected  java.lang.Object handleDirectionalLight(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.DirectionalLightDocument.DirectionalLight directionalLight)
           
protected  java.lang.Object handleElevationGrid(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.ElevationGridDocument.ElevationGrid elevationGrid)
           
protected  java.lang.Object handleExternProtoDeclare(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.ExternProtoDeclareDocument.ExternProtoDeclare externProtoDeclare)
           
protected  java.lang.Object handleExtrusion(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.ExtrusionDocument.Extrusion extrusion)
           
protected  java.lang.Object handleGeometryNode(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.X3DGeometryNode geometryNode)
           
protected  java.lang.Object handleGroup(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.GroupDocument.Group groupNode)
           
protected  java.lang.Object handleGroupingNode(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.X3DGroupingNode groupingNode)
           
protected  java.lang.Object handleIndexedFaceSet(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.IndexedFaceSetDocument.IndexedFaceSet indexedFaceSet)
           
protected  java.lang.Object handleIndexedLineSet(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.IndexedLineSetDocument.IndexedLineSet lineSet)
           
protected  java.lang.Object handleIndexedTriangleFanSet(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.IndexedTriangleFanSetDocument.IndexedTriangleFanSet triangleFanSet)
           
protected  java.lang.Object handleIndexedTriangleSet(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.IndexedTriangleSetDocument.IndexedTriangleSet triangleSet)
           
protected  java.lang.Object handleIndexedTriangleStripSet(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.IndexedTriangleStripSetDocument.IndexedTriangleStripSet triangleStripSet)
           
protected  java.lang.Object handleInline(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.InlineDocument.Inline inline)
           
protected  java.lang.Object handleIS(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.ISDocument.IS is)
           
protected  java.lang.Object handleLightNode(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.X3DLightNode lightNode)
           
protected  java.lang.Object handleLineSet(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.LineSetDocument.LineSet lineSet)
           
protected  java.lang.Object handleLOD(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.LODDocument.LOD lod)
           
protected  java.lang.Object handleNode(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.X3DNode node)
           
protected  java.lang.Object handleObject(java.lang.Object parent, org.apache.xmlbeans.XmlObject obj)
           
protected  java.lang.Object handlePointLight(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.PointLightDocument.PointLight pointLight)
           
protected  java.lang.Object handlePointSet(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.PointSetDocument.PointSet pointSet)
           
protected  java.lang.Object handlePolyline2D(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.Polyline2DDocument.Polyline2D polyline)
           
protected  java.lang.Object handlePolypoint2D(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.Polypoint2DDocument.Polypoint2D polypoint)
           
protected  java.lang.Object handleProtobody(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.ProtoBodyDocument.ProtoBody protoBody)
           
protected  java.lang.Object handleProtoDeclare(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.ProtoDeclareDocument.ProtoDeclare protoDeclare)
           
protected  java.lang.Object handleProtoInstance(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.ProtoInstanceDocument.ProtoInstance protoInstance)
           
protected  java.lang.Object handlePrototype(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.X3DPrototype x3dprototype)
           
protected  java.lang.Object handleRectangle2D(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.Rectangle2DDocument.Rectangle2D rectangle)
           
protected  java.lang.Object handleScene(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.SceneDocument.Scene scene)
           
protected  java.lang.Object handleSceneGraphStructureNodeType(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.SceneGraphStructureNodeType sgsnt)
           
protected  java.lang.Object handleShape(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.ShapeDocument.Shape shape)
           
protected  java.lang.Object handleShapeNode(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.X3DShapeNode shapeNode)
           
protected  java.lang.Object handleSphere(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.SphereDocument.Sphere sphere)
           
protected  java.lang.Object handleSpotLight(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.SpotLightDocument.SpotLight spotLight)
           
protected  java.lang.Object handleTransform(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.TransformDocument.Transform transformNode)
           
protected  java.lang.Object handleTriangleFanSet(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.TriangleFanSetDocument.TriangleFanSet triangleFanSet)
           
protected  java.lang.Object handleTriangleSet(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.TriangleSetDocument.TriangleSet triangleSet)
           
protected  java.lang.Object handleTriangleSet2D(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.TriangleSet2DDocument.TriangleSet2D triangleSet)
           
protected  java.lang.Object handleTriangleStripSet(java.lang.Object parent, de.grogra.ext.x3d.xmlbeans.TriangleStripSetDocument.TriangleStripSet triangleStripSet)
           
 void parseScene(java.lang.Object parent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cursor

protected org.apache.xmlbeans.XmlCursor cursor
Cursor for traverse x3d file.


file

protected java.io.File file
Currently parsed file.


protoMap

protected java.util.HashMap<java.lang.String,ProtoDeclareImport> protoMap
Map of all proto declares.

Constructor Detail

X3DParser

public X3DParser(org.apache.xmlbeans.XmlTokenSource node,
                 java.io.File file)
Method Detail

addChild

protected void addChild(java.lang.Object parent,
                        Node child)

getFile

public java.io.File getFile()
Returns the url of the x3d file to parse.

Returns:

getProtoMap

public java.util.HashMap<java.lang.String,ProtoDeclareImport> getProtoMap()
Returns the current proto declare map.

Returns:

getReferenceMap

public java.util.HashMap<java.lang.String,java.lang.Object> getReferenceMap()
Returns the current reference map.

Returns:

handleAppearance

protected java.lang.Object handleAppearance(java.lang.Object parent,
                                            de.grogra.ext.x3d.xmlbeans.AppearanceDocument.Appearance appearance)

handleAppearanceNode

protected java.lang.Object handleAppearanceNode(java.lang.Object parent,
                                                de.grogra.ext.x3d.xmlbeans.X3DAppearanceNode appearanceNode)

handleArc2D

protected java.lang.Object handleArc2D(java.lang.Object parent,
                                       de.grogra.ext.x3d.xmlbeans.Arc2DDocument.Arc2D arc)

handleBackground

protected java.lang.Object handleBackground(java.lang.Object parent,
                                            de.grogra.ext.x3d.xmlbeans.BackgroundDocument.Background background)

handleBackgroundNode

protected java.lang.Object handleBackgroundNode(java.lang.Object parent,
                                                de.grogra.ext.x3d.xmlbeans.X3DBackgroundNode backgroundNode)

handleBillboard

protected java.lang.Object handleBillboard(java.lang.Object parent,
                                           de.grogra.ext.x3d.xmlbeans.BillboardDocument.Billboard billboard)

handleBindableNode

protected java.lang.Object handleBindableNode(java.lang.Object parent,
                                              de.grogra.ext.x3d.xmlbeans.X3DBindableNode bindableNode)

handleBox

protected java.lang.Object handleBox(java.lang.Object parent,
                                     de.grogra.ext.x3d.xmlbeans.BoxDocument.Box box)

handleChildNode

protected java.lang.Object handleChildNode(java.lang.Object parent,
                                           de.grogra.ext.x3d.xmlbeans.X3DChildNode childNode)

handleCircle2D

protected java.lang.Object handleCircle2D(java.lang.Object parent,
                                          de.grogra.ext.x3d.xmlbeans.Circle2DDocument.Circle2D circle)

handleComposedGeometryNode

protected java.lang.Object handleComposedGeometryNode(java.lang.Object parent,
                                                      de.grogra.ext.x3d.xmlbeans.X3DComposedGeometryNode composedGeometryNode)

handleCone

protected java.lang.Object handleCone(java.lang.Object parent,
                                      de.grogra.ext.x3d.xmlbeans.ConeDocument.Cone cone)

handleCylinder

protected java.lang.Object handleCylinder(java.lang.Object parent,
                                          de.grogra.ext.x3d.xmlbeans.CylinderDocument.Cylinder cylinder)

handleDirectionalLight

protected java.lang.Object handleDirectionalLight(java.lang.Object parent,
                                                  de.grogra.ext.x3d.xmlbeans.DirectionalLightDocument.DirectionalLight directionalLight)

handleElevationGrid

protected java.lang.Object handleElevationGrid(java.lang.Object parent,
                                               de.grogra.ext.x3d.xmlbeans.ElevationGridDocument.ElevationGrid elevationGrid)

handleExternProtoDeclare

protected java.lang.Object handleExternProtoDeclare(java.lang.Object parent,
                                                    de.grogra.ext.x3d.xmlbeans.ExternProtoDeclareDocument.ExternProtoDeclare externProtoDeclare)

handleExtrusion

protected java.lang.Object handleExtrusion(java.lang.Object parent,
                                           de.grogra.ext.x3d.xmlbeans.ExtrusionDocument.Extrusion extrusion)

handleGeometryNode

protected java.lang.Object handleGeometryNode(java.lang.Object parent,
                                              de.grogra.ext.x3d.xmlbeans.X3DGeometryNode geometryNode)

handleGroup

protected java.lang.Object handleGroup(java.lang.Object parent,
                                       de.grogra.ext.x3d.xmlbeans.GroupDocument.Group groupNode)

handleGroupingNode

protected java.lang.Object handleGroupingNode(java.lang.Object parent,
                                              de.grogra.ext.x3d.xmlbeans.X3DGroupingNode groupingNode)

handleIndexedFaceSet

protected java.lang.Object handleIndexedFaceSet(java.lang.Object parent,
                                                de.grogra.ext.x3d.xmlbeans.IndexedFaceSetDocument.IndexedFaceSet indexedFaceSet)

handleIndexedLineSet

protected java.lang.Object handleIndexedLineSet(java.lang.Object parent,
                                                de.grogra.ext.x3d.xmlbeans.IndexedLineSetDocument.IndexedLineSet lineSet)

handleIndexedTriangleFanSet

protected java.lang.Object handleIndexedTriangleFanSet(java.lang.Object parent,
                                                       de.grogra.ext.x3d.xmlbeans.IndexedTriangleFanSetDocument.IndexedTriangleFanSet triangleFanSet)

handleIndexedTriangleSet

protected java.lang.Object handleIndexedTriangleSet(java.lang.Object parent,
                                                    de.grogra.ext.x3d.xmlbeans.IndexedTriangleSetDocument.IndexedTriangleSet triangleSet)

handleIndexedTriangleStripSet

protected java.lang.Object handleIndexedTriangleStripSet(java.lang.Object parent,
                                                         de.grogra.ext.x3d.xmlbeans.IndexedTriangleStripSetDocument.IndexedTriangleStripSet triangleStripSet)

handleInline

protected java.lang.Object handleInline(java.lang.Object parent,
                                        de.grogra.ext.x3d.xmlbeans.InlineDocument.Inline inline)

handleIS

protected java.lang.Object handleIS(java.lang.Object parent,
                                    de.grogra.ext.x3d.xmlbeans.ISDocument.IS is)

handleLightNode

protected java.lang.Object handleLightNode(java.lang.Object parent,
                                           de.grogra.ext.x3d.xmlbeans.X3DLightNode lightNode)

handleLineSet

protected java.lang.Object handleLineSet(java.lang.Object parent,
                                         de.grogra.ext.x3d.xmlbeans.LineSetDocument.LineSet lineSet)

handleLOD

protected java.lang.Object handleLOD(java.lang.Object parent,
                                     de.grogra.ext.x3d.xmlbeans.LODDocument.LOD lod)

handleNode

protected java.lang.Object handleNode(java.lang.Object parent,
                                      de.grogra.ext.x3d.xmlbeans.X3DNode node)

handleObject

protected java.lang.Object handleObject(java.lang.Object parent,
                                        org.apache.xmlbeans.XmlObject obj)

handlePointLight

protected java.lang.Object handlePointLight(java.lang.Object parent,
                                            de.grogra.ext.x3d.xmlbeans.PointLightDocument.PointLight pointLight)

handlePointSet

protected java.lang.Object handlePointSet(java.lang.Object parent,
                                          de.grogra.ext.x3d.xmlbeans.PointSetDocument.PointSet pointSet)

handlePolyline2D

protected java.lang.Object handlePolyline2D(java.lang.Object parent,
                                            de.grogra.ext.x3d.xmlbeans.Polyline2DDocument.Polyline2D polyline)

handlePolypoint2D

protected java.lang.Object handlePolypoint2D(java.lang.Object parent,
                                             de.grogra.ext.x3d.xmlbeans.Polypoint2DDocument.Polypoint2D polypoint)

handleProtobody

protected java.lang.Object handleProtobody(java.lang.Object parent,
                                           de.grogra.ext.x3d.xmlbeans.ProtoBodyDocument.ProtoBody protoBody)

handleProtoDeclare

protected java.lang.Object handleProtoDeclare(java.lang.Object parent,
                                              de.grogra.ext.x3d.xmlbeans.ProtoDeclareDocument.ProtoDeclare protoDeclare)

handleProtoInstance

protected java.lang.Object handleProtoInstance(java.lang.Object parent,
                                               de.grogra.ext.x3d.xmlbeans.ProtoInstanceDocument.ProtoInstance protoInstance)

handlePrototype

protected java.lang.Object handlePrototype(java.lang.Object parent,
                                           de.grogra.ext.x3d.xmlbeans.X3DPrototype x3dprototype)

handleRectangle2D

protected java.lang.Object handleRectangle2D(java.lang.Object parent,
                                             de.grogra.ext.x3d.xmlbeans.Rectangle2DDocument.Rectangle2D rectangle)

handleScene

protected java.lang.Object handleScene(java.lang.Object parent,
                                       de.grogra.ext.x3d.xmlbeans.SceneDocument.Scene scene)

handleSceneGraphStructureNodeType

protected java.lang.Object handleSceneGraphStructureNodeType(java.lang.Object parent,
                                                             de.grogra.ext.x3d.xmlbeans.SceneGraphStructureNodeType sgsnt)

handleShape

protected java.lang.Object handleShape(java.lang.Object parent,
                                       de.grogra.ext.x3d.xmlbeans.ShapeDocument.Shape shape)

handleShapeNode

protected java.lang.Object handleShapeNode(java.lang.Object parent,
                                           de.grogra.ext.x3d.xmlbeans.X3DShapeNode shapeNode)

handleSphere

protected java.lang.Object handleSphere(java.lang.Object parent,
                                        de.grogra.ext.x3d.xmlbeans.SphereDocument.Sphere sphere)

handleSpotLight

protected java.lang.Object handleSpotLight(java.lang.Object parent,
                                           de.grogra.ext.x3d.xmlbeans.SpotLightDocument.SpotLight spotLight)

handleTransform

protected java.lang.Object handleTransform(java.lang.Object parent,
                                           de.grogra.ext.x3d.xmlbeans.TransformDocument.Transform transformNode)

handleTriangleFanSet

protected java.lang.Object handleTriangleFanSet(java.lang.Object parent,
                                                de.grogra.ext.x3d.xmlbeans.TriangleFanSetDocument.TriangleFanSet triangleFanSet)

handleTriangleSet

protected java.lang.Object handleTriangleSet(java.lang.Object parent,
                                             de.grogra.ext.x3d.xmlbeans.TriangleSetDocument.TriangleSet triangleSet)

handleTriangleSet2D

protected java.lang.Object handleTriangleSet2D(java.lang.Object parent,
                                               de.grogra.ext.x3d.xmlbeans.TriangleSet2DDocument.TriangleSet2D triangleSet)

handleTriangleStripSet

protected java.lang.Object handleTriangleStripSet(java.lang.Object parent,
                                                  de.grogra.ext.x3d.xmlbeans.TriangleStripSetDocument.TriangleStripSet triangleStripSet)

parseScene

public void parseScene(java.lang.Object parent)