Skip to content

Commit

Permalink
[processing] refactoring to put all algorithm providers under a singl…
Browse files Browse the repository at this point in the history
…e module
  • Loading branch information
volaya committed Apr 19, 2014
1 parent 7ae6a63 commit 9b277cb
Show file tree
Hide file tree
Showing 1,187 changed files with 521 additions and 3,847 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/ProcessingPlugin.py
Expand Up @@ -38,7 +38,7 @@
from processing.gui.ConfigDialog import ConfigDialog
from processing.gui.ResultsDialog import ResultsDialog
from processing.modeler.ModelerDialog import ModelerDialog
from processing.commander.CommanderWindow import CommanderWindow
from processing.gui.CommanderWindow import CommanderWindow
from processing.tools import dataobjects
from processing.tools.system import *
import processing.resources_rc
Expand Down
188 changes: 0 additions & 188 deletions python/plugins/processing/algs/QGISAlgorithmProvider.py

This file was deleted.

Expand Up @@ -29,16 +29,14 @@
from PyQt4 import QtGui

from processing.core.AlgorithmProvider import AlgorithmProvider
from processing.admintools.PostGISExecuteSQL import PostGISExecuteSQL
from processing.admintools.ImportIntoPostGIS import ImportIntoPostGIS
from processing.admintools.ImportVectorIntoGeoServer import \
ImportVectorIntoGeoServer
from processing.admintools.CreateWorkspace import CreateWorkspace
from processing.admintools.ImportRasterIntoGeoServer import \
ImportRasterIntoGeoServer
from processing.admintools.DeleteWorkspace import DeleteWorkspace
from processing.admintools.DeleteDatastore import DeleteDatastore
from processing.admintools.CreateStyleGeoServer import CreateStyleGeoServer
from PostGISExecuteSQL import PostGISExecuteSQL
from ImportIntoPostGIS import ImportIntoPostGIS
from ImportVectorIntoGeoServer import ImportVectorIntoGeoServer
from CreateWorkspace import CreateWorkspace
from ImportRasterIntoGeoServer import ImportRasterIntoGeoServer
from DeleteWorkspace import DeleteWorkspace
from DeleteDatastore import DeleteDatastore
from CreateStyleGeoServer import CreateStyleGeoServer


class AdminToolsAlgorithmProvider(AlgorithmProvider):
Expand Down Expand Up @@ -74,7 +72,7 @@ def getDescription(self):

def getIcon(self):
return QtGui.QIcon(os.path.dirname(__file__)
+ '/../images/database.png')
+ '/../../images/database.png')

def _loadAlgorithms(self):
self.algs = self.alglist
Expand Down
Expand Up @@ -25,7 +25,7 @@

import os
from qgis.core import *
from processing.admintools.GeoServerToolsAlgorithm import \
from GeoServerToolsAlgorithm import \
GeoServerToolsAlgorithm
from processing.parameters.ParameterVector import ParameterVector
from processing.parameters.ParameterString import ParameterString
Expand Down
Expand Up @@ -26,7 +26,7 @@
__revision__ = '$Format:%H$'

from qgis.core import *
from processing.admintools.GeoServerToolsAlgorithm import \
from GeoServerToolsAlgorithm import \
GeoServerToolsAlgorithm
from processing.parameters.ParameterString import ParameterString
from processing.parameters.ParameterFile import ParameterFile
Expand Down
Expand Up @@ -26,7 +26,7 @@
__revision__ = '$Format:%H$'

from qgis.core import *
from processing.admintools.GeoServerToolsAlgorithm import \
from GeoServerToolsAlgorithm import \
GeoServerToolsAlgorithm
from processing.parameters.ParameterString import ParameterString
from processing.outputs.OutputString import OutputString
Expand Down
Expand Up @@ -26,7 +26,7 @@
__revision__ = '$Format:%H$'

from qgis.core import *
from processing.admintools.GeoServerToolsAlgorithm import \
from GeoServerToolsAlgorithm import \
GeoServerToolsAlgorithm
from processing.parameters.ParameterString import ParameterString

Expand Down
Expand Up @@ -26,7 +26,7 @@
__revision__ = '$Format:%H$'

from qgis.core import *
from processing.admintools.GeoServerToolsAlgorithm import \
from GeoServerToolsAlgorithm import \
GeoServerToolsAlgorithm
from processing.parameters.ParameterString import ParameterString

