com.visioglobe.libVisioDevKit
Class VgIDatabase

java.lang.Object
  extended by com.visioglobe.libVisioDevKit.VgIDatabase

public class VgIDatabase
extends java.lang.Object

The VgIDatabase interface is used to load and select the data that will be displayed in the 3D view. This interface depends on how databases are bundled. First, the data structure, with all available datasets, is described in a configuration file. This file must be loaded (using the VgIDatabase::loadConfiguration method), then a particular dataset can be selected to be displayed in the 3D view (using the VgIDatabase::selectDataset method). Example:

Interface:
VgEngine::VgIDatabase
Endcode:
Date:
25/02/2010

Field Summary
protected  boolean swigCMemOwn
           
 
Constructor Summary
VgIDatabase(long cPtr, boolean cMemoryOwn)
           
 
Method Summary
 void delete()
           
protected  void finalize()
           
 boolean getCachedLicenseFilenameForConfiguration(java.lang.String pConfigFilename, java.lang.String[] pOutLicenseFilename)
           
static long getCPtr(VgIDatabase obj)
           
 VgIDatabaseDatasetDescriptor getCurrentDatasetDescriptor()
          Retrieves the descriptor of the current dataset.
 VgIDatabaseDatasetDescriptorVector getDatasetDescriptors()
          Retrieves the vector of all available datasets.
 boolean loadConfiguration(java.lang.String pConfigFilename, long pSecretKey)
           
 boolean loadConfiguration(java.lang.String pConfigFilename, long pSecretKey, java.lang.String pLicenseGeneratorURL)
          Loads a database configuration from a mass storage.
 boolean selectDataset(int pIndex)
          Selects a dataset using its index.
 boolean selectDataset(java.lang.String pDatasetName)
          Selects a dataset using its name.
 void unloadConfiguration()
          unloads the current configuration if there is one.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

swigCMemOwn

protected boolean swigCMemOwn
Constructor Detail

VgIDatabase

public VgIDatabase(long cPtr,
                   boolean cMemoryOwn)
Method Detail

getCPtr

public static long getCPtr(VgIDatabase obj)

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

delete

public void delete()

loadConfiguration

public boolean loadConfiguration(java.lang.String pConfigFilename,
                                 long pSecretKey,
                                 java.lang.String pLicenseGeneratorURL)
Loads a database configuration from a mass storage.

Parameters:
pConfigFilename - The name of the configuration file to be loaded.
pSecretKey - The secret key that matches the secret key that was used to generate the associated licence xml file's hash code.
pLicenseGeneratorURL - The URL that will be reached to get the license if missing.
Returns:
true if the configuration file was loaded successfully, otherwise false.
Remark:
If loadConfiguration() returns false, the VgIEngine::getLastError() and VgIEngine::getErrorString() can be used in conjunction to find the reason., If loadConfiguration() needs to update the license file from the network it will create a cached license. This filename can be retrieved with bool getCachedLicenseFilenameForConfiguration()

loadConfiguration

public boolean loadConfiguration(java.lang.String pConfigFilename,
                                 long pSecretKey)

unloadConfiguration

public void unloadConfiguration()
unloads the current configuration if there is one. It releases the resources and stops any threads created


getCachedLicenseFilenameForConfiguration

public boolean getCachedLicenseFilenameForConfiguration(java.lang.String pConfigFilename,
                                                        java.lang.String[] pOutLicenseFilename)

selectDataset

public boolean selectDataset(java.lang.String pDatasetName)
Selects a dataset using its name. Visual data will be rendered on the view during the preceding display.

Parameters:
pDatasetName - The name of the dataset. Needs to match the name of a dataset defined within the currently loaded configuration file.
Returns:
true if a new dataset was loaded, otherwise false. In case of failure, the previous dataset remains active.

selectDataset

public boolean selectDataset(int pIndex)
Selects a dataset using its index. Visual data will be rendered on the view during the preceding display.

Parameters:
pIndex - Index of dataset, indicated by it's position relative to other datasets within the configuration file (starting at 0).
Returns:
true if a new dataset was loaded, otherwise false. In case of failure, the previous dataset is still active.

getCurrentDatasetDescriptor

public VgIDatabaseDatasetDescriptor getCurrentDatasetDescriptor()
Retrieves the descriptor of the current dataset.

Returns:
Descriptor of the currently loaded dataset. If there isn't a valid current database dataset descriptor, then NULL will be returned.

getDatasetDescriptors

public VgIDatabaseDatasetDescriptorVector getDatasetDescriptors()
Retrieves the vector of all available datasets.

Returns:
Vector of descriptors for all available datasets.

VisioDevKit 2.0, Visioglobe® 2013