1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
>>> from owslib.csw import CatalogueServiceWeb
>>> from owslib import fes
>>> c = CatalogueServiceWeb('http://geomatics.nlr.nl/excat/csw')
>>> c.identification.title
'NLR CSW'
>>> c.identification.abstract
'NLR CSW: XQuery based catalog service conform to the HTTP protocol binding \n of the OpenGIS Catalogue Service specification version 2.0.2/2.0.1'
>>> c.identification.keywords
['CSW', 'geospatial', 'catalogue']
>>> c.identification.fees
'NONE'
>>> c.identification.accessconstraints
'NONE'
>>> c.identification.type
'CSW'
>>> c.identification.version
'2.0.2'
>>> c.provider.name
'National Aerospace Laboratory NLR'
>>> c.provider.site #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'ServiceProvider' object has no attribute 'site'
>>> c.provider.url
'http://geomatics.nlr.nl/excat'
>>> c.provider.uri #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'ServiceProvider' object has no attribute 'uri'
>>> c.provider.contact.name
'Rob van Swol'
>>> c.provider.contact.position
'Senior Scientist NLR-ASSP'
>>> [op.name for op in c.operations]
['GetCapabilities', 'DescribeRecord', 'GetRecords', 'GetRecordById']
>>> grop = c.get_operation_by_name('GetRecords')
>>> grop.name
'GetRecords'
>>> c.get_operation_by_name('GetRecords-bad') #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'No operation named GetRecords-bad'
>>> c.describerecord()
>>> c.getdomain('GetRecords.outputSchema') #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ExceptionReport: 'Operation not supported: GetDomain'
>>> c.getrecordbyid(['DGFKRYMCWUZSCDRBWRXMIETZE'])
#>>> c.records['DGFKRYMCWUZSCDRBWRXMIETZE'].title
#'CERISE: Computationally Efficient Radar Image Simulation Environment'
|