Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

OmgModellerWebServicesPlugin Class Reference

#include <omgmodellerwebservicesplugin.h>

Inheritance diagram for OmgModellerWebServicesPlugin:

Inheritance graph
[legend]
Collaboration diagram for OmgModellerWebServicesPlugin:

Collaboration graph
[legend]
List of all members.

Detailed Description

The OmgModellerWebServicesplugin implements a soap client for the openModeller Web Services Interface standard API. To better understand the implementation code in this class, it is suggested to look at soapClient.cpp to see the native c++ type names, and om_soap_server.cpp for the gsoap name mappings. These files are available in the om/src/soap directory in the openModeller cvs repository.
Author:
Tim Sutton

Definition at line 42 of file omgmodellerwebservicesplugin.h.

Signals

void error (QString)
void logMessageUpdated (QString theMessage)
void modelDone (QString theFileName)
void modelProgressUpdate (int theProgress)

Public Member Functions

 OmgModellerWebServicesPlugin (QObject *parent=0)
 ~OmgModellerWebServicesPlugin ()
QString createModel (OmgModel *theModel)
void projectModel (OmgModel *theModel)
const QStringList getAlgorithmList ()
const OmgAlgorithmSet getAlgorithmSet ()
const QString getLayers (QString theBaseDir)
const QString getName ()
wchar_t * convertToWideChar (const char *p)
soap * getSoapConnection ()

Private Member Functions

 Q_INTERFACES (OmgModellerPluginInterface)
bool initialise ()

Private Attributes

int mModelProgress
int mMapProgress


Constructor & Destructor Documentation

OmgModellerWebServicesPlugin::OmgModellerWebServicesPlugin QObject parent = 0  ) 
 

Definition at line 43 of file omgmodellerwebservicesplugin.cpp.

References initialise().

Here is the call graph for this function:

OmgModellerWebServicesPlugin::~OmgModellerWebServicesPlugin  ) 
 

Definition at line 50 of file omgmodellerwebservicesplugin.cpp.


Member Function Documentation

wchar_t * OmgModellerWebServicesPlugin::convertToWideChar const char *  p  ) 
 

A helper method to convert a std char array into a wchar array

Definition at line 513 of file omgmodellerwebservicesplugin.cpp.

Referenced by createModel(), and projectModel().

QString OmgModellerWebServicesPlugin::createModel OmgModel theModel  )  [virtual]
 

Create an initial model definition

Parameters:
OmgModel pointer to the model object that will be used as a basis for the mode

Implements OmgModellerPluginInterface.

Definition at line 61 of file omgmodellerwebservicesplugin.cpp.

References convertToWideChar(), OmgPluginMessenger::emitModelCreationProgress(), OmgPluginMessenger::emitModelError(), OmgPluginMessenger::emitModelMessage(), getSoapConnection(), and SLEEP_INTERVAL.

Here is the call graph for this function:

void OmgModellerWebServicesPlugin::error QString   )  [signal]
 

const QStringList OmgModellerWebServicesPlugin::getAlgorithmList  )  [virtual]
 

Get a list of the algorithm names. Use getAlgorithmId with one of the returned names to find out an algs id

Returns:
QStringList A String List of the algorithm names

Implements OmgModellerPluginInterface.

Definition at line 405 of file omgmodellerwebservicesplugin.cpp.

References getAlgorithmSet(), and OmgAlgorithmSet::nameList().

Referenced by OmgModellerWebServicesPluginTest::getAlgorithms().

Here is the call graph for this function:

const OmgAlgorithmSet OmgModellerWebServicesPlugin::getAlgorithmSet  )  [virtual]
 

Get a collection of algorithm objects in the form of an AgorithmSet. The collection represents every algorithm that is available from the plugin implementing this interface

Returns:
OmgAlgorithmSet - a set of algorithms

Implements OmgModellerPluginInterface.

Definition at line 414 of file omgmodellerwebservicesplugin.cpp.

