[GeoNetwork-users] DATE RANGE AND CSW

hI!!

I' would like know if the CSW standar let doing range date search.

I want search metadatas from a init date to a end date. Can I do this
search with CSW?

Any example??

Thank!!
Regards

-----Original Message-----
From: ANT LOP [mailto:gwcvarekay@anonymised.com]
Sent: Thursday, January 24, 2013 06:12
To: geonetwork-users@lists.sourceforge.net
Subject: [GeoNetwork-users] DATE RANGE AND CSW

hI!!

I' would like know if the CSW standar let doing range date search.

I want search metadatas from a init date to a end date. Can I do this
search with CSW?

Any example??

What do you mean by init date? If you have an exact date range:

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot; service="CSW" version="2.0.2"
resultType="results" startPosition="1" maxRecords="5"
outputFormat="application/xml"
outputSchema="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:Query typeNames="csw:Record">
  <csw:ElementSetName>full</csw:ElementSetName>
  <csw:Constraint version="1.1.0">
     <ogc:Filter>
       <ogc:PropertyIsBetween>
         <ogc:PropertyName>dc:date</ogc:PropertyName>
         <ogc:LowerBoundary>
           <ogc:Literal>2010-10-10</ogc:Literal>
         </ogc:LowerBoundary>
         <ogc:UpperBoundary>
           <ogc:Literal>2011-10-10</ogc:Literal>
         </ogc:UpperBoundary>
       </ogc:PropertyIsBetween>
     </ogc:Filter>
   </csw:Constraint>
</csw:Query>
</csw:GetRecords>

If you want all records before a certain end date:

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot; service="CSW" version="2.0.2"
resultType="results" startPosition="1" maxRecords="5"
outputFormat="application/xml"
outputSchema="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:Query typeNames="csw:Record">
  <csw:ElementSetName>full</csw:ElementSetName>
  <csw:Constraint version="1.1.0">
     <ogc:Filter>
       <ogc:PropertyIsLessThan>
         <ogc:PropertyName>dc:date</ogc:PropertyName>
           <ogc:Literal>2010-10-10</ogc:Literal>
       </ogc:PropertyIsLessThan >
     </ogc:Filter>
   </csw:Constraint>
</csw:Query>
</csw:GetRecords>

Note that both examples are untested (against GeoNetwork).

..Tom

Hi!!

I test this csw request against GeoNetwork 2.6.4:

<?xml version="1.0" encoding="UTF-8"?>
<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"
    outputSchema="csw:Record" resultType="results_with_summary"
    startPosition="1" maxRecords="500">
    <csw:Query typeNames="csw:Record">
        <ElementSetName>summary</ElementSetName>
        <csw:Constraint version="1.1.0">
            <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;
                xmlns:gml="http://www.opengis.net/gml&quot;&gt;
                <ogc:And>
                    <ogc:PropertyIsBetween>
                        <ogc:PropertyName>changeDate</ogc:PropertyName>
                        <ogc:LowerBoundary>
                            <ogc:Literal>2013-01-27T12:58:47Z</ogc:Literal>
                        </ogc:LowerBoundary>
                        <ogc:UpperBoundary>
                            <ogc:Literal>2013-02-14T12:58:47Z</ogc:Literal>
                        </ogc:UpperBoundary>
                    </ogc:PropertyIsBetween>
                    <ogc:PropertyIsLike wildCard="%" singleChar="#"
                        escapeChar="!">
                        <ogc:PropertyName>title</ogc:PropertyName>
                        <ogc:Literal>%prueba%</ogc:Literal>
                    </ogc:PropertyIsLike>
                </ogc:And>
            </ogc:Filter>
        </csw:Constraint>
    </csw:Query>
</csw:GetRecords>

The response is correct. But I need search by createdate and dc:date not by
modify date. In this cases (createdate and dc:date) geonetwork 2.6.4
returns not correct results between specificated dates.

it is a bug of geonetwork?

Thank very much for your help.

2013/1/24 Kralidis,Tom [Ontario] <Tom.Kralidis@anonymised.com>

> -----Original Message-----
> From: ANT LOP [mailto:gwcvarekay@anonymised.com]
> Sent: Thursday, January 24, 2013 06:12
> To: geonetwork-users@lists.sourceforge.net
> Subject: [GeoNetwork-users] DATE RANGE AND CSW
>
> hI!!
>
> I' would like know if the CSW standar let doing range date search.
>
> I want search metadatas from a init date to a end date. Can I do this
> search with CSW?
>
> Any example??
>

What do you mean by init date? If you have an exact date range:

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot; service="CSW" version="2.0.2"
resultType="results" startPosition="1" maxRecords="5"
outputFormat="application/xml"
outputSchema="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:Query typeNames="csw:Record">
  <csw:ElementSetName>full</csw:ElementSetName>
  <csw:Constraint version="1.1.0">
     <ogc:Filter>
       <ogc:PropertyIsBetween>
         <ogc:PropertyName>dc:date</ogc:PropertyName>
         <ogc:LowerBoundary>
           <ogc:Literal>2010-10-10</ogc:Literal>
         </ogc:LowerBoundary>
         <ogc:UpperBoundary>
           <ogc:Literal>2011-10-10</ogc:Literal>
         </ogc:UpperBoundary>
       </ogc:PropertyIsBetween>
     </ogc:Filter>
   </csw:Constraint>
