CSW Anfragen und Antworten¶
Beispiel-URLs: http://hosturl/metador/csw/extern/extern/?REQUEST=GetCapabilities&SERVICE=CSW&VERSION=2.0.2
Aufbau:
- URL von Metador:
http://hosturl/metador/
- CSW:
csw
- Name der Instanz:
extern
- Name des CSW (Slug):
extern
GetCapabilities¶
Aufruf als HTTP-GET-Parameter¶
Aufruf als HTTP-POST-Parameter (1)¶
<GetCapabilities xmlns="http://www.opengis.net/cat/csw/2.0.2"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:ows="http://www.opengis.net/ows"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
service="CSW"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
</GetCapabilities>
Aufruf als HTTP-POST-Parameter (2)¶
<?xml version="1.0" encoding="ISO-8859-1"?>
<GetCapabilities xmlns="http://www.opengis.net/cat/csw/2.0.2"
xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"
service="CSW">
<ows:AcceptVersions>
<ows:Version>2.0.2</ows:Version>
<ows:Version>2.0.0</ows:Version>
</ows:AcceptVersions>
<ows:Sections>
<ows:Section>ServiceIdentification</ows:Section>
<ows:Section>ServiceProvider</ows:Section>
<ows:Section>OperationsMetadata</ows:Section>
<ows:Section>Filter_Capabilities</ows:Section>
</ows:Sections>
<ows:AcceptFormats>
<ows:OutputFormat>application/xml</ows:OutputFormat>
</ows:AcceptFormats>
</GetCapabilities>
DescribeRecord¶
Variante 1¶
<csw:DescribeRecord xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"
schemaLanguage="http://www.w3.org/2001/XMLSchema" service="CSW"
version="2.0.2">
<csw:TypeName>gmd:MD_Metadata</csw:TypeName>
</csw:DescribeRecord>
Variante 2¶
<csw:DescribeRecord xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"
schemaLanguage="http://www.w3.org/2001/XMLSchema" service="CSW"
version="2.0.2">
</csw:DescribeRecord>
GetRecordById¶
Eine ID¶
<GetRecordById xmlns="http://www.opengis.net/cat/csw/2.0.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"
service="CSW" version="2.0.2" outputSchema="http://www.isotc211.org/2005/gmd">
<Id>b1387688-9bf5-4349-80a0-f27be9e93b0c</Id>
</GetRecordById>
Zwei IDs¶
<GetRecordById xmlns="http://www.opengis.net/cat/csw/2.0.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"
service="CSW" version="2.0.2" outputSchema="http://www.isotc211.org/2005/gmd">
<Id>08da91e0-46c8-41b4-a4d2-dd36e4ce2b1c</Id>
<Id>b1387688-9bf5-4349-80a0-f27be9e93b0c</Id>
<ElementSetName>full</ElementSetName>
</GetRecordById>
GetRecords¶
Alle, Full¶
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="CSW"
version="2.0.2" maxRecords="15" startPosition="1" resultType="results"
outputFormat="application/xml" outputSchema="http://www.isotc211.org/2005/gmd"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
<csw:Query typeNames="gmd:MD_Metadata">
<csw:ElementSetName typeNames="gmd:MD_Metadata">full</csw:ElementSetName>
</csw:Query>
</csw:GetRecords>
2 Resultate, Full¶
?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
service="CSW"
version="2.0.2"
resultType="results"
startPosition="1"
maxRecords="2"
outputFormat="application/xml"
outputSchema="http://www.isotc211.org/2005/gmd"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
<csw:Query typeNames="gmd:MD_Metadata">
<csw:ElementSetName>full</csw:ElementSetName>
</csw:Query>
</csw:GetRecords>
GeRecords Property Subject (Digitales Lager)¶
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns="http://www.opengis.net/cat/csw/2.0.2" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" maxRecords="1" outputFormat="application/xml" outputSchema="http://www.isotc211.org/2005/gmd" requestId="40cbf63b-5b48-4874-8583-c02f86abe895" resultType="results" service="CSW" startPosition="1" version="2.0.2" xsi:schemaLocation="http://www.opengis.net/cat/csw">
<csw:Query typeNames="gmd:MD_Metadata">
<csw:ElementSetName>full</csw:ElementSetName>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>Subject</ogc:PropertyName>
<ogc:Literal>DOP20UTM</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>Subject</ogc:PropertyName>
<ogc:Literal>novaFACTORY</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>
PropertyIsEqualTo: Identifier¶
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns="http://www.opengis.net/cat/csw/2.0.2" xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
service="CSW" version="2.0.2" maxRecords="5" startPosition="1"
resultType="results" outputFormat="application/xml" outputSchema="http://www.isotc211.org/2005/gmd"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
<csw:Query typeNames="gmd:MD_Metadata">
<csw:ElementSetName typeNames="csw:Record">full</csw:ElementSetName>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>Identifier</ogc:PropertyName>
<ogc:Literal>b1387688-9bf5-4349-80a0-f27be9e93b0c</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>
GetRecords, Filter AND¶
Title AND Title¶
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns="http://www.opengis.net/cat/csw/2.0.2" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:dct="http://purl.org/dc/terms/" xmlns:ows="http://www.opengis.net/ows"
xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
service="CSW" version="2.0.2" maxRecords="5" startPosition="1"
resultType="results" outputFormat="application/xml" outputSchema="http://www.isotc211.org/2005/gmd"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
<csw:Query typeNames="gmd:MD_Metadata">
<csw:ElementSetName typeNames="csw:Record">full</csw:ElementSetName>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:And>
<ogc:PropertyIsLike wildCard="%" singleChar="_"
escapeChar="\">
<ogc:PropertyName>Title</ogc:PropertyName>
<ogc:Literal>%Ein%</ogc:Literal>
</ogc:PropertyIsLike>
<ogc:PropertyIsLike wildCard="%" singleChar="_"
escapeChar="\">
<ogc:PropertyName>Title</ogc:PropertyName>
<ogc:Literal>%Datensatz%</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:And>
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>
GetRecords, AnyText¶
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" outputSchema="http://www.isotc211.org/2005/gmd"
outputFormat="application/xml" version="2.0.2" service="CSW"
resultType="results" maxRecords="10"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
<csw:Query typeNames="gmd:MD_Metadata">
<csw:ElementSetName>full</csw:ElementSetName>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:PropertyIsLike wildCard="%" singleChar="_"
escapeChar="\">
<ogc:PropertyName>AnyText</ogc:PropertyName>
<ogc:Literal>%weltwunder%</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>
AnyText Anfragen gehen auf die Spalte searchfield
in der Tabelle
metadata
.
GetRecords, BBOX¶
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ows="http://www.opengis.net/ows" resultType="results" service="CSW"
version="2.0.2" outputSchema="http://www.isotc211.org/2005/gmd"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
<csw:Query typeNames="gmd:MD_Metadata">
<csw:ElementSetName typeNames="csw:Record">full</csw:ElementSetName>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:BBOX>
<ogc:PropertyName>ows:BoundingBox</ogc:PropertyName>
<gml:Envelope>
<gml:lowerCorner>5 47</gml:lowerCorner>
<gml:upperCorner>15 57</gml:upperCorner>
</gml:Envelope>
</ogc:BBOX>
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>