geonode-pycsw 3.0.0b2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- geonode_pycsw-3.0.0b2.dist-info/METADATA +73 -0
- geonode_pycsw-3.0.0b2.dist-info/RECORD +382 -0
- geonode_pycsw-3.0.0b2.dist-info/WHEEL +5 -0
- geonode_pycsw-3.0.0b2.dist-info/entry_points.txt +2 -0
- geonode_pycsw-3.0.0b2.dist-info/licenses/LICENSE.txt +26 -0
- geonode_pycsw-3.0.0b2.dist-info/top_level.txt +1 -0
- pycsw/__init__.py +33 -0
- pycsw/core/__init__.py +29 -0
- pycsw/core/admin.py +703 -0
- pycsw/core/config.py +621 -0
- pycsw/core/etree.py +43 -0
- pycsw/core/formats/__init__.py +29 -0
- pycsw/core/formats/fmt_json.py +69 -0
- pycsw/core/log.py +71 -0
- pycsw/core/metadata.py +1996 -0
- pycsw/core/pygeofilter_evaluate.py +83 -0
- pycsw/core/repository.py +941 -0
- pycsw/core/schemas/ogc/cat/csw/3.0/_wrapper.xsd +14 -0
- pycsw/core/schemas/ogc/cat/csw/3.0/cswAll.xsd +33 -0
- pycsw/core/schemas/ogc/cat/csw/3.0/cswCommon.xsd +71 -0
- pycsw/core/schemas/ogc/cat/csw/3.0/cswGetCapabilities.xsd +80 -0
- pycsw/core/schemas/ogc/cat/csw/3.0/cswGetDomain.xsd +146 -0
- pycsw/core/schemas/ogc/cat/csw/3.0/cswGetRecordById.xsd +58 -0
- pycsw/core/schemas/ogc/cat/csw/3.0/cswGetRecords.xsd +391 -0
- pycsw/core/schemas/ogc/cat/csw/3.0/cswHarvest.xsd +95 -0
- pycsw/core/schemas/ogc/cat/csw/3.0/cswTransaction.xsd +187 -0
- pycsw/core/schemas/ogc/cat/csw/3.0/cswUnHarvest.xsd +77 -0
- pycsw/core/schemas/ogc/cat/csw/3.0/rec-dcmes.xsd +245 -0
- pycsw/core/schemas/ogc/cat/csw/3.0/rec-dcterms.xsd +101 -0
- pycsw/core/schemas/ogc/cat/csw/3.0/record.xsd +170 -0
- pycsw/core/schemas/ogc/csw/2.0.2/CSW-discovery.xsd +494 -0
- pycsw/core/schemas/ogc/csw/2.0.2/CSW-publication.xsd +242 -0
- pycsw/core/schemas/ogc/csw/2.0.2/rec-dcmes.xsd +199 -0
- pycsw/core/schemas/ogc/csw/2.0.2/rec-dcterms.xsd +94 -0
- pycsw/core/schemas/ogc/csw/2.0.2/record.xsd +138 -0
- pycsw/core/schemas/ogc/filter/1.1.0/expr.xsd +67 -0
- pycsw/core/schemas/ogc/filter/1.1.0/filter.xsd +265 -0
- pycsw/core/schemas/ogc/filter/1.1.0/filterCapabilities.xsd +171 -0
- pycsw/core/schemas/ogc/filter/1.1.0/sort.xsd +46 -0
- pycsw/core/schemas/ogc/filter/2.0/_wrapper.xsd +5 -0
- pycsw/core/schemas/ogc/filter/2.0/expr.xsd +44 -0
- pycsw/core/schemas/ogc/filter/2.0/filter.xsd +396 -0
- pycsw/core/schemas/ogc/filter/2.0/filterAll.xsd +23 -0
- pycsw/core/schemas/ogc/filter/2.0/filterCapabilities.xsd +286 -0
- pycsw/core/schemas/ogc/filter/2.0/query.xsd +70 -0
- pycsw/core/schemas/ogc/filter/2.0/sort.xsd +49 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/basicTypes.xsd +278 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/coordinateOperations.xsd +789 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/coordinateReferenceSystems.xsd +429 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/coordinateSystems.xsd +408 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/coverage.xsd +451 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/dataQuality.xsd +129 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/datums.xsd +484 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/defaultStyle.xsd +454 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/dictionary.xsd +137 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/direction.xsd +72 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/dynamicFeature.xsd +115 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/feature.xsd +199 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/geometryAggregates.xsd +430 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/geometryBasic0d1d.xsd +602 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/geometryBasic2d.xsd +213 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/geometryComplexes.xsd +141 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/geometryPrimitives.xsd +1609 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/gml.xsd +22 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/gmlBase.xsd +294 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/grids.xsd +76 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/measures.xsd +200 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/observation.xsd +96 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/referenceSystems.xsd +211 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/temporal.xsd +332 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/temporalReferenceSystems.xsd +251 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/temporalTopology.xsd +186 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/topology.xsd +459 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/units.xsd +170 -0
- pycsw/core/schemas/ogc/gml/3.1.1/base/valueObjects.xsd +361 -0
- pycsw/core/schemas/ogc/gml/3.1.1/smil/smil20-language.xsd +117 -0
- pycsw/core/schemas/ogc/gml/3.1.1/smil/smil20.xsd +234 -0
- pycsw/core/schemas/ogc/gml/3.2.1/basicTypes.xsd +268 -0
- pycsw/core/schemas/ogc/gml/3.2.1/coordinateOperations.xsd +525 -0
- pycsw/core/schemas/ogc/gml/3.2.1/coordinateReferenceSystems.xsd +373 -0
- pycsw/core/schemas/ogc/gml/3.2.1/coordinateSystems.xsd +297 -0
- pycsw/core/schemas/ogc/gml/3.2.1/coverage.xsd +292 -0
- pycsw/core/schemas/ogc/gml/3.2.1/datums.xsd +287 -0
- pycsw/core/schemas/ogc/gml/3.2.1/defaultStyle.xsd +453 -0
- pycsw/core/schemas/ogc/gml/3.2.1/deprecatedTypes.xsd +1133 -0
- pycsw/core/schemas/ogc/gml/3.2.1/dictionary.xsd +90 -0
- pycsw/core/schemas/ogc/gml/3.2.1/direction.xsd +84 -0
- pycsw/core/schemas/ogc/gml/3.2.1/dynamicFeature.xsd +109 -0
- pycsw/core/schemas/ogc/gml/3.2.1/feature.xsd +94 -0
- pycsw/core/schemas/ogc/gml/3.2.1/geometryAggregates.xsd +197 -0
- pycsw/core/schemas/ogc/gml/3.2.1/geometryBasic0d1d.xsd +277 -0
- pycsw/core/schemas/ogc/gml/3.2.1/geometryBasic2d.xsd +124 -0
- pycsw/core/schemas/ogc/gml/3.2.1/geometryComplexes.xsd +95 -0
- pycsw/core/schemas/ogc/gml/3.2.1/geometryPrimitives.xsd +846 -0
- pycsw/core/schemas/ogc/gml/3.2.1/gml.xsd +20 -0
- pycsw/core/schemas/ogc/gml/3.2.1/gmlBase.xsd +185 -0
- pycsw/core/schemas/ogc/gml/3.2.1/grids.xsd +64 -0
- pycsw/core/schemas/ogc/gml/3.2.1/measures.xsd +68 -0
- pycsw/core/schemas/ogc/gml/3.2.1/observation.xsd +95 -0
- pycsw/core/schemas/ogc/gml/3.2.1/referenceSystems.xsd +70 -0
- pycsw/core/schemas/ogc/gml/3.2.1/temporal.xsd +269 -0
- pycsw/core/schemas/ogc/gml/3.2.1/temporalReferenceSystems.xsd +189 -0
- pycsw/core/schemas/ogc/gml/3.2.1/temporalTopology.xsd +119 -0
- pycsw/core/schemas/ogc/gml/3.2.1/topology.xsd +386 -0
- pycsw/core/schemas/ogc/gml/3.2.1/units.xsd +162 -0
- pycsw/core/schemas/ogc/gml/3.2.1/valueObjects.xsd +205 -0
- pycsw/core/schemas/ogc/ogcapi/records/part1/1.0/ogcapi-records-1.yaml +932 -0
- pycsw/core/schemas/ogc/ows/1.0.0/ows19115subset.xsd +222 -0
- pycsw/core/schemas/ogc/ows/1.0.0/owsAll.xsd +20 -0
- pycsw/core/schemas/ogc/ows/1.0.0/owsCommon.xsd +155 -0
- pycsw/core/schemas/ogc/ows/1.0.0/owsDataIdentification.xsd +112 -0
- pycsw/core/schemas/ogc/ows/1.0.0/owsExceptionReport.xsd +67 -0
- pycsw/core/schemas/ogc/ows/1.0.0/owsGetCapabilities.xsd +108 -0
- pycsw/core/schemas/ogc/ows/1.0.0/owsOperationsMetadata.xsd +161 -0
- pycsw/core/schemas/ogc/ows/1.0.0/owsServiceIdentification.xsd +55 -0
- pycsw/core/schemas/ogc/ows/1.0.0/owsServiceProvider.xsd +46 -0
- pycsw/core/schemas/ogc/ows/1.1.0/ows19115subset.xsd +236 -0
- pycsw/core/schemas/ogc/ows/1.1.0/owsAll.xsd +23 -0
- pycsw/core/schemas/ogc/ows/1.1.0/owsCommon.xsd +158 -0
- pycsw/core/schemas/ogc/ows/1.1.0/owsContents.xsd +87 -0
- pycsw/core/schemas/ogc/ows/1.1.0/owsDataIdentification.xsd +128 -0
- pycsw/core/schemas/ogc/ows/1.1.0/owsDomainType.xsd +280 -0
- pycsw/core/schemas/ogc/ows/1.1.0/owsExceptionReport.xsd +77 -0
- pycsw/core/schemas/ogc/ows/1.1.0/owsGetCapabilities.xsd +113 -0
- pycsw/core/schemas/ogc/ows/1.1.0/owsGetResourceByID.xsd +52 -0
- pycsw/core/schemas/ogc/ows/1.1.0/owsInputOutputData.xsd +60 -0
- pycsw/core/schemas/ogc/ows/1.1.0/owsManifest.xsd +125 -0
- pycsw/core/schemas/ogc/ows/1.1.0/owsOperationsMetadata.xsd +141 -0
- pycsw/core/schemas/ogc/ows/1.1.0/owsServiceIdentification.xsd +61 -0
- pycsw/core/schemas/ogc/ows/1.1.0/owsServiceProvider.xsd +48 -0
- pycsw/core/schemas/ogc/ows/2.0/ows19115subset.xsd +364 -0
- pycsw/core/schemas/ogc/ows/2.0/owsAdditionalParameters.xsd +114 -0
- pycsw/core/schemas/ogc/ows/2.0/owsAll.xsd +29 -0
- pycsw/core/schemas/ogc/ows/2.0/owsCommon.xsd +275 -0
- pycsw/core/schemas/ogc/ows/2.0/owsContents.xsd +163 -0
- pycsw/core/schemas/ogc/ows/2.0/owsDataIdentification.xsd +202 -0
- pycsw/core/schemas/ogc/ows/2.0/owsDomainType.xsd +388 -0
- pycsw/core/schemas/ogc/ows/2.0/owsExceptionReport.xsd +126 -0
- pycsw/core/schemas/ogc/ows/2.0/owsGetCapabilities.xsd +220 -0
- pycsw/core/schemas/ogc/ows/2.0/owsGetResourceByID.xsd +83 -0
- pycsw/core/schemas/ogc/ows/2.0/owsInputOutputData.xsd +98 -0
- pycsw/core/schemas/ogc/ows/2.0/owsManifest.xsd +181 -0
- pycsw/core/schemas/ogc/ows/2.0/owsOperationsMetadata.xsd +234 -0
- pycsw/core/schemas/ogc/ows/2.0/owsServiceIdentification.xsd +98 -0
- pycsw/core/schemas/ogc/ows/2.0/owsServiceProvider.xsd +64 -0
- pycsw/core/schemas/w3c/1999/xlink.xsd +271 -0
- pycsw/core/schemas/w3c/2001/xml.xsd +287 -0
- pycsw/core/util.py +552 -0
- pycsw/oaipmh.py +311 -0
- pycsw/ogc/__init__.py +29 -0
- pycsw/ogc/api/__init__.py +28 -0
- pycsw/ogc/api/oapi.py +558 -0
- pycsw/ogc/api/records.py +1414 -0
- pycsw/ogc/api/templates/_base.html +76 -0
- pycsw/ogc/api/templates/collection.html +44 -0
- pycsw/ogc/api/templates/collections.html +45 -0
- pycsw/ogc/api/templates/conformance.html +21 -0
- pycsw/ogc/api/templates/exception.html +8 -0
- pycsw/ogc/api/templates/item.html +228 -0
- pycsw/ogc/api/templates/items.html +337 -0
- pycsw/ogc/api/templates/landing_page.html +27 -0
- pycsw/ogc/api/templates/openapi.html +58 -0
- pycsw/ogc/api/templates/queryables.html +50 -0
- pycsw/ogc/api/templates/stac_items.html +173 -0
- pycsw/ogc/api/templates/static/favicon.ico +0 -0
- pycsw/ogc/api/templates/static/logo-horizontal.png +0 -0
- pycsw/ogc/api/templates/static/logo-vertical-darkbg.png +0 -0
- pycsw/ogc/api/util.py +252 -0
- pycsw/ogc/csw/__init__.py +29 -0
- pycsw/ogc/csw/cql.py +133 -0
- pycsw/ogc/csw/csw2.py +2042 -0
- pycsw/ogc/csw/csw3.py +2193 -0
- pycsw/ogc/fes/__init__.py +29 -0
- pycsw/ogc/fes/fes1.py +433 -0
- pycsw/ogc/fes/fes2.py +451 -0
- pycsw/ogc/gml/__init__.py +29 -0
- pycsw/ogc/gml/gml3.py +240 -0
- pycsw/ogc/gml/gml32.py +243 -0
- pycsw/opensearch.py +857 -0
- pycsw/plugins/__init__.py +29 -0
- pycsw/plugins/outputschemas/__init__.py +31 -0
- pycsw/plugins/outputschemas/atom.py +143 -0
- pycsw/plugins/outputschemas/datacite.py +375 -0
- pycsw/plugins/outputschemas/dif.py +213 -0
- pycsw/plugins/outputschemas/fgdc.py +180 -0
- pycsw/plugins/outputschemas/gm03.py +240 -0
- pycsw/plugins/profiles/__init__.py +29 -0
- pycsw/plugins/profiles/apiso/__init__.py +29 -0
- pycsw/plugins/profiles/apiso/apiso.py +757 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/csw/2.0.2/profiles/apiso/1.0.0/apiso.xsd +13 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gco/basicTypes.xsd +429 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gco/gco.xsd +12 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gco/gcoBase.xsd +61 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/applicationSchema.xsd +42 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/citation.xsd +275 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/constraints.xsd +106 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/content.xsd +188 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/dataQuality.xsd +554 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/distribution.xsd +202 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/extent.xsd +205 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/freeText.xsd +122 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/gmd.xsd +12 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/identification.xsd +348 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/maintenance.xsd +86 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/metadataApplication.xsd +175 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/metadataEntity.xsd +70 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/metadataExtension.xsd +99 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/portrayalCatalogue.xsd +36 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/referenceSystem.xsd +100 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmd/spatialRepresentation.xsd +237 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/basicTypes.xsd +267 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/coordinateOperations.xsd +639 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/coordinateReferenceSystems.xsd +526 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/coordinateSystems.xsd +401 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/coverage.xsd +462 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/datums.xsd +342 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/dictionary.xsd +129 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/direction.xsd +80 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/dynamicFeature.xsd +142 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/feature.xsd +215 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/geometryAggregates.xsd +216 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/geometryBasic0d1d.xsd +304 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/geometryBasic2d.xsd +123 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/geometryComplexes.xsd +89 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/geometryPrimitives.xsd +892 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/gml.xsd +14 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/gmlBase.xsd +305 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/grids.xsd +58 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/measures.xsd +167 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/observation.xsd +90 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/referenceSystems.xsd +69 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/temporal.xsd +263 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/temporalReferenceSystems.xsd +183 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/temporalTopology.xsd +124 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/topology.xsd +372 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/units.xsd +156 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gml/valueObjects.xsd +212 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmx/catalogues.xsd +112 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmx/codelistItem.xsd +168 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmx/crsItem.xsd +1030 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmx/extendedTypes.xsd +75 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmx/gmx.xsd +2 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmx/gmxUsage.xsd +127 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gmx/uomItem.xsd +162 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gsr/gsr.xsd +12 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gsr/spatialReferencing.xsd +24 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gss/geometry.xsd +35 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gss/gss.xsd +12 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gts/gts.xsd +12 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/gts/temporalObjects.xsd +34 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/srv/serviceMetadata.xsd +197 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/srv/serviceModel.xsd +220 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20060504/srv/srv.xsd +13 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gco/basicTypes.xsd +431 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gco/gco.xsd +12 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gco/gcoBase.xsd +63 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/applicationSchema.xsd +43 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/citation.xsd +276 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/constraints.xsd +107 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/content.xsd +190 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/dataQuality.xsd +556 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/distribution.xsd +203 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/extent.xsd +206 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/freeText.xsd +123 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/gmd.xsd +12 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/identification.xsd +349 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/maintenance.xsd +87 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/metadataApplication.xsd +176 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/metadataEntity.xsd +71 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/metadataExtension.xsd +100 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/portrayalCatalogue.xsd +37 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/referenceSystem.xsd +101 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmd/spatialRepresentation.xsd +238 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmx/catalogues.xsd +113 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmx/codelistItem.xsd +169 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmx/crsItem.xsd +1031 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmx/extendedTypes.xsd +76 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmx/gmx.xsd +12 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmx/gmxUsage.xsd +128 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gmx/uomItem.xsd +163 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gsr/gsr.xsd +12 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gsr/spatialReferencing.xsd +25 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gss/geometry.xsd +36 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gss/gss.xsd +12 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gts/gts.xsd +12 -0
- pycsw/plugins/profiles/apiso/schemas/ogc/iso/19139/20070417/gts/temporalObjects.xsd +35 -0
- pycsw/plugins/profiles/ebrim/__init__.py +29 -0
- pycsw/plugins/profiles/ebrim/ebrim.py +174 -0
- pycsw/plugins/profiles/ebrim/schemas/ogc/csw/2.0.2/profiles/ebrim/1.0/csw-ebrim-iri.xsd +146 -0
- pycsw/plugins/profiles/ebrim/schemas/ogc/csw/2.0.2/profiles/ebrim/1.0/csw-ebrim.xsd +104 -0
- pycsw/plugins/profiles/iso19115p3/__init__.py +29 -0
- pycsw/plugins/profiles/iso19115p3/iso19115p3.py +854 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/cat/1.0/cat.xsd +13 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/cat/1.0/catalogues.xsd +53 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/cat/1.0/codelistItem.xsd +54 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/cat/1.0/crsItem.xsd +181 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/cat/1.0/uomItem.xsd +38 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/cit/1.0/cit.xsd +7 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/cit/1.0/citation.xsd +514 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/cit/2.0/cit.xsd +10 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/cit/2.0/citation.xsd +523 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/gco/1.0/baseTypes2014.xsd +530 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/gco/1.0/gco.xsd +16 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/gcx/1.0/extendedTypes.xsd +92 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/gcx/1.0/extendedTypes_autoFromShapeChange.xsd +60 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/gcx/1.0/gcx.xsd +8 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/gex/1.0/extent.xsd +241 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/gex/1.0/gex.xsd +9 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/gmw/1.0/gmlWrapperTypes2014.xsd +159 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/gmw/1.0/gmw.xsd +14 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/lan/1.0/lan.xsd +8 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/lan/1.0/language.xsd +140 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mac/1.0/acquisitionInformationImagery.xsd +622 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mac/1.0/mac.xsd +11 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mac/2.0/acquisitionInformationImagery.xsd +590 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mac/2.0/event.xsd +108 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mac/2.0/mac.xsd +10 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mas/1.0/applicationSchema.xsd +61 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mas/1.0/mas.xsd +9 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mcc/1.0/AbstractCommonClasses.xsd +358 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mcc/1.0/commonClasses.xsd +220 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mcc/1.0/mcc.xsd +8 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mco/1.0/constraints.xsd +188 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mco/1.0/mco.xsd +8 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/md1/1.0/md1.xsd +9 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/md1/1.0/metadataWExtendedType.xsd +4 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/md2/1.0/md2.xsd +15 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/md2/1.0/metadataWithExtensions.xsd +4 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mda/1.0/mda.xsd +8 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mda/1.0/metadataApplication.xsd +200 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mdb/1.0/mdb.xsd +14 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mdb/1.0/metadataBase.xsd +98 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mdb/2.0/mdb.xsd +20 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mdb/2.0/metadataBase.xsd +102 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mds/1.0/mds.xsd +22 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mds/1.0/metadataDataServices.xsd +4 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mdt/1.0/mdt.xsd +13 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mdt/1.0/metadataTransfer.xsd +111 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mex/1.0/metadataExtension.xsd +156 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mex/1.0/mex.xsd +8 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mmi/1.0/maintenance.xsd +76 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mmi/1.0/mmi.xsd +8 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mpc/1.0/mpc.xsd +8 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mpc/1.0/portrayalCatalogue.xsd +31 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrc/1.0/content.xsd +416 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrc/1.0/contentInformationImagery.xsd +185 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrc/1.0/mrc.xsd +11 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrc/2.0/content.xsd +419 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrc/2.0/contentInformationImagery.xsd +171 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrc/2.0/mrc.xsd +11 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrd/1.0/distribution.xsd +267 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrd/1.0/mrd.xsd +8 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mri/1.0/identification.xsd +517 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mri/1.0/mri.xsd +9 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrl/1.0/lineage.xsd +147 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrl/1.0/lineageImagery.xsd +236 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrl/1.0/mrl.xsd +9 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrl/2.0/lineage.xsd +147 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrl/2.0/lineageImagery.xsd +312 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrl/2.0/mrl.xsd +11 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrs/1.0/mrs.xsd +8 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/mrs/1.0/referenceSystem.xsd +47 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/msr/1.0/msr.xsd +10 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/msr/1.0/spatialRepresentation.xsd +375 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/msr/1.0/spatialRepresentationImagery.xsd +119 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/msr/2.0/msr.xsd +15 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/msr/2.0/spatialRepresentation.xsd +381 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/msr/2.0/spatialRepresentationImagery.xsd +120 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/srv/2.0/serviceInformation.xsd +272 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/srv/2.0/srv.xsd +6 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/srv/2.1/serviceInformation.xsd +278 -0
- pycsw/plugins/profiles/iso19115p3/schemas/ogc/iso/iso19115-3/srv/2.1/srv.xsd +6 -0
- pycsw/plugins/profiles/profile.py +141 -0
- pycsw/plugins/repository/__init__.py +29 -0
- pycsw/plugins/repository/odc/__init__.py +29 -0
- pycsw/plugins/repository/odc/odc.py +153 -0
- pycsw/server.py +938 -0
- pycsw/sru.py +217 -0
- pycsw/stac/__init__.py +29 -0
- pycsw/stac/api.py +571 -0
- pycsw/wsgi.py +233 -0
- pycsw/wsgi_flask.py +345 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# =================================================================
|
|
3
|
+
#
|
|
4
|
+
# Authors: Tom Kralidis <tomkralidis@gmail.com>
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2015 Tom Kralidis
|
|
7
|
+
#
|
|
8
|
+
# Permission is hereby granted, free of charge, to any person
|
|
9
|
+
# obtaining a copy of this software and associated documentation
|
|
10
|
+
# files (the "Software"), to deal in the Software without
|
|
11
|
+
# restriction, including without limitation the rights to use,
|
|
12
|
+
# copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
# copies of the Software, and to permit persons to whom the
|
|
14
|
+
# Software is furnished to do so, subject to the following
|
|
15
|
+
# conditions:
|
|
16
|
+
#
|
|
17
|
+
# The above copyright notice and this permission notice shall be
|
|
18
|
+
# included in all copies or substantial portions of the Software.
|
|
19
|
+
#
|
|
20
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
21
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
22
|
+
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
23
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
24
|
+
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
25
|
+
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
26
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
27
|
+
# OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
+
#
|
|
29
|
+
# =================================================================
|
pycsw/ogc/fes/fes1.py
ADDED
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# =================================================================
|
|
3
|
+
#
|
|
4
|
+
# Authors: Tom Kralidis <tomkralidis@gmail.com>
|
|
5
|
+
# Angelos Tzotsos <tzotsos@gmail.com>
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2024 Tom Kralidis
|
|
8
|
+
# Copyright (c) 2015 Angelos Tzotsos
|
|
9
|
+
#
|
|
10
|
+
# Permission is hereby granted, free of charge, to any person
|
|
11
|
+
# obtaining a copy of this software and associated documentation
|
|
12
|
+
# files (the "Software"), to deal in the Software without
|
|
13
|
+
# restriction, including without limitation the rights to use,
|
|
14
|
+
# copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
# copies of the Software, and to permit persons to whom the
|
|
16
|
+
# Software is furnished to do so, subject to the following
|
|
17
|
+
# conditions:
|
|
18
|
+
#
|
|
19
|
+
# The above copyright notice and this permission notice shall be
|
|
20
|
+
# included in all copies or substantial portions of the Software.
|
|
21
|
+
#
|
|
22
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
23
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
24
|
+
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
25
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
26
|
+
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
27
|
+
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
28
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
29
|
+
# OTHER DEALINGS IN THE SOFTWARE.
|
|
30
|
+
#
|
|
31
|
+
# =================================================================
|
|
32
|
+
|
|
33
|
+
import logging
|
|
34
|
+
|
|
35
|
+
from pycsw.core import util
|
|
36
|
+
from pycsw.core.etree import etree
|
|
37
|
+
from pycsw.ogc.gml import gml3
|
|
38
|
+
|
|
39
|
+
LOGGER = logging.getLogger(__name__)
|
|
40
|
+
|
|
41
|
+
MODEL = {
|
|
42
|
+
'GeometryOperands': {
|
|
43
|
+
'values': gml3.TYPES
|
|
44
|
+
},
|
|
45
|
+
'SpatialOperators': {
|
|
46
|
+
'values': ['BBOX', 'Beyond', 'Contains', 'Crosses', 'Disjoint',
|
|
47
|
+
'DWithin', 'Equals', 'Intersects', 'Overlaps', 'Touches', 'Within']
|
|
48
|
+
},
|
|
49
|
+
'ComparisonOperators': {
|
|
50
|
+
'ogc:PropertyIsBetween': {'opname': 'Between', 'opvalue': 'and'},
|
|
51
|
+
'ogc:PropertyIsEqualTo': {'opname': 'EqualTo', 'opvalue': '='},
|
|
52
|
+
'ogc:PropertyIsGreaterThan': {'opname': 'GreaterThan', 'opvalue': '>'},
|
|
53
|
+
'ogc:PropertyIsGreaterThanOrEqualTo': {
|
|
54
|
+
'opname': 'GreaterThanEqualTo', 'opvalue': '>='},
|
|
55
|
+
'ogc:PropertyIsLessThan': {'opname': 'LessThan', 'opvalue': '<'},
|
|
56
|
+
'ogc:PropertyIsLessThanOrEqualTo': {
|
|
57
|
+
'opname': 'LessThanEqualTo', 'opvalue': '<='},
|
|
58
|
+
'ogc:PropertyIsLike': {'opname': 'Like', 'opvalue': 'like'},
|
|
59
|
+
'ogc:PropertyIsNotEqualTo': {'opname': 'NotEqualTo', 'opvalue': '!='},
|
|
60
|
+
'ogc:PropertyIsNull': {'opname': 'NullCheck', 'opvalue': 'is null'},
|
|
61
|
+
},
|
|
62
|
+
'Functions': {
|
|
63
|
+
'length': {'args': '1'},
|
|
64
|
+
'lower': {'args': '1'},
|
|
65
|
+
'ltrim': {'args': '1'},
|
|
66
|
+
'rtrim': {'args': '1'},
|
|
67
|
+
'trim': {'args': '1'},
|
|
68
|
+
'upper': {'args': '1'},
|
|
69
|
+
},
|
|
70
|
+
'Ids': {
|
|
71
|
+
'values': ['EID', 'FID']
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def parse(element, queryables, dbtype, nsmap, orm='sqlalchemy', language='english', fts=False):
|
|
77
|
+
"""OGC Filter object support"""
|
|
78
|
+
|
|
79
|
+
boq = None
|
|
80
|
+
is_pg = dbtype.startswith('postgresql')
|
|
81
|
+
|
|
82
|
+
tmp = element.xpath('ogc:And|ogc:Or|ogc:Not', namespaces=nsmap)
|
|
83
|
+
if len(tmp) > 0: # this is binary logic query
|
|
84
|
+
element_name = etree.QName(tmp[0]).localname
|
|
85
|
+
boq = ' %s ' % element_name.lower()
|
|
86
|
+
LOGGER.debug('Binary logic detected; operator=%s', boq)
|
|
87
|
+
tmp = tmp[0]
|
|
88
|
+
else:
|
|
89
|
+
tmp = element
|
|
90
|
+
|
|
91
|
+
pvalue_serial = [0]
|
|
92
|
+
def assign_param():
|
|
93
|
+
if orm == 'django':
|
|
94
|
+
return '%s'
|
|
95
|
+
param = ':pvalue%d' % pvalue_serial[0]
|
|
96
|
+
pvalue_serial[0] += 1
|
|
97
|
+
return param
|
|
98
|
+
|
|
99
|
+
def _get_comparison_expression(elem):
|
|
100
|
+
"""return the SQL expression based on Filter query"""
|
|
101
|
+
fname = None
|
|
102
|
+
matchcase = elem.attrib.get('matchCase')
|
|
103
|
+
wildcard = elem.attrib.get('wildCard')
|
|
104
|
+
singlechar = elem.attrib.get('singleChar')
|
|
105
|
+
expression = None
|
|
106
|
+
|
|
107
|
+
if wildcard is None:
|
|
108
|
+
wildcard = '%'
|
|
109
|
+
|
|
110
|
+
if singlechar is None:
|
|
111
|
+
singlechar = '_'
|
|
112
|
+
|
|
113
|
+
if (elem.xpath('child::*')[0].tag ==
|
|
114
|
+
util.nspath_eval('ogc:Function', nsmap)):
|
|
115
|
+
LOGGER.debug('ogc:Function detected')
|
|
116
|
+
if (elem.xpath('child::*')[0].attrib['name'] not in
|
|
117
|
+
MODEL['Functions']):
|
|
118
|
+
raise RuntimeError('Invalid ogc:Function: %s' %
|
|
119
|
+
(elem.xpath('child::*')[0].attrib['name']))
|
|
120
|
+
fname = elem.xpath('child::*')[0].attrib['name']
|
|
121
|
+
|
|
122
|
+
try:
|
|
123
|
+
LOGGER.debug('Testing existence of ogc:PropertyName')
|
|
124
|
+
pname = queryables[elem.find(util.nspath_eval('ogc:Function/ogc:PropertyName', nsmap)).text]['dbcol']
|
|
125
|
+
except Exception as err:
|
|
126
|
+
raise RuntimeError('Invalid PropertyName: %s. %s' % (elem.find(util.nspath_eval('ogc:Function/ogc:PropertyName', nsmap)).text, str(err))) from err
|
|
127
|
+
|
|
128
|
+
else:
|
|
129
|
+
try:
|
|
130
|
+
LOGGER.debug('Testing existence of ogc:PropertyName')
|
|
131
|
+
pname = queryables[elem.find(
|
|
132
|
+
util.nspath_eval('ogc:PropertyName', nsmap)).text]['dbcol']
|
|
133
|
+
except Exception as err:
|
|
134
|
+
raise RuntimeError('Invalid PropertyName: %s. %s' %
|
|
135
|
+
(elem.find(util.nspath_eval('ogc:PropertyName',
|
|
136
|
+
nsmap)).text, str(err))) from err
|
|
137
|
+
|
|
138
|
+
if (elem.tag != util.nspath_eval('ogc:PropertyIsBetween', nsmap)):
|
|
139
|
+
if elem.tag in [util.nspath_eval('ogc:%s' % n, nsmap) for n in
|
|
140
|
+
MODEL['SpatialOperators']['values']]:
|
|
141
|
+
boolean_true = '\'true\''
|
|
142
|
+
boolean_false = '\'false\''
|
|
143
|
+
if dbtype == 'mysql':
|
|
144
|
+
boolean_true = 'true'
|
|
145
|
+
boolean_false = 'false'
|
|
146
|
+
|
|
147
|
+
return "%s = %s" % (_get_spatial_operator(queryables['pycsw:BoundingBox'], elem, dbtype, nsmap), boolean_true)
|
|
148
|
+
else:
|
|
149
|
+
pval = elem.find(util.nspath_eval('ogc:Literal', nsmap)).text
|
|
150
|
+
|
|
151
|
+
com_op = _get_comparison_operator(elem)
|
|
152
|
+
LOGGER.debug('Comparison operator: %s', com_op)
|
|
153
|
+
|
|
154
|
+
# if this is a case insensitive search
|
|
155
|
+
# then set the DB-specific LIKE comparison operator
|
|
156
|
+
|
|
157
|
+
LOGGER.debug('Setting csw:AnyText property')
|
|
158
|
+
|
|
159
|
+
anytext = queryables['csw:AnyText']['dbcol']
|
|
160
|
+
if ((matchcase is not None and matchcase == 'false') or
|
|
161
|
+
pname == anytext):
|
|
162
|
+
com_op = 'ilike' if is_pg else 'like'
|
|
163
|
+
|
|
164
|
+
if (elem.tag == util.nspath_eval('ogc:PropertyIsBetween', nsmap)):
|
|
165
|
+
com_op = 'between'
|
|
166
|
+
lower_boundary = elem.find(
|
|
167
|
+
util.nspath_eval('ogc:LowerBoundary/ogc:Literal',
|
|
168
|
+
nsmap)).text
|
|
169
|
+
upper_boundary = elem.find(
|
|
170
|
+
util.nspath_eval('ogc:UpperBoundary/ogc:Literal',
|
|
171
|
+
nsmap)).text
|
|
172
|
+
|
|
173
|
+
if pname == queryables['pycsw:CloudCover']:
|
|
174
|
+
LOGGER.debug("Casting queryables['pycsw:CloudCover'] as float")
|
|
175
|
+
pname = 'cast(%s as float)' % pname
|
|
176
|
+
|
|
177
|
+
expression = "%s %s %s and %s" % \
|
|
178
|
+
(pname, com_op, assign_param(), assign_param())
|
|
179
|
+
|
|
180
|
+
values.append(lower_boundary)
|
|
181
|
+
values.append(upper_boundary)
|
|
182
|
+
else:
|
|
183
|
+
if pname == anytext and is_pg and fts:
|
|
184
|
+
LOGGER.debug('PostgreSQL FTS specific search')
|
|
185
|
+
# do nothing, let FTS do conversion (#212)
|
|
186
|
+
pvalue = pval
|
|
187
|
+
else:
|
|
188
|
+
LOGGER.debug('PostgreSQL non-FTS specific search')
|
|
189
|
+
pvalue = pval.replace(wildcard, '%').replace(singlechar, '_')
|
|
190
|
+
|
|
191
|
+
if pname == anytext: # pad anytext with wildcards
|
|
192
|
+
LOGGER.debug('PostgreSQL non-FTS specific anytext search')
|
|
193
|
+
LOGGER.debug('old value: %s', pval)
|
|
194
|
+
|
|
195
|
+
pvalue = '%%%s%%' % pvalue.rstrip('%').lstrip('%')
|
|
196
|
+
|
|
197
|
+
LOGGER.debug('new value: %s', pvalue)
|
|
198
|
+
|
|
199
|
+
values.append(pvalue)
|
|
200
|
+
|
|
201
|
+
if boq == ' not ':
|
|
202
|
+
if fname is not None:
|
|
203
|
+
expression = "%s is null or not %s(%s) %s %s" % \
|
|
204
|
+
(pname, fname, pname, com_op, assign_param())
|
|
205
|
+
elif pname == anytext and is_pg and fts:
|
|
206
|
+
LOGGER.debug('PostgreSQL FTS specific search')
|
|
207
|
+
expression = ("%s is null or not plainto_tsquery('%s', %s) @@ anytext_tsvector" %
|
|
208
|
+
(anytext, language, assign_param()))
|
|
209
|
+
else:
|
|
210
|
+
LOGGER.debug('PostgreSQL non-FTS specific search')
|
|
211
|
+
|
|
212
|
+
if pname == queryables['pycsw:CloudCover']:
|
|
213
|
+
LOGGER.debug("Casting queryables['pycsw:CloudCover'] as float")
|
|
214
|
+
pname = 'cast(%s as float)' % pname
|
|
215
|
+
|
|
216
|
+
expression = "%s is null or not %s %s %s" % \
|
|
217
|
+
(pname, pname, com_op, assign_param())
|
|
218
|
+
else:
|
|
219
|
+
if fname is not None:
|
|
220
|
+
expression = "%s(%s) %s %s" % \
|
|
221
|
+
(fname, pname, com_op, assign_param())
|
|
222
|
+
elif pname == anytext and is_pg and fts:
|
|
223
|
+
LOGGER.debug('PostgreSQL FTS specific search')
|
|
224
|
+
expression = ("plainto_tsquery('%s', %s) @@ anytext_tsvector" %
|
|
225
|
+
(language, assign_param()))
|
|
226
|
+
else:
|
|
227
|
+
LOGGER.debug('PostgreSQL non-FTS specific search')
|
|
228
|
+
|
|
229
|
+
if pname == queryables['pycsw:CloudCover']:
|
|
230
|
+
LOGGER.debug("Casting queryables['pycsw:CloudCover'] as float")
|
|
231
|
+
pname = 'cast(%s as float)' % pname
|
|
232
|
+
|
|
233
|
+
expression = "%s %s %s" % (pname, com_op, assign_param())
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
return expression
|
|
237
|
+
|
|
238
|
+
queries = []
|
|
239
|
+
values = []
|
|
240
|
+
|
|
241
|
+
LOGGER.debug('Scanning children elements')
|
|
242
|
+
for child in tmp.xpath('child::*'):
|
|
243
|
+
com_op = ''
|
|
244
|
+
boolean_true = '\'true\''
|
|
245
|
+
boolean_false = '\'false\''
|
|
246
|
+
|
|
247
|
+
if dbtype == 'mysql':
|
|
248
|
+
boolean_true = 'true'
|
|
249
|
+
boolean_false = 'false'
|
|
250
|
+
|
|
251
|
+
if child.tag == util.nspath_eval('ogc:Not', nsmap):
|
|
252
|
+
LOGGER.debug('ogc:Not query detected')
|
|
253
|
+
child_not = child.xpath('child::*')[0]
|
|
254
|
+
if child_not.tag in \
|
|
255
|
+
[util.nspath_eval('ogc:%s' % n, nsmap) for n in
|
|
256
|
+
MODEL['SpatialOperators']['values']]:
|
|
257
|
+
LOGGER.debug('ogc:Not / spatial operator detected: %s', child.tag)
|
|
258
|
+
queries.append("%s = %s" %
|
|
259
|
+
(_get_spatial_operator(
|
|
260
|
+
queryables['pycsw:BoundingBox'],
|
|
261
|
+
child.xpath('child::*')[0], dbtype, nsmap),
|
|
262
|
+
boolean_false))
|
|
263
|
+
else:
|
|
264
|
+
LOGGER.debug('ogc:Not / comparison operator detected: %s', child.tag)
|
|
265
|
+
queries.append('not %s' % _get_comparison_expression(child_not))
|
|
266
|
+
|
|
267
|
+
elif child.tag in \
|
|
268
|
+
[util.nspath_eval('ogc:%s' % n, nsmap) for n in
|
|
269
|
+
MODEL['SpatialOperators']['values']]:
|
|
270
|
+
LOGGER.debug('spatial operator detected: %s', child.tag)
|
|
271
|
+
if boq is not None and boq == ' not ':
|
|
272
|
+
# for ogc:Not spatial queries in PostGIS we must explictly
|
|
273
|
+
# test that pycsw:BoundingBox is null as well
|
|
274
|
+
# TODO: Do we need the same for 'postgresql+postgis+native'???
|
|
275
|
+
if dbtype == 'postgresql+postgis+wkt':
|
|
276
|
+
LOGGER.debug('Setting bbox is null test in PostgreSQL')
|
|
277
|
+
queries.append("%s = %s or %s is null" %
|
|
278
|
+
(_get_spatial_operator(
|
|
279
|
+
queryables['pycsw:BoundingBox'],
|
|
280
|
+
child, dbtype, nsmap), boolean_false,
|
|
281
|
+
queryables['pycsw:BoundingBox']))
|
|
282
|
+
else:
|
|
283
|
+
queries.append("%s = %s" %
|
|
284
|
+
(_get_spatial_operator(
|
|
285
|
+
queryables['pycsw:BoundingBox'],
|
|
286
|
+
child, dbtype, nsmap), boolean_false))
|
|
287
|
+
else:
|
|
288
|
+
queries.append("%s = %s" %
|
|
289
|
+
(_get_spatial_operator(
|
|
290
|
+
queryables['pycsw:BoundingBox'],
|
|
291
|
+
child, dbtype, nsmap), boolean_true))
|
|
292
|
+
|
|
293
|
+
elif child.tag == util.nspath_eval('ogc:FeatureId', nsmap):
|
|
294
|
+
LOGGER.debug('ogc:FeatureId filter detected')
|
|
295
|
+
queries.append("%s = %s" % (queryables['pycsw:Identifier'], assign_param()))
|
|
296
|
+
values.append(child.attrib.get('fid'))
|
|
297
|
+
else: # comparison operator
|
|
298
|
+
LOGGER.debug('Comparison operator processing')
|
|
299
|
+
child_tag_name = etree.QName(child).localname
|
|
300
|
+
tagname = ' %s ' % child_tag_name.lower()
|
|
301
|
+
if tagname in [' or ', ' and ']: # this is a nested binary logic query
|
|
302
|
+
LOGGER.debug('Nested binary logic detected; operator=%s', tagname)
|
|
303
|
+
queries_nested = []
|
|
304
|
+
for child2 in child.xpath('child::*'):
|
|
305
|
+
queries_nested.append(_get_comparison_expression(child2))
|
|
306
|
+
LOGGER.debug('Nested binary logic queries: %s', queries_nested)
|
|
307
|
+
queries.append('(%s)' % tagname.join(queries_nested))
|
|
308
|
+
else:
|
|
309
|
+
queries.append(_get_comparison_expression(child))
|
|
310
|
+
|
|
311
|
+
where = boq.join(queries) if (boq is not None and boq != ' not ') \
|
|
312
|
+
else queries[0]
|
|
313
|
+
|
|
314
|
+
return where, values
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
def _get_spatial_operator(geomattr, element, dbtype, nsmap, postgis_geometry_column='wkb_geometry'):
|
|
318
|
+
"""return the spatial predicate function"""
|
|
319
|
+
property_name = element.find(util.nspath_eval('ogc:PropertyName', nsmap))
|
|
320
|
+
distance = element.find(util.nspath_eval('ogc:Distance', nsmap))
|
|
321
|
+
|
|
322
|
+
distance = 'false' if distance is None else distance.text
|
|
323
|
+
|
|
324
|
+
LOGGER.debug('Scanning for spatial property name')
|
|
325
|
+
|
|
326
|
+
if property_name is None:
|
|
327
|
+
raise RuntimeError('Missing ogc:PropertyName in spatial filter')
|
|
328
|
+
if (property_name.text.find('BoundingBox') == -1 and
|
|
329
|
+
property_name.text.find('Envelope') == -1):
|
|
330
|
+
raise RuntimeError('Invalid ogc:PropertyName in spatial filter: %s' %
|
|
331
|
+
property_name.text)
|
|
332
|
+
|
|
333
|
+
geometry = gml3.Geometry(element, nsmap)
|
|
334
|
+
|
|
335
|
+
#make decision to apply spatial ranking to results
|
|
336
|
+
set_spatial_ranking(geometry)
|
|
337
|
+
|
|
338
|
+
spatial_predicate = etree.QName(element).localname.lower()
|
|
339
|
+
|
|
340
|
+
LOGGER.debug('Spatial predicate: %s', spatial_predicate)
|
|
341
|
+
|
|
342
|
+
if dbtype == 'mysql': # adjust spatial query for MySQL
|
|
343
|
+
LOGGER.debug('Adjusting spatial query for MySQL')
|
|
344
|
+
if spatial_predicate == 'bbox':
|
|
345
|
+
spatial_predicate = 'intersects'
|
|
346
|
+
|
|
347
|
+
if spatial_predicate == 'beyond':
|
|
348
|
+
spatial_query = "ifnull(distance(geomfromtext(%s), \
|
|
349
|
+
geomfromtext('%s')) > convert(%s, signed),false)" % \
|
|
350
|
+
(geomattr, geometry.wkt, distance)
|
|
351
|
+
elif spatial_predicate == 'dwithin':
|
|
352
|
+
spatial_query = "ifnull(distance(geomfromtext(%s), \
|
|
353
|
+
geomfromtext('%s')) <= convert(%s, signed),false)" % \
|
|
354
|
+
(geomattr, geometry.wkt, distance)
|
|
355
|
+
else:
|
|
356
|
+
spatial_query = "ifnull(%s(geomfromtext(%s), \
|
|
357
|
+
geomfromtext('%s')),false)" % \
|
|
358
|
+
(spatial_predicate, geomattr, geometry.wkt)
|
|
359
|
+
|
|
360
|
+
elif dbtype == 'postgresql+postgis+wkt': # adjust spatial query for PostGIS with WKT geometry column
|
|
361
|
+
LOGGER.debug('Adjusting spatial query for PostgreSQL+PostGIS+WKT')
|
|
362
|
+
if spatial_predicate == 'bbox':
|
|
363
|
+
spatial_predicate = 'intersects'
|
|
364
|
+
|
|
365
|
+
if spatial_predicate == 'beyond':
|
|
366
|
+
spatial_query = "not st_dwithin(st_geomfromtext(%s), \
|
|
367
|
+
st_geomfromtext('%s'), %f)" % \
|
|
368
|
+
(geomattr, geometry.wkt, float(distance))
|
|
369
|
+
elif spatial_predicate == 'dwithin':
|
|
370
|
+
spatial_query = "st_dwithin(st_geomfromtext(%s), \
|
|
371
|
+
st_geomfromtext('%s'), %f)" % \
|
|
372
|
+
(geomattr, geometry.wkt, float(distance))
|
|
373
|
+
else:
|
|
374
|
+
spatial_query = "st_%s(st_geomfromtext(%s), \
|
|
375
|
+
st_geomfromtext('%s'))" % \
|
|
376
|
+
(spatial_predicate, geomattr, geometry.wkt)
|
|
377
|
+
|
|
378
|
+
elif dbtype == 'postgresql+postgis+native': # adjust spatial query for PostGIS with native geometry
|
|
379
|
+
LOGGER.debug('Adjusting spatial query for PostgreSQL+PostGIS+native')
|
|
380
|
+
if spatial_predicate == 'bbox':
|
|
381
|
+
spatial_predicate = 'intersects'
|
|
382
|
+
|
|
383
|
+
if spatial_predicate == 'beyond':
|
|
384
|
+
spatial_query = "not st_dwithin(%s, \
|
|
385
|
+
st_geomfromtext('%s',4326), %f)" % \
|
|
386
|
+
(postgis_geometry_column, geometry.wkt, float(distance))
|
|
387
|
+
elif spatial_predicate == 'dwithin':
|
|
388
|
+
spatial_query = "st_dwithin(%s, \
|
|
389
|
+
st_geomfromtext('%s',4326), %f)" % \
|
|
390
|
+
(postgis_geometry_column, geometry.wkt, float(distance))
|
|
391
|
+
else:
|
|
392
|
+
spatial_query = "st_%s(%s, \
|
|
393
|
+
st_geomfromtext('%s',4326))" % \
|
|
394
|
+
(spatial_predicate, postgis_geometry_column, geometry.wkt)
|
|
395
|
+
|
|
396
|
+
else:
|
|
397
|
+
LOGGER.debug('Adjusting spatial query')
|
|
398
|
+
spatial_query = "query_spatial(%s,'%s','%s','%s')" % \
|
|
399
|
+
(geomattr, geometry.wkt, spatial_predicate, distance)
|
|
400
|
+
|
|
401
|
+
return spatial_query
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
def _get_comparison_operator(element):
|
|
405
|
+
"""return the SQL operator based on Filter query"""
|
|
406
|
+
|
|
407
|
+
element_name = etree.QName(element).localname
|
|
408
|
+
return MODEL['ComparisonOperators']['ogc:%s' % element_name]['opvalue']
|
|
409
|
+
|
|
410
|
+
def set_spatial_ranking(geometry):
|
|
411
|
+
"""Given that we have a spatial query in ogc:Filter we check the type of geometry
|
|
412
|
+
and set the ranking variables"""
|
|
413
|
+
|
|
414
|
+
if util.ranking_enabled:
|
|
415
|
+
if geometry.type in ['Polygon', 'Envelope']:
|
|
416
|
+
util.ranking_pass = True
|
|
417
|
+
util.ranking_query_geometry = geometry.wkt
|
|
418
|
+
elif geometry.type in ['LineString', 'Point']:
|
|
419
|
+
from shapely.geometry import box
|
|
420
|
+
from shapely.wkt import loads,dumps
|
|
421
|
+
ls = loads(geometry.wkt)
|
|
422
|
+
b = ls.bounds
|
|
423
|
+
if geometry.type == 'LineString':
|
|
424
|
+
tmp_box = box(b[0],b[1],b[2],b[3])
|
|
425
|
+
tmp_wkt = dumps(tmp_box)
|
|
426
|
+
if tmp_box.area > 0:
|
|
427
|
+
util.ranking_pass = True
|
|
428
|
+
util.ranking_query_geometry = tmp_wkt
|
|
429
|
+
elif geometry.type == 'Point':
|
|
430
|
+
tmp_box = box((float(b[0])-1.0),(float(b[1])-1.0),(float(b[2])+1.0),(float(b[3])+1.0))
|
|
431
|
+
tmp_wkt = dumps(tmp_box)
|
|
432
|
+
util.ranking_pass = True
|
|
433
|
+
util.ranking_query_geometry = tmp_wkt
|