Ejemplo n.º 1
0

import sys
import getopt

from datetime import datetime
from urllib2 import HTTPError

from lds.TransferProcessor import TransferProcessor
from lds.TransferProcessor import InputMisconfigurationException
from lds.VersionUtilities import AppVersion, VersionChecker, UnsupportedVersionException
from lds.DataStore import DSReaderException
from lds.LDSUtilities import LDSUtilities
from lds.ConfigConnector import DatasourceRegister

ldslog = LDSUtilities.setupLogging()

#ldslog = logging.getLogger('LDS')
#ldslog.setLevel(logging.DEBUG)
#
#path = os.path.normpath(os.path.join(os.path.dirname(__file__), "../../log/"))
#if not os.path.exists(path):
#    os.mkdir(path)
#df = os.path.join(path,"debug.log")
#
#fh = logging.FileHandler(df,'a')
#fh.setLevel(logging.DEBUG)
#
#formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(module)s %(lineno)d - %(message)s')
#fh.setFormatter(formatter)
#ldslog.addHandler(fh)
Ejemplo n.º 2
0
    pass


class ConnectionConfigurationException(Exception):
    pass


class UserConfigInitialisationException(Exception):
    pass


class LayerConfigInitialisationException(Exception):
    pass


ldslog = LU.setupLogging()

__version__ = AppVersion.getVersion()

HCOLS = 2

#Notes:
#MS and PG settings entered in these dialogs are saved to config only
#When a new FGDB directory is set in the file dialog using the NewFolder button a new directory is created and a reference added to the user config
#When a new SLITE file is created by entering its name in the SL file dialog, it isnt created but a reference to it is put in the user config file


class ConfigConnector(object):

    SRCNAME = 'WFS'
Ejemplo n.º 3
0
@author: jramsay
'''
import unittest
import os
import sys
import time
import subprocess

sys.path.append('..')

from lds.LDSUtilities import LDSUtilities

from lds.LDSDataStore import LDSDataStore

testlog = LDSUtilities.setupLogging(ff=2)


class Test_1_DataStore(unittest.TestCase):
    
    UCONF = 'TEST'
    LGVAL = 'v:x100'
    DESTNAME = 'PostgreSQL'
    
    def setUp(self):
        testlog.debug('LDSDataStore_Test.setUp')
        self.ldsdatastore = LDSDataStore(None,self.UCONF)    
        
    def tearDown(self):
        testlog.debug('LDSDataStore_Test.tearDown')
        
Ejemplo n.º 4
0
import os

from lds.DataStore import DSReaderException, DatasourceConnectException, DatasourceOpenException, DatasourcePrivilegeException
from lds.WFSDataStore import WFSDataStore
from lds.LDSDataStore import LDSDataStore
from lds.ReadConfig import GUIPrefsReader, MainFileReader
from lds.LDSUtilities import LDSUtilities as LU
from lds.VersionUtilities import AppVersion

from lds.PostgreSQLDataStore import PostgreSQLDataStore
from lds.MSSQLSpatialDataStore import MSSQLSpatialDataStore
from lds.FileGDBDataStore import FileGDBDataStore
from lds.SpatiaLiteDataStore import SpatiaLiteDataStore


ldslog = LU.setupLogging()

__version__ = AppVersion.getVersion()

#Notes:
#MS and PG settings entered in these dialogs are saved to config only
#When a new FGDB directory is set in the file dialog using the NewFolder button a new directory is created and a reference added to the user config
#When a new SLITE file is created by entering its name in the SL file dialog, it isnt created but a reference to it is put in the user config file
       
class LDSConfigWizard(QWizard):
    
    def __init__(self, uchint=None, sechint=None, parent=None):
        super(LDSConfigWizard, self).__init__(parent)
        self.parent = parent
        self.uchint = uchint
        self.sechint = sechint
Ejemplo n.º 5
0
@author: jramsay
'''
import unittest
import os
import sys
import time
import subprocess

sys.path.append('..')

from lds.LDSUtilities import LDSUtilities

from lds.RequestBuilder import RequestBuilder

testlog = LDSUtilities.setupLogging(ff=2)


class Test_1_RequestBuilder(unittest.TestCase):
    
    UCONF = 'TEST'
    LGVAL = 'v:x100'
    DESTNAME = 'PostgreSQL'
    
    PARAMS100 = ['http://wfs.data.linz.govt.nz/', 'aaaa1111bbbb2222cccc3333dddd4444', 'WFS', '1.0.0', 'GML2', '']
    PARAMS110 = ['http://wfs.data.linz.govt.nz/', '1111bbbb2222cccc3333dddd4444eeee', 'WFS', '1.1.0', 'GML2', '']
    PARAMS200 = ['http://wfs.data.linz.govt.nz/', 'bbbb2222cccc3333dddd4444eeee5555', 'WFS', '2.0.0', 'GML2', '']
    
    def setUp(self):
        testlog.debug('LDSDataStore_Test.setUp')