Expand Down
Expand Up @@ -29,7 +29,7 @@
from PyQt4 import QtGui
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.parameters.ParameterString import ParameterString
from processing.admintools.geoserver.catalog import Catalog
from geoserver.catalog import Catalog


class GeoServerToolsAlgorithm(GeoAlgorithm):
Expand All @@ -40,7 +40,7 @@ class GeoServerToolsAlgorithm(GeoAlgorithm):

def getIcon(self):
return QtGui.QIcon(os.path.dirname(__file__)
+ '/../images/geoserver.png')
+ '/../../images/geoserver.png')

def addBaseParameters(self):
self.addParameter(ParameterString(self.URL, 'URL',
Expand Down
Expand Up @@ -37,8 +37,7 @@
from processing.parameters.ParameterString import ParameterString
from processing.parameters.ParameterSelection import ParameterSelection
from processing.tools import dataobjects

from processing.admintools import postgis_utils
import postgis_utils


class ImportIntoPostGIS(GeoAlgorithm):
Expand All @@ -53,7 +52,7 @@ class ImportIntoPostGIS(GeoAlgorithm):
LOWERCASE_NAMES = 'LOWERCASE_NAMES'

def getIcon(self):
return QIcon(os.path.dirname(__file__) + '/../images/postgis.png')
return QIcon(os.path.dirname(__file__) + '/../../images/postgis.png')

def processAlgorithm(self, progress):
connection = self.DB_CONNECTIONS[self.getParameterValue(self.DATABASE)]
Expand Down
Expand Up @@ -26,7 +26,7 @@
__revision__ = '$Format:%H$'

from qgis.core import *
from processing.admintools.GeoServerToolsAlgorithm import \
from GeoServerToolsAlgorithm import \
GeoServerToolsAlgorithm
from processing.parameters.ParameterString import ParameterString
from processing.parameters.ParameterRaster import ParameterRaster
Expand Down
Expand Up @@ -27,7 +27,7 @@

import os
from qgis.core import *
from processing.admintools.GeoServerToolsAlgorithm import \
from GeoServerToolsAlgorithm import \
GeoServerToolsAlgorithm
from processing.parameters.ParameterVector import ParameterVector
from processing.parameters.ParameterString import ParameterString
Expand Down
Expand Up @@ -33,7 +33,7 @@
from processing.core.GeoAlgorithmExecutionException import \
GeoAlgorithmExecutionException
from processing.parameters.ParameterString import ParameterString
from processing.admintools import postgis_utils
import postgis_utils


class PostGISExecuteSQL(GeoAlgorithm):
Expand All @@ -42,7 +42,7 @@ class PostGISExecuteSQL(GeoAlgorithm):
SQL = 'SQL'

def getIcon(self):
return QIcon(os.path.dirname(__file__) + '/../images/postgis.png')
return QIcon(os.path.dirname(__file__) + '/../../images/postgis.png')

def processAlgorithm(self, progress):

Expand Down
Expand Up @@ -32,19 +32,16 @@
from xml.parsers.expat import ExpatError
from urlparse import urlparse

from processing.admintools.geoserver.layer import Layer
from processing.admintools.geoserver.style import Style
from processing.admintools.geoserver.store import coveragestore_from_index, \
from layer import Layer
from style import Style
from store import coveragestore_from_index, \
datastore_from_index, UnsavedDataStore, UnsavedCoverageStore
from processing.admintools.geoserver.support import prepare_upload_bundle, url
from processing.admintools.geoserver.layergroup import LayerGroup, \
from support import prepare_upload_bundle, url
from layergroup import LayerGroup, \
UnsavedLayerGroup
from processing.admintools.geoserver.workspace import workspace_from_index, \
from workspace import workspace_from_index, \
Workspace
try:
from processing.admintools import httplib2
except ImportError:
import httplib2
from processing.algs.admintools import httplib2


logger = logging.getLogger('gsconfig.catalog')
Expand Down
Expand Up @@ -25,8 +25,8 @@

__revision__ = '$Format:%H$'

from processing.admintools.geoserver.style import Style
from processing.admintools.geoserver.support import ResourceInfo, \
from style import Style
from support import ResourceInfo, \
xml_property, write_bool, url


Expand Down
Expand Up @@ -25,7 +25,7 @@

__revision__ = '$Format:%H$'

from processing.admintools.geoserver.support import ResourceInfo, bbox, \
from support import ResourceInfo, bbox, \
write_bbox, write_string, xml_property, url


Expand Down

0 comments on commit 9b277cb

Please sign in to comment.