[GeoNetwork-users] How request the list of all metadata

Hi,
there is available in GeoNetwork a GET request to have an xml with the list
of all published metadata ?

Thx

--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------

I use to put this URL in the browser:
http://localhost:8080/geonetwork/srv/eng/xml.search<http://172.23.5.72/geonetwork/srv/eng/xml.search>

It returns all the metadata. You can even detail your search as in
http://geonetwork-opensource.org/manuals/2.10.2/eng/developer/xml_services/metadata_xml_search_retrieve.html
.

In the linux shell I use this command:
wget -v --post-file=./search_req.xml --header
"Content-type:application/xml"
http://172.23.5.72/geonetwork/srv/eng/xml.search

And the search_req.xml is like this:

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

It returns the same result as putting the xml.search URL in the browser.

Best regards,
Alex

On Mon, Jan 13, 2014 at 3:29 AM, Andrea Peri <aperi2007@anonymised.com> wrote:

Hi,
there is available in GeoNetwork a GET request to have an xml with the list
of all published metadata ?

Thx

--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.

http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
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 Lopes,

thx for you kindly help.

Is exactly was I was searching for.

Study-ing it I see the response return some fields, but don't return the Title (from identification->citation->title) of metadata.
Surely the UUID is a good information to help retrieve the right metadata, but I guess almost the title could be useful, and perhaps also the abstract should be usefult have them in the response.

I read the documentation, but don't find any info on this.
As you know:
is possible tohave in the response also this two information:
title and abstract adding some parameter to the request,
or is possible to have the response customizing the right xslt ?

Many thx.

Andrea.

On 13/01/2014 16:35, Alex Lopes wrote:

I use to put this URL in the browser: http://localhost:8080/geonetwork/srv/eng/xml.search <http://172.23.5.72/geonetwork/srv/eng/xml.search&gt;

It returns all the metadata. You can even detail your search as in http://geonetwork-opensource.org/manuals/2.10.2/eng/developer/xml_services/metadata_xml_search_retrieve.html.

In the linux shell I use this command:
wget -v --post-file=./search_req.xml --header "Content-type:application/xml" http://172.23.5.72/geonetwork/srv/eng/xml.search

And the search_req.xml is like this:

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

It returns the same result as putting the xml.search URL in the browser.

Best regards,
Alex

On Mon, Jan 13, 2014 at 3:29 AM, Andrea Peri <aperi2007@anonymised.com <mailto:aperi2007@anonymised.com>> wrote:

    Hi,
    there is available in GeoNetwork a GET request to have an xml with
    the list
    of all published metadata ?

    Thx

    --
    -----------------
    Andrea Peri
    . . . . . . . . .
    qwerty àèìòù
    -----------------
    ------------------------------------------------------------------------------
    CenturyLink Cloud: The Leader in Enterprise Cloud Services.
    Learn Why More Businesses Are Choosing CenturyLink Cloud For
    Critical Workloads, Development Environments & Everything In Between.
    Get a Quote or Start a Free Trial Today.
    http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
    _______________________________________________
    GeoNetwork-users mailing list
    GeoNetwork-users@lists.sourceforge.net
    <mailto:GeoNetwork-users@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/geonetwork-users
    GeoNetwork OpenSource is maintained at
    http://sourceforge.net/projects/geonetwork

Hi

Possibly you can use also rss.search service, similar query parameters as
xml.search and returns a xml document that has title, abstract and some
other information about the metadata.

Check in
http://geonetwork-opensource.org/manuals/2.10.2/eng/developer/xml_services/metadata_xml_search_retrieve.html#rss-search-search-metadata-and-retrieve-in-rss-format-rss-search

Regards,
Jose García

On Fri, Jan 17, 2014 at 9:02 AM, aperi2007 <aperi2007@anonymised.com> wrote:

Hi Lopes,

thx for you kindly help.

Is exactly was I was searching for.

