[ckan-dev] OWSlib

William Waites ww at eris.okfn.org
Fri Jan 14 16:50:36 UTC 2011


Hi James, copying ckan-dev...

* [2011-01-14 15:25:09 +0000] James Gardner <james at 3aims.com> écrit:

] Here's what your code produced:

ok, let's have a closer look

] <csw:GetRecords 
]     xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
]     service="CSW" 
]     version="2.0.2" 
]     resultType="results" 
]     maxRecords="10" 

maxRecords being explicitly set rather than letting it default.
I believe, but may be wrong, that if you don't specify it the
server is free to chose a value. So in any case we need to
actually page through the results.

]     outputFormat="application/xml" 
]     outputSchema="http://www.opengis.net/cat/csw/2.0.2" 

The results can come back in different forms depending on these
parameters. If they aren't specified the server can pick a 
default which may not be ISO19139 stuff. Best to specify it
to be sure.

]     xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2
] http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd" 
]     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
] >
]     <csw:Query typeNames="csw:Record">
]         <csw:ElementSetName>summary</csw:ElementSetName>
]         <csw:Constraint version="1.1.0">
]             <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
]                 <ogc:PropertyIsEqualTo>
]                     <ogc:PropertyName>dc:type</ogc:PropertyName>
]                     <ogc:Literal>service</ogc:Literal>
]                 </ogc:PropertyIsEqualTo>

The old query just specified an empty filter, in this case
we have an explicit one looking for services. Not certain how
we should distinguish services from data sets...

]             </ogc:Filter>
]         </csw:Constraint>
]     </csw:Query>
] </csw:GetRecords>

] I'm not sure that John's code was correct but it does work. The new code
] still adds maxRecords="10" to the outer element which I don't really
] want, but that isn't the end of the world.

As mentioned above... Paging through results...

Cheers,
-w

-- 
William Waites                <mailto:ww at styx.org>
http://eris.okfn.org/ww/         <sip:ww at styx.org>
9C7E F636 52F6 1004 E40A  E565 98E3 BBF3 8320 7664




More information about the ckan-dev mailing list