[pycsw-devel] typeName in GetRecords requests

Tom Kralidis tomkralidis at hotmail.com
Thu Feb 7 16:32:40 PST 2013


________________________________
> From: ryan.clark at azgs.az.gov 
> Date: Thu, 7 Feb 2013 13:44:56 -0700 
> To: pycsw-devel at lists.osgeo.org 
> CC: steve.richard at azgs.az.gov 
> Subject: [pycsw-devel] typeName in GetRecords requests 
>  
> Hi! 
>  
> I'm experimenting with pycsw. I set everything up and used the  
> pycsw-admin.py function to import a set of XML records into my  
> database. The files were ISO19139 docs. That was cool how easy it was. 
>  

Glad this worked for you.  Comments and suggestions are most welcome on improving the backend admin interface, too.

> After the load, I tried some GetRecords requests. I noticed that  
> requests in which I specify ...&typeNames=gmd:MD_Metadata... gives me  
> the results I expect. However, if I specify typeNames=csw:Record I  
> don't get any results. 
>  

When pycsw loads metadata into its repository, it stores the typename of the metadata (csw:Record, gmd:MD_Metadata, etc.), and this value it what is uses when responding to a GetRecords query with the typeNames parameter.

Section 10.8.4.8 of CSW 2.0.2 (07-006r1) says that csw:Record is the only queryable entity (typename).  The ISO AP (07-045), as an example, allows for typename 'gmd:MD_Metadata'.

> Does that seem like a bug, or a feature? To me it seems a little  
> contradictory to the description of the typeNames parameter in the CSW  
> spec. I think I've seen a similar issue in GeoNetwork in the past, but  
> I ran similar queries using ESRI's Geoportal and I got the results I  
> expected regardless of what I put as typeName. 
>  

That's a good question.  In pycsw it's by design, so clients that want to query all typenames would fetch all the applicable typenames from a GetCapabilities response and pass them (comma-separated) in the GetRecords request.

For me, I find this consistent with querying a WFS; each typename is a different entity and querying a specific typename will return results based on that typename only, which allows to filter metadata sets by typename, if you want.

Having said this, I may be interpreting this incorrectly, what do others think?  It might be valuable also to clarify this with OGC (maybe in the public forum?).  If pycsw handles things incorrectly, we will certainly fix this immediately.  If things are still blurry, we could certainly put a flag (say pedantic=False) in pycsw's config to allow the server to always query all typenames.

Thanks

..Tom 		 	   		  


More information about the pycsw-devel mailing list