Study-ing it I see the response return some fields, but don't return the
Title (from identification->citation->title) of metadata.
Surely the UUID is a good information to help retrieve the right
metadata, but I guess almost the title could be useful, and perhaps also
the abstract should be usefult have them in the response.

I read the documentation, but don't find any info on this.
As you know:
is possible tohave in the response also this two information:
title and abstract adding some parameter to the request,
or is possible to have the response customizing the right xslt ?

Many thx.

Andrea.

On 13/01/2014 16:35, Alex Lopes wrote:
> I use to put this URL in the browser:
> http://localhost:8080/geonetwork/srv/eng/xml.search
> <http://172.23.5.72/geonetwork/srv/eng/xml.search&gt;
>
> It returns all the metadata. You can even detail your search as in
>
http://geonetwork-opensource.org/manuals/2.10.2/eng/developer/xml_services/metadata_xml_search_retrieve.html
.
>
> In the linux shell I use this command:
> wget -v --post-file=./search_req.xml --header
> "Content-type:application/xml"
> http://172.23.5.72/geonetwork/srv/eng/xml.search
>
> And the search_req.xml is like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <request />
>
> It returns the same result as putting the xml.search URL in the browser.
>
> Best regards,
> Alex
>
>
> On Mon, Jan 13, 2014 at 3:29 AM, Andrea Peri <aperi2007@anonymised.com
> <mailto:aperi2007@anonymised.com>> wrote:
>
> Hi,
> there is available in GeoNetwork a GET request to have an xml with
> the list
> of all published metadata ?
>
> Thx
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
>
------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> GeoNetwork-users mailing list
> GeoNetwork-users@lists.sourceforge.net
> <mailto:GeoNetwork-users@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
>
>

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.

http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
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

--

* GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 13 6721 WD BennekomThe
Netherlandshttp://GeoCat.net/> *

Hi Andrea,

I'm sure the rss.search works because Mr. Garcia is an expert on Geonetwork.

Although, I would like to share to the community my solution to do a batch
retrieve of Geonetwork metadata using linux shell commands.

--------------
1) Do a xml.search and find all the metadata you need. The following
example does it.
  wget -v --post-file=../req.xml --header "Content-type:application/xml"
http://localhost:8080/geonetwork/srv/eng/xml.search

The simplest req.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<request />

--------------
2) Step 1 returns an xml file with several fields for each metadata. One of
the fields is the uuid. Then, use an xslt processor to create xml request
files for each metadata. Each xml request file should look like this:
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:geonet="http://www.fao.org/geonetwork&quot;&gt;
   <format>full</format>
   <uuid>3200ecaa-4226-461a-af6f-6eca989a6cb2</uuid>
</request>

I use saxonb on ubuntu, with this command:
saxonb-xslt -ext:on -s:../xml.search_result -xsl:../template.xsl

My the template.xls contains is this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform&quot;
version="2.0"
  xmlns:geonet="http://www.fao.org/geonetwork&quot; >
<xsl:output method="xml" indent="yes" name="xml"/>
<xsl:template match="metadata">
<xsl:result-document href="metadata{position()}" format="xml">
<request>
<format>full</format>
  <uuid>
   <xsl:value-of select="geonet:info/uuid"/>
  </uuid>
</request>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>

This commands generate as many xml files as the number of metadata in the
response file xml.search_result. Each one look like this:
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:geonet="http://www.fao.org/geonetwork&quot;&gt;
   <format>full</format>
   <uuid>3200ecaa-4226-461a-af6f-6eca989a6cb2</uuid>
</request>

-----------
3) Now, just do a xml.metadata.get request passing this file as parameter.
wget -v --post-file=./data/metadata_req --header
"Content-type:application/xml"
http://localhost:8080/geonetwork/srv/eng/xml.metadata.get

The result will contain the abstract and the title you wanted.
Then, I combined all of this in a script shell.
---------------------------------

I guess there might be an elegant way to do it. But it does the job.

(Mr. Garcia), any improvement in such procedure would still be useful...
:slight_smile:

