Merge pull request #311 from ckan/Zharktas-patch-1

Use csw2 from owslib
This commit is contained in:
Adrià Mercader 2023-10-31 13:28:56 +01:00 committed by GitHub
commit 7d39faa027
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,7 @@ class CswService(OwsService):
"""
Perform various operations on a CSW service
"""
from owslib.csw import CatalogueServiceWeb as _Implementation
from owslib.catalogue.csw2 import CatalogueServiceWeb as _Implementation
def __init__(self, endpoint=None):
super(CswService, self).__init__(endpoint)
@ -74,7 +74,7 @@ class CswService(OwsService):
def getrecords(self, qtype=None, keywords=[],
typenames="csw:Record", esn="brief",
skip=0, count=10, outputschema="gmd", **kw):
from owslib.csw import namespaces
from owslib.catalogue.csw2 import namespaces
constraints = []
csw = self._ows(**kw)
@ -102,7 +102,7 @@ class CswService(OwsService):
def getidentifiers(self, qtype=None, typenames="csw:Record", esn="brief",
keywords=[], limit=None, page=10, outputschema="gmd",
startposition=0, cql=None, **kw):
from owslib.csw import namespaces
from owslib.catalogue.csw2 import namespaces
constraints = []
csw = self._ows(**kw)
@ -154,7 +154,7 @@ class CswService(OwsService):
kwa["startposition"] = startposition
def getrecordbyid(self, ids=[], esn="full", outputschema="gmd", **kw):
from owslib.csw import namespaces
from owslib.catalogue.csw2 import namespaces
csw = self._ows(**kw)
kwa = {
"esn": esn,