void PostgresqlModule::prepare() { PostgresqlObjectFactory *factory = new PostgresqlObjectFactory(); factory->prepare(); kernel()->addFactory(factory); ConnectorFactory *cfactory = kernel()->factory<ConnectorFactory>("ilwis::ConnectorFactory"); if (!cfactory) return ; cfactory->addCreator("table", "postgresql", PostgresqlTableConnector::create); cfactory->addCreator("simplefeatures", "postgresql", PostgresqlFeatureConnector::create); cfactory->addCreator("map", "postgresql", PostgresqlRasterConnector::create); cfactory->addCreator(itTABLE, "postgresql", PostgresqlTableConnector::create); cfactory->addCreator(itFEATURE, "postgresql", PostgresqlFeatureConnector::create); cfactory->addCreator(itRASTER, "postgresql", PostgresqlRasterConnector::create); cfactory->addCreator(itCATALOG, "postgresql", CatalogConnector::create); kernel()->issues()->log("Loaded Postgresql Module", IssueObject::itMessage); }
void PostgresqlModule::prepare() { PostgresqlObjectFactory *factory = new PostgresqlObjectFactory(); factory->prepare(); kernel()->addFactory(factory); ConnectorFactory *cfactory = kernel()->factory<ConnectorFactory>("ilwis::ConnectorFactory"); if (!cfactory) return ; cfactory->addCreator("table", "postgresql", PostgresqlTableConnector::create); cfactory->addCreator("simplefeatures", "postgresql", PostgresqlFeatureConnector::create); cfactory->addCreator("map", "postgresql", PostgresqlRasterConnector::create); cfactory->addCreator(itTABLE, "postgresql", PostgresqlTableConnector::create); cfactory->addCreator(itFEATURE, "postgresql", PostgresqlFeatureConnector::create); cfactory->addCreator(itRASTER, "postgresql", PostgresqlRasterConnector::create); cfactory->addCreator(itCATALOG, "postgresql", CatalogConnector::create); QFileInfo ilw = context()->ilwisFolder(); QString path = ilw.canonicalFilePath() + "/extensions/postgresqlconnector/resources"; DataFormat::setFormatInfo(path + "/postgresformats.config","postgresql"); kernel()->issues()->log("Loaded Postgresql Module", IssueObject::itMessage); }