</csw:Query>
</csw:GetRecords>

If you want all records before a certain end date:

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot; service="CSW" version="2.0.2"
resultType="results" startPosition="1" maxRecords="5"
outputFormat="application/xml"
outputSchema="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:Query typeNames="csw:Record">
  <csw:ElementSetName>full</csw:ElementSetName>
  <csw:Constraint version="1.1.0">
     <ogc:Filter>
       <ogc:PropertyIsLessThan>
         <ogc:PropertyName>dc:date</ogc:PropertyName>
           <ogc:Literal>2010-10-10</ogc:Literal>
       </ogc:PropertyIsLessThan >
     </ogc:Filter>
   </csw:Constraint>
</csw:Query>
</csw:GetRecords>

Note that both examples are untested (against GeoNetwork).

..Tom

Any help please?

It's possible search by dc:date (Dublin core) field in Geonetwork 2.6.4
with CSW standard?

Thank very much!!

2013/2/5 ANT LOP <gwcvarekay@anonymised.com>

Hi!!

I test this csw request against GeoNetwork 2.6.4:

<?xml version="1.0" encoding="UTF-8"?>
<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"
    outputSchema="csw:Record" resultType="results_with_summary"
    startPosition="1" maxRecords="500">
    <csw:Query typeNames="csw:Record">
        <ElementSetName>summary</ElementSetName>
        <csw:Constraint version="1.1.0">
            <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;
                xmlns:gml="http://www.opengis.net/gml&quot;&gt;
                <ogc:And>
                    <ogc:PropertyIsBetween>
                        <ogc:PropertyName>changeDate</ogc:PropertyName>
                        <ogc:LowerBoundary>
                            <ogc:Literal>2013-01-27T12:58:47Z</ogc:Literal>
                        </ogc:LowerBoundary>
                        <ogc:UpperBoundary>
                            <ogc:Literal>2013-02-14T12:58:47Z</ogc:Literal>
                        </ogc:UpperBoundary>
                    </ogc:PropertyIsBetween>
                    <ogc:PropertyIsLike wildCard="%" singleChar="#"
                        escapeChar="!">
                        <ogc:PropertyName>title</ogc:PropertyName>
                        <ogc:Literal>%prueba%</ogc:Literal>
                    </ogc:PropertyIsLike>
                </ogc:And>
            </ogc:Filter>
        </csw:Constraint>
    </csw:Query>
</csw:GetRecords>

The response is correct. But I need search by createdate and dc:date not
by modify date. In this cases (createdate and dc:date) geonetwork 2.6.4
returns not correct results between specificated dates.

it is a bug of geonetwork?

Thank very much for your help.

2013/1/24 Kralidis,Tom [Ontario] <Tom.Kralidis@anonymised.com>

> -----Original Message-----
> From: ANT LOP [mailto:gwcvarekay@anonymised.com]
> Sent: Thursday, January 24, 2013 06:12
> To: geonetwork-users@lists.sourceforge.net
> Subject: [GeoNetwork-users] DATE RANGE AND CSW
>
> hI!!
>
> I' would like know if the CSW standar let doing range date search.
>
> I want search metadatas from a init date to a end date. Can I do this
> search with CSW?
>
> Any example??
>

What do you mean by init date? If you have an exact date range:

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot; service="CSW" version="2.0.2"
resultType="results" startPosition="1" maxRecords="5"
outputFormat="application/xml"
outputSchema="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:Query typeNames="csw:Record">
  <csw:ElementSetName>full</csw:ElementSetName>
  <csw:Constraint version="1.1.0">
     <ogc:Filter>
       <ogc:PropertyIsBetween>
         <ogc:PropertyName>dc:date</ogc:PropertyName>
         <ogc:LowerBoundary>
           <ogc:Literal>2010-10-10</ogc:Literal>
         </ogc:LowerBoundary>
         <ogc:UpperBoundary>
           <ogc:Literal>2011-10-10</ogc:Literal>
         </ogc:UpperBoundary>
       </ogc:PropertyIsBetween>
     </ogc:Filter>
   </csw:Constraint>
</csw:Query>
</csw:GetRecords>

If you want all records before a certain end date:

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot; service="CSW" version="2.0.2"
resultType="results" startPosition="1" maxRecords="5"
outputFormat="application/xml"
outputSchema="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:Query typeNames="csw:Record">
  <csw:ElementSetName>full</csw:ElementSetName>
  <csw:Constraint version="1.1.0">
     <ogc:Filter>
       <ogc:PropertyIsLessThan>
         <ogc:PropertyName>dc:date</ogc:PropertyName>
           <ogc:Literal>2010-10-10</ogc:Literal>
       </ogc:PropertyIsLessThan >
     </ogc:Filter>
   </csw:Constraint>
</csw:Query>
</csw:GetRecords>

Note that both examples are untested (against GeoNetwork).

..Tom

Hi