Best regards,
Alex Lopes Pereira

On Fri, Jan 17, 2014 at 4:09 AM, Jose Garcia <jose.garcia@anonymised.com> wrote:

Hi

Possibly you can use also rss.search service, similar query parameters as
xml.search and returns a xml document that has title, abstract and some
other information about the metadata.

Check in
http://geonetwork-opensource.org/manuals/2.10.2/eng/developer/xml_services/metadata_xml_search_retrieve.html#rss-search-search-metadata-and-retrieve-in-rss-format-rss-search

Regards,
Jose García

On Fri, Jan 17, 2014 at 9:02 AM, aperi2007 <aperi2007@anonymised.com> wrote:

Hi Lopes,

thx for you kindly help.

Is exactly was I was searching for.

Study-ing it I see the response return some fields, but don't return the
Title (from identification->citation->title) of metadata.
Surely the UUID is a good information to help retrieve the right
metadata, but I guess almost the title could be useful, and perhaps also
the abstract should be usefult have them in the response.

I read the documentation, but don't find any info on this.
As you know:
is possible tohave in the response also this two information:
title and abstract adding some parameter to the request,
or is possible to have the response customizing the right xslt ?

Many thx.

Andrea.

On 13/01/2014 16:35, Alex Lopes wrote:
> I use to put this URL in the browser:
> http://localhost:8080/geonetwork/srv/eng/xml.search
> <http://172.23.5.72/geonetwork/srv/eng/xml.search&gt;

>
> It returns all the metadata. You can even detail your search as in
>
http://geonetwork-opensource.org/manuals/2.10.2/eng/developer/xml_services/metadata_xml_search_retrieve.html
.
>
> In the linux shell I use this command:
> wget -v --post-file=./search_req.xml --header
> "Content-type:application/xml"
> http://172.23.5.72/geonetwork/srv/eng/xml.search
>
> And the search_req.xml is like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <request />
>
> It returns the same result as putting the xml.search URL in the browser.
>
> Best regards,
> Alex
>
>
> On Mon, Jan 13, 2014 at 3:29 AM, Andrea Peri <aperi2007@anonymised.com
> <mailto:aperi2007@anonymised.com>> wrote:
>
> Hi,
> there is available in GeoNetwork a GET request to have an xml with
> the list
> of all published metadata ?
>
> Thx
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
>
------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In
Between.
> Get a Quote or Start a Free Trial Today.
>
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> GeoNetwork-users mailing list
> GeoNetwork-users@lists.sourceforge.net
> <mailto:GeoNetwork-users@lists.sourceforge.net>

> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
>
>

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.

http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
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

--

* GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 13 6721 WD BennekomThe
Netherlandshttp://GeoCat.net/> *

Hi Jose,

thx for your solution.
Try-ing it I found perhaps a little bug.

Infact the parsing for the link will produce a wrong link.
The link was wrong because our front-end will do a redirect forward the
application-server.
So the link it give is like this:

http://urlto-the-server/geonetwork?uuid=2183d4c9-4149-425a-bc16-7153f5085983

And seem to miss a / . The right url should be this:

http://urlto-the-server/geonetwork/?uuid=2183d4c9-4149-425a-bc16-7153f5085983

I guess this is a wrong build in a xslt.

2014/1/17 Jose Garcia <jose.garcia@anonymised.com>

Hi

Possibly you can use also rss.search service, similar query parameters as
xml.search and returns a xml document that has title, abstract and some
other information about the metadata.

Check in
http://geonetwork-opensource.org/manuals/2.10.2/eng/developer/xml_services/metadata_xml_search_retrieve.html#rss-search-search-metadata-and-retrieve-in-rss-format-rss-search

Regards,
Jose García

On Fri, Jan 17, 2014 at 9:02 AM, aperi2007 <aperi2007@anonymised.com> wrote:

Hi Lopes,

thx for you kindly help.

Is exactly was I was searching for.

