de.grogra.ext.x3d
Class X3DImport

java.lang.Object
  extended by de.grogra.pf.io.FilterBase
      extended by de.grogra.ext.x3d.X3DImport
All Implemented Interfaces:
Filter, FilterSource, ObjectSource, RegistryContext, Map

public class X3DImport
extends FilterBase
implements ObjectSource


Nested Class Summary
 
Nested classes/interfaces inherited from interface de.grogra.pf.io.FilterSource
FilterSource.MetaDataKey<V>
 
Nested classes/interfaces inherited from interface de.grogra.util.Map
Map.Chain
 
Field Summary
protected  java.util.Stack<X3DParser> parsers
          Stack of parsers.
protected  Null sceneNode
          GroIMP root node of imported x3d nodes.
protected static X3DImport theImport
          Current import instance.
protected  Workbench workbench
          Current workbench.
 
Fields inherited from class de.grogra.pf.io.FilterBase
item, source
 
Fields inherited from interface de.grogra.pf.io.FilterSource
AUTO_PROGRESS, DESTINATION_FILE, DESTINATION_URL
 
Fields inherited from interface de.grogra.util.Map
DEFAULT_VALUE, EMPTY_MAP
 
Constructor Summary
X3DImport(FilterItem item, FilterSource source)
          Constructor of the x3d importer.
 
Method Summary
 void addNewParser(X3DParser parser)
          Add a new parser on top of stack.
 X3DParser getCurrentParser()
          Returns the current x3d parser.
 java.lang.Object getObject()
          Returns the data as an object of a class which is compatible which the flavor.
static X3DImport getTheImport()
          Returns the instance of the current x3d importer.
 void increaseProgress()
           
 void removeCurrentParser()
          Removes the current parser from stack.
 
Methods inherited from class de.grogra.pf.io.FilterBase
get, getFilter, getFlavor, getImpl, getMetaData, getRegistry, getSource, getSystemId, initProgressMonitor, setFlavor, setMetaData, setMetaData, setProgress, setSystemId, toString, toURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.grogra.pf.io.FilterSource
getFilter, getFlavor, getMetaData, getSystemId, initProgressMonitor, setMetaData, setProgress
 
Methods inherited from interface de.grogra.pf.registry.RegistryContext
getRegistry
 

Field Detail

parsers

protected java.util.Stack<X3DParser> parsers
Stack of parsers.


sceneNode

protected Null sceneNode
GroIMP root node of imported x3d nodes.


theImport

protected static X3DImport theImport
Current import instance.


workbench

protected Workbench workbench
Current workbench.

Constructor Detail

X3DImport

public X3DImport(FilterItem item,
                 FilterSource source)
Constructor of the x3d importer. Makes some preprocessing tasks.

Parameters:
item -
source -
Method Detail

addNewParser

public void addNewParser(X3DParser parser)
Add a new parser on top of stack. This is the current parser.

Parameters:
parser -

getCurrentParser

public X3DParser getCurrentParser()
Returns the current x3d parser.

Returns:

getObject

public java.lang.Object getObject()
                           throws java.io.IOException
Description copied from interface: ObjectSource
Returns the data as an object of a class which is compatible which the flavor.

Specified by:
getObject in interface ObjectSource
Returns:
the data
Throws:
java.io.IOException

getTheImport

public static X3DImport getTheImport()
Returns the instance of the current x3d importer.

Returns:

increaseProgress

public void increaseProgress()

removeCurrentParser

public void removeCurrentParser()
Removes the current parser from stack. Next one in stack becomes the current parser.