References Omgui::createTextFile(), OmgPluginMessenger::emitError(), OmgAlgorithmSet::fromXml(), getSoapConnection(), OmgAlgorithmSet::setDescription(), OmgAlgorithmSet::setName(), and Omgui::xmlEncodeAmpersands().

Referenced by getAlgorithmList().

Here is the call graph for this function:

const QString OmgModellerWebServicesPlugin::getLayers QString  theBaseDir  )  [virtual]
 

Get a list of layers by recursively searching a directory heirachy and testing if each file is a gdal loadable file or not. The actual implementation of how this is done is up to the plugin - remote services may have a preconfigured list of available layers that is simply returned without any filesystem scanning.

Parameters:
baseDirectory This is the directory from which to start scanning. This parameter may be ignored by the plugin if the remote resource does not support user specified base directories. In the case of the web services plugin the parameter is ignored.
Returns:
QString An xml document providing teh list of available layers.

Implements OmgModellerPluginInterface.

Definition at line 449 of file omgmodellerwebservicesplugin.cpp.

References getSoapConnection().

Referenced by OmgModellerWebServicesPluginTest::getLayers().

Here is the call graph for this function:

const QString OmgModellerWebServicesPlugin::getName  )  [inline, virtual]
 

Get the user friendly name for this plugin

Returns:
QString - the name of this plugin *

Implements OmgModellerPluginInterface.

Definition at line 86 of file omgmodellerwebservicesplugin.h.

Referenced by OmgModellerWebServicesPluginTest::getName().

struct soap * OmgModellerWebServicesPlugin::getSoapConnection  ) 
 

Definition at line 484 of file omgmodellerwebservicesplugin.cpp.

Referenced by createModel(), getAlgorithmSet(), getLayers(), and projectModel().

bool OmgModellerWebServicesPlugin::initialise  )  [private]
 

Private method called by any ctor on initial start up. It will go and find the algorithm list etc.

Definition at line 54 of file omgmodellerwebservicesplugin.cpp.

Referenced by OmgModellerWebServicesPlugin().

void OmgModellerWebServicesPlugin::logMessageUpdated QString  theMessage  )  [signal]
 

Notifies any listeners of an updated log message from openmodeller.

Parameters:
theMessage The message received by the log callback

void OmgModellerWebServicesPlugin::modelDone QString  theFileName  )  [signal]
 

Notifies any listeners that the currently running model is finished

Parameters:
theFilename of the completed model. If the model was executed on a remote server the plugin will ensure that it is copied to the local file system first.
*

void OmgModellerWebServicesPlugin::modelProgressUpdate int  theProgress  )  [signal]
 

Notifies any listeners how far the current model has progressed (progress is expressed as a percentage)

Parameters:
theProgress 

void OmgModellerWebServicesPlugin::projectModel OmgModel theModel  )  [virtual]
 

Project a model into a climate dataset. the model passed in as a parameter must have a valid model definition

Parameters:
OmgModel pointer to the model object that will be used to project this model.

Implements OmgModellerPluginInterface.

Definition at line 208 of file omgmodellerwebservicesplugin.cpp.

References convertToWideChar(), OmgPluginMessenger::emitModelError(), OmgPluginMessenger::emitModelMessage(), OmgPluginMessenger::emitModelProjectionProgress(), Omgui::getOutputFormatExtension(), getSoapConnection(), and SLEEP_INTERVAL.

Here is the call graph for this function:

OmgModellerWebServicesPlugin::Q_INTERFACES OmgModellerPluginInterface   )  [private]
 


Member Data Documentation

int OmgModellerWebServicesPlugin::mMapProgress [private]
 

Definition at line 124 of file omgmodellerwebservicesplugin.h.

int OmgModellerWebServicesPlugin::mModelProgress [private]
 

Definition at line 123 of file omgmodellerwebservicesplugin.h.


The documentation for this class was generated from the following files:
Generated on Mon Apr 28 15:13:51 2008 for openModellerDesktop by  doxygen 1.4.1-20050210