Study-ing it I see the response return some fields, but don't return the
Title (from identification->citation->title) of metadata.
Surely the UUID is a good information to help retrieve the right
metadata, but I guess almost the title could be useful, and perhaps also
the abstract should be usefult have them in the response.

I read the documentation, but don't find any info on this.
As you know:
is possible tohave in the response also this two information:
title and abstract adding some parameter to the request,
or is possible to have the response customizing the right xslt ?

Many thx.

Andrea.

On 13/01/2014 16:35, Alex Lopes wrote:
> I use to put this URL in the browser:
> http://localhost:8080/geonetwork/srv/eng/xml.search
> <http://172.23.5.72/geonetwork/srv/eng/xml.search&gt;

>
> It returns all the metadata. You can even detail your search as in
>
http://geonetwork-opensource.org/manuals/2.10.2/eng/developer/xml_services/metadata_xml_search_retrieve.html
.
>
> In the linux shell I use this command:
> wget -v --post-file=./search_req.xml --header
> "Content-type:application/xml"
> http://172.23.5.72/geonetwork/srv/eng/xml.search
>
> And the search_req.xml is like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <request />
>
> It returns the same result as putting the xml.search URL in the browser.
>
> Best regards,
> Alex
>
>
> On Mon, Jan 13, 2014 at 3:29 AM, Andrea Peri <aperi2007@anonymised.com
> <mailto:aperi2007@anonymised.com>> wrote:
>
> Hi,
> there is available in GeoNetwork a GET request to have an xml with
> the list
> of all published metadata ?
>
> Thx
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
>
------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In
Between.
> Get a Quote or Start a Free Trial Today.
>
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> GeoNetwork-users mailing list
> GeoNetwork-users@lists.sourceforge.net
> <mailto:GeoNetwork-users@lists.sourceforge.net>

> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
>
>

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.

http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
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

--

* GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 13 6721 WD BennekomThe
Netherlandshttp://GeoCat.net/> *

--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------

Hi Alex

Related to the method you propose, should work fine, but I you can get get
similar results with less http requests using CSW GetRecords.

A request like the following:

<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
    xmlns:gmd="http://www.isotc211.org/2005/gmd&quot; service="CSW"
version="2.0.2"
    resultType="results">
    <csw:Query typeNames="gmd:MD_Metadata">
        <csw:ElementSetName>*full*</csw:ElementSetName>
        <csw:Constraint version="1.1.0">
            <Filter xmlns="http://www.opengis.net/ogc&quot; xmlns:gml="
http://www.opengis.net/gml&quot;/&gt;
        </csw:Constraint>
    </csw:Query>
</csw:GetRecords>

Should return csw:Record in full format (if need less information can try
with brief or summary values in csw:ElementSetName).

Or if require the original xml documents instead of csw:Record in results:

<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
    xmlns:gmd="http://www.isotc211.org/2005/gmd&quot; service="CSW"
version="2.0.2"
    resultType="results" *outputSchema="http://www.isotc211.org/2005/gmd
<http://www.isotc211.org/2005/gmd&gt;&quot;\*&gt;
    <csw:Query typeNames="gmd:MD_Metadata">
        <csw:ElementSetName>full</csw:ElementSetName>
        <csw:Constraint version="1.1.0">
            <Filter xmlns="http://www.opengis.net/ogc&quot; xmlns:gml="
http://www.opengis.net/gml&quot;/&gt;
        </csw:Constraint>
    </csw:Query>
</csw:GetRecords>

Regards,
Jose García

On Fri, Jan 17, 2014 at 2:24 PM, Alex Lopes <alexlopespereira@anonymised.com>wrote:

Hi Andrea,

I'm sure the rss.search works because Mr. Garcia is an expert on
Geonetwork.

Although, I would like to share to the community my solution to do a batch
retrieve of Geonetwork metadata using linux shell commands.

--------------
1) Do a xml.search and find all the metadata you need. The following
example does it.
  wget -v --post-file=../req.xml --header "Content-type:application/xml"
http://localhost:8080/geonetwork/srv/eng/xml.search

The simplest req.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<request />

--------------
2) Step 1 returns an xml file with several fields for each metadata. One
of the fields is the uuid. Then, use an xslt processor to create xml
request files for each metadata. Each xml request file should look like
this:
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:geonet="http://www.fao.org/geonetwork&quot;&gt;
   <format>full</format>
   <uuid>3200ecaa-4226-461a-af6f-6eca989a6cb2</uuid>
</request>

I use saxonb on ubuntu, with this command:
saxonb-xslt -ext:on -s:../xml.search_result -xsl:../template.xsl

My the template.xls contains is this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform&quot;
version="2.0"
  xmlns:geonet="http://www.fao.org/geonetwork&quot; >
<xsl:output method="xml" indent="yes" name="xml"/>
  <xsl:template match="metadata">
<xsl:result-document href="metadata{position()}" format="xml">
<request>
<format>full</format>
  <uuid>
   <xsl:value-of select="geonet:info/uuid"/>
  </uuid>
</request>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>

This commands generate as many xml files as the number of metadata in the
response file xml.search_result. Each one look like this:
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:geonet="http://www.fao.org/geonetwork&quot;&gt;
   <format>full</format>
   <uuid>3200ecaa-4226-461a-af6f-6eca989a6cb2</uuid>
</request>

-----------
3) Now, just do a xml.metadata.get request passing this file as parameter.
wget -v --post-file=./data/metadata_req --header
"Content-type:application/xml"
http://localhost:8080/geonetwork/srv/eng/xml.metadata.get

The result will contain the abstract and the title you wanted.
Then, I combined all of this in a script shell.
---------------------------------

I guess there might be an elegant way to do it. But it does the job.

(Mr. Garcia), any improvement in such procedure would still be useful...
:slight_smile:

Best regards,
Alex Lopes Pereira

On Fri, Jan 17, 2014 at 4:09 AM, Jose Garcia <jose.garcia@anonymised.com>wrote:

Hi

Possibly you can use also rss.search service, similar query parameters as
xml.search and returns a xml document that has title, abstract and some
other information about the metadata.

Check in
http://geonetwork-opensource.org/manuals/2.10.2/eng/developer/xml_services/metadata_xml_search_retrieve.html#rss-search-search-metadata-and-retrieve-in-rss-format-rss-search

Regards,
Jose García

On Fri, Jan 17, 2014 at 9:02 AM, aperi2007 <aperi2007@anonymised.com> wrote:

Hi Lopes,

thx for you kindly help.

Is exactly was I was searching for.

Study-ing it I see the response return some fields, but don't return the
Title (from identification->citation->title) of metadata.
Surely the UUID is a good information to help retrieve the right
metadata, but I guess almost the title could be useful, and perhaps also
the abstract should be usefult have them in the response.

I read the documentation, but don't find any info on this.
As you know:
is possible tohave in the response also this two information:
title and abstract adding some parameter to the request,
or is possible to have the response customizing the right xslt ?

Many thx.

Andrea.

On 13/01/2014 16:35, Alex Lopes wrote:
> I use to put this URL in the browser:
> http://localhost:8080/geonetwork/srv/eng/xml.search
> <http://172.23.5.72/geonetwork/srv/eng/xml.search&gt;

>
> It returns all the metadata. You can even detail your search as in
>
http://geonetwork-opensource.org/manuals/2.10.2/eng/developer/xml_services/metadata_xml_search_retrieve.html
.
>
> In the linux shell I use this command:
> wget -v --post-file=./search_req.xml --header
> "Content-type:application/xml"
> http://172.23.5.72/geonetwork/srv/eng/xml.search
>
> And the search_req.xml is like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <request />
>
> It returns the same result as putting the xml.search URL in the
browser.
>
> Best regards,
> Alex
>
>
> On Mon, Jan 13, 2014 at 3:29 AM, Andrea Peri <aperi2007@anonymised.com
> <mailto:aperi2007@anonymised.com>> wrote:
>
> Hi,
> there is available in GeoNetwork a GET request to have an xml with
> the list
> of all published metadata ?
>
> Thx
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
>
------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In
Between.
> Get a Quote or Start a Free Trial Today.
>
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> GeoNetwork-users mailing list
> GeoNetwork-users@lists.sourceforge.net
> <mailto:GeoNetwork-users@lists.sourceforge.net>

> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
>
>

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.

http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
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

--

* GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 13 6721 WD BennekomThe
Netherlandshttp://GeoCat.net/> *

--

* GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 13 6721 WD BennekomThe
Netherlandshttp://GeoCat.net/> *

Hi,

I'm try to use the csw to do the request,

but I see it will return exactly 100 records.

I try to add to the request a parameter to up the limit to 100.000 records
(a really huge value) ,
bit it seem tdon't used.
The geonetwork csw return always 100 records.

<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
service="CSW" version="2.0.2"
    resultType="results"
    maxRecords="100000"

Any hints ?

Thx,

Andrea.

2014-01-22 Jose Garcia <jose.garcia@anonymised.com>

Hi Alex

Related to the method you propose, should work fine, but I you can get get
similar results with less http requests using CSW GetRecords.

A request like the following:

<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
    xmlns:gmd="http://www.isotc211.org/2005/gmd&quot; service="CSW"
version="2.0.2"
    resultType="results">
    <csw:Query typeNames="gmd:MD_Metadata">
        <csw:ElementSetName>*full*</csw:ElementSetName>
        <csw:Constraint version="1.1.0">
            <Filter xmlns="http://www.opengis.net/ogc&quot; xmlns:gml="
http://www.opengis.net/gml&quot;/&gt;
        </csw:Constraint>
    </csw:Query>
</csw:GetRecords>

Should return csw:Record in full format (if need less information can try
with brief or summary values in csw:ElementSetName).

Or if require the original xml documents instead of csw:Record in results:

<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
    xmlns:gmd="http://www.isotc211.org/2005/gmd&quot; service="CSW"
version="2.0.2"
    resultType="results" *outputSchema="http://www.isotc211.org/2005/gmd
<http://www.isotc211.org/2005/gmd&gt;&quot;\*&gt;
    <csw:Query typeNames="gmd:MD_Metadata">
        <csw:ElementSetName>full</csw:ElementSetName>
        <csw:Constraint version="1.1.0">
            <Filter xmlns="http://www.opengis.net/ogc&quot; xmlns:gml="
http://www.opengis.net/gml&quot;/&gt;
        </csw:Constraint>
    </csw:Query>
</csw:GetRecords>

Regards,
Jose García

On Fri, Jan 17, 2014 at 2:24 PM, Alex Lopes <alexlopespereira@anonymised.com>wrote:

Hi Andrea,

I'm sure the rss.search works because Mr. Garcia is an expert on
Geonetwork.

Although, I would like to share to the community my solution to do a
batch retrieve of Geonetwork metadata using linux shell commands.

--------------
1) Do a xml.search and find all the metadata you need. The following
example does it.
  wget -v --post-file=../req.xml --header "Content-type:application/xml"
http://localhost:8080/geonetwork/srv/eng/xml.search

The simplest req.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<request />

--------------
2) Step 1 returns an xml file with several fields for each metadata. One
of the fields is the uuid. Then, use an xslt processor to create xml
request files for each metadata. Each xml request file should look like
this:
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:geonet="http://www.fao.org/geonetwork&quot;&gt;
   <format>full</format>
   <uuid>3200ecaa-4226-461a-af6f-6eca989a6cb2</uuid>
</request>

I use saxonb on ubuntu, with this command:
saxonb-xslt -ext:on -s:../xml.search_result -xsl:../template.xsl

My the template.xls contains is this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform&quot;
version="2.0"
  xmlns:geonet="http://www.fao.org/geonetwork&quot; >
