[GeoNetwork-users] csw: get record by property name

Thank you for your help. After reading the GetCapabilities information, it appears that there is no a queryable field related to the "Code" showed in the section "Identification Info". My aim was to use this field for storing the name of the OGC resource. In this way I would have a way for relating OGC resources with their metadata records. What field could be used for this purpose?

Moving on to something else, does it right that the "GetRecords" request just returns information about the number of the records matched and not the XML that represents them? For example, when I run a query I get the following XML:

<?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecordsResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd&quot;&gt;
<csw:SearchStatus timestamp="2011-01-12T08:52:58" />
<csw:SearchResults numberOfRecordsMatched="2" numberOfRecordsReturned="0" elementSet="summary" nextRecord="1" />
</csw:GetRecordsResponse>

It says that the query matched two records but it doesn't return the XML of these records.

Regards,

----- Original Message -----
From: jose garcia
Sent: 01/11/11 03:40 PM
To: Robert Holland
Subject: Re: [GeoNetwork-users] csw: get record by property name

Hi Robert

The CSW Capabilities document returns the list of queryable fields in the GetRecords section.

You can find the mapping with field names to metadata properties in CSW 2.0.2 spec.

Regards,
Jose García

On Tue, Jan 11, 2011 at 3:19 PM, Robert Holland <robert.holland@anonymised.com> wrote:

Hi,

I am trying to get a record of the catalog by using the request "GetRecords". I don't know its metadata id, but the value of the field "code" that is showed in the section "Identification Info". To do so I am using the XML showed below. It does return nothing. I think that the problem is related to the name of the property that stores the code. What is its internal name?

<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot; service="CSW" version="2.0.2" outputFormat="application/xml">
<csw:Query typeNames="csw:Record">
<csw:Constraint version="1.1.0">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot; xmlns:gml="http://www.opengis.net/gml&quot; xmlns="http://www.opengis.net/ogc&quot;&gt;
<ogc:PropertyIsEqualTo matchCase="false">
<ogc:PropertyName>code</ogc:PropertyName>
<ogc:Literal>roads03</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>

Thank you. Regards,

Robert.

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web. Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Hi Robert

Add *resultType="results"* in request, that should return the results:

<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
service="CSW" version="2.0.2" outputFormat="application/xml" *
resultType="results"* >

Regards,
Jose García

GeoCat bv

On Wed, Jan 12, 2011 at 9:49 AM, Robert Holland <robert.holland@anonymised.com>wrote:

Thank you for your help. After reading the GetCapabilities information, it
appears that there is no a queryable field related to the "Code" showed in
the section "Identification Info". My aim was to use this field for storing
the name of the OGC resource. In this way I would have a way for relating
OGC resources with their metadata records. What field could be used for this
purpose?

Moving on to something else, does it right that the "GetRecords" request
just returns information about the number of the records matched and not the
XML that represents them? For example, when I run a query I get the
following XML:

<?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecordsResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation="
http://www.opengis.net/cat/csw/2.0.2
http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd&quot;&gt;
  <csw:SearchStatus timestamp="2011-01-12T08:52:58" />
  <csw:SearchResults numberOfRecordsMatched="2" numberOfRecordsReturned="0"
elementSet="summary" nextRecord="1" />
</csw:GetRecordsResponse>

It says that the query matched two records but it doesn't return the XML of
these records.

Regards,

  ----- Original Message -----
  From: jose garcia
  Sent: 01/11/11 03:40 PM
  To: Robert Holland
  Subject: Re: [GeoNetwork-users] csw: get record by property name

   Hi Robert

The CSW Capabilities document returns the list of queryable fields in the
GetRecords section.

You can find the mapping with field names to metadata properties in CSW
2.0.2 spec.

Regards,
Jose García

  On Tue, Jan 11, 2011 at 3:19 PM, Robert Holland <robert.holland@anonymised.com..>
wrote:

   Hi,

   I am trying to get a record of the catalog by using the request
"GetRecords". I don't know its metadata id, but the value of the field
"code" that is showed in the section "Identification Info". To do so I am
using the XML showed below. It does return nothing. I think that the problem
is related to the name of the property that stores the code. What is its
internal name?

<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
service="CSW" version="2.0.2" outputFormat="application/xml">
    <csw:Query typeNames="csw:Record">
       <csw:Constraint version="1.1.0">
          <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot; xmlns:gml="
http://www.opengis.net/gml&quot; xmlns="http://www.opengis.net/ogc&quot;&gt;
             <ogc:PropertyIsEqualTo matchCase="false">
                <ogc:PropertyName>code</ogc:PropertyName>
                <ogc:Literal>roads03</ogc:Literal>
             </ogc:PropertyIsEqualTo>
          </ogc:Filter>
       </csw:Constraint>
    </csw:Query>
</csw:GetRecords>

   Thank you. Regards,

   Robert.

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any
company
that requires sensitive data to be transmitted over the Web. Learn how
to
best implement a security strategy that keeps consumers' information
secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork