[GeoNetwork-devel] How to getrecords using csw in geonetwork with FGDC metadata

Hi:

I am working in a csw client, I started using the csw client bundled in geonetwork.
I couldn’t find how to GetRecords and GetRecordById operations working with fgdc
metadata. The GetRecords operation does not return any uid to use as id for
GetRecordById.

I tried also changing the OutputSchema to fgdc and fgdc-std but the service fail
and returns an exception.

Could you help to solve this problem?, is it possible to use csw with fgdc metadata?

Regards
Godofredo Contreras


Store, manage and share up to 5GB with Windows Live SkyDrive. Start uploading now

Hi Godofredo,

On lun, 2008-10-20 at 16:08 +0000, godofredo contreras wrote:

I couldn't find how to GetRecords and GetRecordById operations working
with fgdc
metadata.

The GetRecords operation should work (at least work with sample metadata
provided with GeoNetwork). The issue is when you set outputSchema to
something else than CSW-DC records. If you look to
xml/csw/schemas/fgdc-std, you only have a mapping from fgdc to csw-dc.
If you do a GetRecords with resultType=results, you'll get your fgdc
records in dc format.

The GetRecords operation does not return any uid to use as id for
GetRecordById.

Then, why you don't have an id ? I'm don't know where FGDC store ids but
the mapping defined is :
<xsl:for-each select="idinfo/citation/citeinfo/title/@cat_id">
  <dc:identifier><xsl:value-of select="."/></dc:identifier>
</xsl:for-each>
and maybe uuid parameter have also to be indexed in index-fields for
fgdc.

I tried also changing the OutputSchema to fgdc and fgdc-std but the
service fail
and returns an exception.

Could you help to solve this problem?, is it possible to use csw with
fgdc metadata?

It looks like there is some works required to make it works but should
not be so difficult.

HTH.
Francois

Dear Francois and List, (I wanted this to go to User, but the original thread
is in Devel)

I'd like to get the full XML FGDC record via an http Post. I tried CSW, but
could only get the Dublin Core pieces, less than 10% of the full FGDC record
(If I understand right). I'm using this CSW request:

<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
service="CSW" version="2.0.2"
                            resultType="results" startPosition="1"
maxRecords="10">
                            <csw:Query>
                               
<csw:ElementSetName>full</csw:ElementSetName>
                            </csw:Query>
                        </csw:GetRecords>

Is there some other way I can get the full XML FGDC record?

Thanks,
Roger

Hi Godofredo,

Could you help to solve this problem?, is it possible to use csw with
fgdc metadata?

It looks like there is some works required to make it works but should
not be so difficult.

--
View this message in context: http://www.nabble.com/How-to-getrecords-using-csw-in-geonetwork-with-FGDC-metadata-tp20073182p20649212.html
Sent from the geonetwork-devel mailing list archive at Nabble.com.

Hi Roger and Francois:

I found several problems using FGDC metadata through csw service,
one of them is that FGDC does not have a uid and isn’t possible to
get the results by id. The other problem is the output schema, there
are not output schema for csw.

As Francois said some time ago, it should not be too difficult to add
the FGDC schema, but it could be better to transform your FGDC
metadata to ISO19139. I used the software called CatMDEdit from
here: http://catmdedit.sourceforge.net/ and it was a straight process.

Hope this helps,

Regards
Godofredo Contreras

Date: Sun, 23 Nov 2008 10:31:09 -0800
From: roger@anonymised.com
To: geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] How to getrecords using csw in geonetwork with FGDC metadata

Dear Francois and List, (I wanted this to go to User, but the original thread
is in Devel)

I’d like to get the full XML FGDC record via an http Post. I tried CSW, but
could only get the Dublin Core pieces, less than 10% of the full FGDC record
(If I understand right). I’m using this CSW request:

<csw:GetRecords xmlns:csw=“http://www.opengis.net/cat/csw/2.0.2
service=“CSW” version=“2.0.2”
resultType=“results” startPosition=“1”
maxRecords=“10”>
csw:Query

csw:ElementSetNamefull</csw:ElementSetName>
</csw:Query>
</csw:GetRecords>

Is there some other way I can get the full XML FGDC record?

Thanks,
Roger

Hi Godofredo,

Could you help to solve this problem?, is it possible to use csw with
fgdc metadata?
It looks like there is some works required to make it works but should
not be so difficult.


View this message in context: http://www.nabble.com/How-to-getrecords-using-csw-in-geonetwork-with-FGDC-metadata-tp20073182p20649212.html
Sent from the geonetwork-devel mailing list archive at Nabble.com.


This SF.Net email is sponsored by the Moblin Your Move Developer’s challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


Proud to be a PC? Show the world. Download the “I’m a PC” Messenger themepack now. Download now.

godofredo contreras wrote:

I found several problems using FGDC metadata through csw service,
one of them is that FGDC does not have a uid and isn't possible to
get the results by id. The other problem is the output schema, there
are not output schema for csw.

Turns out that FGDC had to finesse that issue a few years ago when Geospatial OneStop (GOS) was harvesting FGDC nodes. We ended up adding an attribute to the title element called "catid" and putting an identifier string in there. In the Isite software, I use a UUID constructed from the file name and path of the local metadata file but, of course, any unique identifier would work as well.

The addition of the attribute technically breaks the FGDC DTD (and, if one exists, the schema) but since no one to our knowledge)actually was validating the records against the DTD, it seemed like an expeditious solution and it worked for GOS.

--
Archie

-- Archie Warnock warnock@anonymised.com
-- A/WWW Enterprises www.awcubed.com
-- As a matter of fact, I _do_ speak for my employer.

Hi Archie:

I checked the fgdc schemas for csw in [geonetworkfolder]/xml/csw/schemas/fgdc-std
and they use the attribute “cat_id” in the title element.

I set manually the attribute “cat_id” and it is returned by the csw getrecords operation
correctly but I can’t use the cat_id to get the record using csw getRecordById operation. To fix
this problem I changed the set_uuid and extract_uuid schemas in
[geonetworkfolder]/xml/schemas/fgdc-std to set “cat_id” as the uuid generated in the database and
it works to return the uuid in getRecords and getRecordById but only with metadata inserted
using gast, the fgdc metadata created directly in geonetwork does not set the “cat_id”.

Any ideas to fix this?

Regards
Godofredo Contreras

—init-set_uuid.xsl

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version=“1.0” xmlns:xsl=“http://www.w3.org/1999/XSL/Transform”>

<xsl:template match=“/root”>
<xsl:apply-templates select=“metadata”/>
</xsl:template>

<xsl:template match=“title”>
xsl:copy
<xsl:copy-of select=“@*”/>
<xsl:attribute name=“cat_id”>
<xsl:value-of select=“/root/env/uuid” />
</xsl:attribute>
<xsl:apply-templates select=“node()” />
</xsl:copy>
</xsl:template>

<xsl:template match=“@|node()“>
xsl:copy
<xsl:apply-templates select=”@
|node()”/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

—end-set_uuid.xsl

–init-extract_uuid.xsl

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version=“1.0” xmlns:xsl=“http://www.w3.org/1999/XSL/Transform”>

<xsl:template match=“metadata”>

<xsl:value-of select=“idinfo/citation/citeinfo/title/@cat_id” />

</xsl:template>

</xsl:stylesheet>

–end-extract_uuid.xsl

Date: Mon, 24 Nov 2008 21:44:13 -0500
From: warnock@anonymised.com
To: geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] How to getrecords using csw in geonetwork with FGDC metadata

godofredo contreras wrote:

I found several problems using FGDC metadata through csw service,
one of them is that FGDC does not have a uid and isn’t possible to
get the results by id. The other problem is the output schema, there
are not output schema for csw.

Turns out that FGDC had to finesse that issue a few years ago when
Geospatial OneStop (GOS) was harvesting FGDC nodes. We ended up adding
an attribute to the title element called “catid” and putting an
identifier string in there. In the Isite software, I use a UUID
constructed from the file name and path of the local metadata file but,
of course, any unique identifier would work as well.

The addition of the attribute technically breaks the FGDC DTD (and, if
one exists, the schema) but since no one to our knowledge)actually was
validating the records against the DTD, it seemed like an expeditious
solution and it worked for GOS.


Archie

– Archie Warnock warnock@anonymised.com
– A/WWW Enterprises www.awcubed.com
– As a matter of fact, I do speak for my employer.


This SF.Net email is sponsored by the Moblin Your Move Developer’s challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


Windows Live Hotmail now works up to 70% faster. Sign up today.

godofredo contreras wrote:

I set manually the attribute "cat_id" and it is returned by the csw getrecords operation correctly but I can't use the cat_id to get the
record using csw getRecordById operation. To fix this problem I
changed the set_uuid and extract_uuid schemas in [geonetworkfolder]/xml/schemas/fgdc-std to set "cat_id" as the uuid generated in the database and it works to return the uuid in
getRecords and getRecordById but only with metadata inserted using
gast, the fgdc metadata created directly in geonetwork does not set
the "cat_id".

Any ideas to fix this?

Not in any simple way. Most likely, the implementor (Andrea Carboni, I think) wasn't aware of the FGDC convention of using the cat_id attribute to include an identifier and so it's not part of the export XSLT. It'll take some programming. Jeroen can probably say whether it's more appropriate for v3.0 or if it's something that ought to be fixed in the v2.x branch.

I could take a look at it, but I don't have a lot of time in the short term to do it.

--

Archie

-- Archie Warnock warnock@anonymised.com
-- A/WWW Enterprises http://www.awcubed.com
-- As a matter of fact, I _do_ speak for my employer.