<xsl:output method="xml" indent="yes" name="xml"/>
  <xsl:template match="metadata">
<xsl:result-document href="metadata{position()}" format="xml">
<request>
<format>full</format>
  <uuid>
   <xsl:value-of select="geonet:info/uuid"/>
  </uuid>
</request>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>

This commands generate as many xml files as the number of metadata in the
response file xml.search_result. Each one look like this:
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:geonet="http://www.fao.org/geonetwork&quot;&gt;
   <format>full</format>
   <uuid>3200ecaa-4226-461a-af6f-6eca989a6cb2</uuid>
</request>

-----------
3) Now, just do a xml.metadata.get request passing this file as parameter.
wget -v --post-file=./data/metadata_req --header
"Content-type:application/xml"
http://localhost:8080/geonetwork/srv/eng/xml.metadata.get

The result will contain the abstract and the title you wanted.
Then, I combined all of this in a script shell.
---------------------------------

I guess there might be an elegant way to do it. But it does the job.

(Mr. Garcia), any improvement in such procedure would still be useful...
:slight_smile:

Best regards,
Alex Lopes Pereira

On Fri, Jan 17, 2014 at 4:09 AM, Jose Garcia <jose.garcia@anonymised.com>wrote:

Hi

Possibly you can use also rss.search service, similar query parameters
as xml.search and returns a xml document that has title, abstract and some
other information about the metadata.

Check in
http://geonetwork-opensource.org/manuals/2.10.2/eng/developer/xml_services/metadata_xml_search_retrieve.html#rss-search-search-metadata-and-retrieve-in-rss-format-rss-search

Regards,
Jose García

On Fri, Jan 17, 2014 at 9:02 AM, aperi2007 <aperi2007@anonymised.com> wrote:

Hi Lopes,

thx for you kindly help.

Is exactly was I was searching for.

Study-ing it I see the response return some fields, but don't return the
Title (from identification->citation->title) of metadata.
Surely the UUID is a good information to help retrieve the right
metadata, but I guess almost the title could be useful, and perhaps also
the abstract should be usefult have them in the response.

I read the documentation, but don't find any info on this.
As you know:
is possible tohave in the response also this two information:
title and abstract adding some parameter to the request,
or is possible to have the response customizing the right xslt ?

Many thx.

Andrea.

On 13/01/2014 16:35, Alex Lopes wrote:
> I use to put this URL in the browser:
> http://localhost:8080/geonetwork/srv/eng/xml.search
> <http://172.23.5.72/geonetwork/srv/eng/xml.search&gt;

>
> It returns all the metadata. You can even detail your search as in
>
http://geonetwork-opensource.org/manuals/2.10.2/eng/developer/xml_services/metadata_xml_search_retrieve.html
.
>
> In the linux shell I use this command:
> wget -v --post-file=./search_req.xml --header
> "Content-type:application/xml"
> http://172.23.5.72/geonetwork/srv/eng/xml.search
>
> And the search_req.xml is like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <request />
>
> It returns the same result as putting the xml.search URL in the
browser.
>
> Best regards,
> Alex
>
>
> On Mon, Jan 13, 2014 at 3:29 AM, Andrea Peri <aperi2007@anonymised.com
> <mailto:aperi2007@anonymised.com>> wrote:
>
> Hi,
> there is available in GeoNetwork a GET request to have an xml with
> the list
> of all published metadata ?
>
> Thx
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
>
------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In
Between.
> Get a Quote or Start a Free Trial Today.
>
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> GeoNetwork-users mailing list
> GeoNetwork-users@lists.sourceforge.net
> <mailto:GeoNetwork-users@lists.sourceforge.net>

> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
>
>

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.

http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
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

--

* GeoCat Bridge for ArcGIS allows instant publishing of data and
metadata on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 13 6721 WD BennekomThe
Netherlandshttp://GeoCat.net/> *

--

* GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 13 6721 WD BennekomThe
Netherlandshttp://GeoCat.net/> *

--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------