All CSW queryables are defined in WEB-INF/config-csw.xml (here's the file
for 2.6.4:
https://github.com/geonetwork/core-geonetwork/blob/2.6.4/web/src/main/webapp/WEB-INF/config-csw.xml
)

For DC metadata, seem dc:date field is indexed as createDate Lucene field
(see
https://github.com/geonetwork/core-geonetwork/blob/2.6.4/web/src/main/webapp/xml/schemas/csw-record/index-fields.xsl),
that according to config-csw.xml corresponds to *CreationDate CSW queryable.
*

Regards,
Jose García

On Mon, Feb 11, 2013 at 2:31 PM, ANT LOP <gwcvarekay@anonymised.com> wrote:

Any help please?

It's possible search by dc:date (Dublin core) field in Geonetwork 2.6.4
with CSW standard?

Thank very much!!

2013/2/5 ANT LOP <gwcvarekay@anonymised.com>

> Hi!!
>
> I test this csw request against GeoNetwork 2.6.4:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <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"
> outputSchema="csw:Record" resultType="results_with_summary"
> startPosition="1" maxRecords="500">
> <csw:Query typeNames="csw:Record">
> <ElementSetName>summary</ElementSetName>
> <csw:Constraint version="1.1.0">
> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;
> xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> <ogc:And>
> <ogc:PropertyIsBetween>
> <ogc:PropertyName>changeDate</ogc:PropertyName>
> <ogc:LowerBoundary>
>
<ogc:Literal>2013-01-27T12:58:47Z</ogc:Literal>
> </ogc:LowerBoundary>
> <ogc:UpperBoundary>
>
<ogc:Literal>2013-02-14T12:58:47Z</ogc:Literal>
> </ogc:UpperBoundary>
> </ogc:PropertyIsBetween>
> <ogc:PropertyIsLike wildCard="%" singleChar="#"
> escapeChar="!">
> <ogc:PropertyName>title</ogc:PropertyName>
> <ogc:Literal>%prueba%</ogc:Literal>
> </ogc:PropertyIsLike>
> </ogc:And>
> </ogc:Filter>
> </csw:Constraint>
> </csw:Query>
> </csw:GetRecords>
>
>
> The response is correct. But I need search by createdate and dc:date not
> by modify date. In this cases (createdate and dc:date) geonetwork 2.6.4
> returns not correct results between specificated dates.
>
> it is a bug of geonetwork?
>
> Thank very much for your help.
>
> 2013/1/24 Kralidis,Tom [Ontario] <Tom.Kralidis@anonymised.com>
>
>
>>
>> > -----Original Message-----
>> > From: ANT LOP [mailto:gwcvarekay@anonymised.com]
>> > Sent: Thursday, January 24, 2013 06:12
>> > To: geonetwork-users@lists.sourceforge.net
>> > Subject: [GeoNetwork-users] DATE RANGE AND CSW
>> >
>> > hI!!
>> >
>> > I' would like know if the CSW standar let doing range date search.
>> >
>> > I want search metadatas from a init date to a end date. Can I do this
>> > search with CSW?
>> >
>> > Any example??
>> >
>>
>> What do you mean by init date? If you have an exact date range:
>>
>> <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
>> <csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
>> xmlns:ogc="http://www.opengis.net/ogc&quot; service="CSW" version="2.0.2"
>> resultType="results" startPosition="1" maxRecords="5"
>> outputFormat="application/xml"
>> outputSchema="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:Query typeNames="csw:Record">
>> <csw:ElementSetName>full</csw:ElementSetName>
>> <csw:Constraint version="1.1.0">
>> <ogc:Filter>
>> <ogc:PropertyIsBetween>
>> <ogc:PropertyName>dc:date</ogc:PropertyName>
>> <ogc:LowerBoundary>
>> <ogc:Literal>2010-10-10</ogc:Literal>
>> </ogc:LowerBoundary>
>> <ogc:UpperBoundary>
>> <ogc:Literal>2011-10-10</ogc:Literal>
>> </ogc:UpperBoundary>
>> </ogc:PropertyIsBetween>
>> </ogc:Filter>
>> </csw:Constraint>
>> </csw:Query>
>> </csw:GetRecords>
>>
>> If you want all records before a certain end date:
>>
>> <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
>> <csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
>> xmlns:ogc="http://www.opengis.net/ogc&quot; service="CSW" version="2.0.2"
>> resultType="results" startPosition="1" maxRecords="5"
>> outputFormat="application/xml"
>> outputSchema="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:Query typeNames="csw:Record">
>> <csw:ElementSetName>full</csw:ElementSetName>
>> <csw:Constraint version="1.1.0">
>> <ogc:Filter>
>> <ogc:PropertyIsLessThan>
>> <ogc:PropertyName>dc:date</ogc:PropertyName>
>> <ogc:Literal>2010-10-10</ogc:Literal>
>> </ogc:PropertyIsLessThan >
>> </ogc:Filter>
>> </csw:Constraint>
>> </csw:Query>
>> </csw:GetRecords>
>>
>> Note that both examples are untested (against GeoNetwork).
>>
>> ..Tom
>>
>>
>

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
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 for details.
_________________________
Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net/&gt;

*