org.deegree.tools.rendering.manager
Class ModelManager<FB extends PositionableModel>

java.lang.Object
  extended by org.deegree.tools.rendering.manager.ModelManager<FB>
Type Parameters:
FB - The type of the filebackend.
Direct Known Subclasses:
BuildingManager, StageManager, TreeManager

public abstract class ModelManager<FB extends PositionableModel>
extends Object

The ModelManager class defines a simple interface for inserting, deleting and updating different kind of data models into the WPVS.

Version:
$Revision: 22982 $, $Date: 2010-03-10 16:39:08 +0100 (Wed, 10 Mar 2010) $
Author:
Rutger Bezema, last edited by: $Author: rbezema $

Field Summary
protected  File textureDir
          The place to store textures.
protected  double[] wpvsTranslationVector
          The translation to the origin of the WPVS scene.
 
Constructor Summary
protected ModelManager(String textureDir, ModelBackend<?> modelBackend, double[] wpvsTranslationVector)
           
 
Method Summary
 BackendResult delete(String uuid, ModelBackend.Type objectType, int qualityLevel, String sqlWhere)
          Imports the data from the given file.
 void flush()
           
 ModelBackend<?> getDbBackend()
           
 File getTextureDir()
           
abstract  BackendResult importFromFile(File f, org.apache.commons.cli.CommandLine commandLine)
          Imports the data from the given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textureDir

protected final File textureDir
The place to store textures.


wpvsTranslationVector

protected final double[] wpvsTranslationVector
The translation to the origin of the WPVS scene.

Constructor Detail

ModelManager

protected ModelManager(String textureDir,
                       ModelBackend<?> modelBackend,
                       double[] wpvsTranslationVector)
Parameters:
textureDir -
modelBackend -
wpvsTranslationVector - 2d vector to the origin of the wpvs scene
Method Detail

delete

public BackendResult delete(String uuid,
                            ModelBackend.Type objectType,
                            int qualityLevel,
                            String sqlWhere)
                     throws IOException
Imports the data from the given file.

Parameters:
uuid - the file in an expected format.
objectType - to be deleted
qualityLevel - the qualitylevel to be deleted, if -1 the object will be deleted from the backend.
sqlWhere - defining a where clause on elements to be deleted.
Returns:
the number of imported objects
Throws:
IOException

importFromFile

public abstract BackendResult importFromFile(File f,
                                             org.apache.commons.cli.CommandLine commandLine)
                                      throws FileNotFoundException,
                                             IOException
Imports the data from the given file.

Parameters:
f - the file in an expected format.
commandLine - program parameters only necessary for a given instance object will be available in the commandline.
Returns:
the number of imported objects
Throws:
FileNotFoundException
IOException

getDbBackend

public final ModelBackend<?> getDbBackend()
Returns:
the modelBackend

getTextureDir

public final File getTextureDir()
Returns:
the textureDir

flush

public void flush()
           throws IOException
Throws:
IOException


Copyright © 2011. All Rights Reserved.