Skip to content

Commit 03796d8

Browse files
committed
test
1 parent c98b5d7 commit 03796d8

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

pycsw/core/pygeofilter_ext.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def bbox(self, node, lhs):
6868
def ilike(self, node, lhs):
6969
LOGGER.debug('Overriding ILIKE filter handling')
7070
LOGGER.debug(f'Term: {node.pattern}')
71+
print("DBTYPE", self._pycsw_dbtype)
7172
if (str(lhs.prop) == 'dataset.anytext' and
7273
self._pycsw_dbtype.startswith('postgres')):
7374
if '%' not in node.pattern:
@@ -91,11 +92,11 @@ class PycswCSWFES11Parser(FES11Parser):
9192
def parse(self, input_):
9293
return FES11Parser().parse(input_)
9394

94-
@fhandle('BBOX')
95-
def geometry_bbox(self, node: Element, lhs, rhs, crs=None):
96-
minx = rhs.geometry['coordinates'][0][0][1]
97-
miny = rhs.geometry['coordinates'][0][0][0]
98-
maxx = rhs.geometry['coordinates'][0][2][1]
99-
maxy = rhs.geometry['coordinates'][0][2][0]
95+
# @fhandle('BBOX')
96+
# def geometry_bbox(self, node: Element, lhs, rhs, crs=None):
97+
# minx = rhs.geometry['coordinates'][0][0][1]
98+
# miny = rhs.geometry['coordinates'][0][0][0]
99+
# maxx = rhs.geometry['coordinates'][0][2][1]
100+
# maxy = rhs.geometry['coordinates'][0][2][0]
100101

101-
return ast.BBox(lhs, minx, miny, maxx, maxy, crs)
102+
# return ast.BBox(lhs, minx, miny, maxx, maxy, crs)

pycsw/ogc/csw/csw2.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,8 @@ def getrecords(self):
825825
self.parent.kvp['startposition'] = 1
826826

827827
# query repository
828+
print("AST", self.parent.kvp['constraint']['ast'])
829+
print("AST", dir(self.parent.kvp['constraint']['ast']))
828830
LOGGER.debug('Querying repository with constraint: %s,\
829831
sortby: %s, typenames: %s, maxrecords: %s, startposition: %s',
830832
self.parent.kvp['constraint'], self.parent.kvp['sortby'], self.parent.kvp['typenames'],
@@ -1005,6 +1007,8 @@ def getrecords(self):
10051007
self.parent.response = self.exceptionreport(
10061008
'NoApplicableCode', 'service',
10071009
'Record serialization failed: %s' % str(err))
1010+
import traceback
1011+
print(traceback.format_exc())
10081012
return self.parent.response
10091013

10101014
if len(dsresults) > 0: # return DistributedSearch results
@@ -1545,13 +1549,16 @@ def _write_record(self, recobj, queryables):
15451549
self.parent.context.md_core_model['mappings']['pycsw:Links'])
15461550

15471551
if rlinks:
1548-
for link in util.jsonify_links(rlinks):
1552+
if isinstance(rlinks, str):
1553+
rlinks = util.jsonify_links(rlinks)
1554+
for link in rlinks:
1555+
print("LINK", link)
15491556
ref = etree.SubElement(record, util.nspath_eval('dct:references',
15501557
self.parent.context.namespaces))
15511558
if link.get('protocol'):
15521559
ref.attrib['scheme'] = link['protocol']
15531560

1554-
ref.text = link['url']
1561+
ref.text = link.get('url', link.get('href'))
15551562

15561563
for i in ['dc:relation', 'dct:modified', 'dct:abstract']:
15571564
val = util.getqattr(recobj, queryables[i]['dbcol'])

0 commit comments

Comments
 (0)