CSW Clients for ArcGIS |
|
| Release 9.3.1 |
|
The CSW Clients bring Geoportal discovery functionality into your ArcMap and ArcGIS Explorer applications. They enable searching OGC Catalog Service for the Web (CS-W) metadata catalogs directly through ArcMap and ArcGIS Explorer. Once metadata records are returned, they can be viewed or downloaded. Additionally, if the metadata references data identified as "Live Data and Maps", the data can be added to the ArcMap document or ArcGIS Explorer Globe. In ArcMap, there are additional functionalities that allow users to preview the data's spatial extent.
To learn more about how the Geoportal extension uses CS-W, please see Geoportal Extension Catalog Service.
msiexec /i "[install_path_for_CSW_Client_msi]\CSW Clients for ArcGIS Build 9.3.1.121.msi" /qn ADDLOCAL=Common,CSWAgx900,CSWArcMap ALLUSERS=1 INSTALLDIR_FS="C:/Program Files/ESRI/Geoportal/CSWClients/"LOGDIR="C:\Documents and Settings\All Users\Application Data\ESRI\PortalCSWClients\Log"
The CSW Clients are used the same way in both ArcMap and ArcGIS Explorer. How to search a catalog for data, view metadata, download metadata, and add it to the map are described below. In ArcMap, click the CSW Client
button to open the tool. In ArcGIS Explorer 500 or lower, click the CSW Client task in the Task list to open the task. In ArcGIS Explorer 900, select the Add-Ins tab, and select the CSW Client to open the task.
tool will open the metadata's XML document in a new window.
tool allows the metadata XML to be downloaded and saved.
tool will add the data described by the metadata to the map or globe as a new layer. This button will be grayed out unless the metadata document has a content type of "Live Data and Maps". Currently, only Open Geospatial Consortium (OGC) Web Map Services (WMS) and ArcIMS Image Services are viewable as Live Data and Maps with the CSW Client. If you click the Add to Map button and no data is added to the map, it is possible that the metadata does not include service/resource name information. In order to display the live service in the Add to Map functionality, a service name must be provided in the metadata xml element that describes the link to the service or resource.
tool will zoom to the extent of the highlighted metadata on the current map. This is especially useful if the extent is a small region or the basemap uses a customized projection.
tool will add all the footprints in the Results window to the map at once. To hide them, click the same button again.
tool will remove all footprints that have been added to the map.<?xml version="1.0" encoding="utf-8" ?>
<CSWProfiles>
<!-- OGCCORE ESRI GPT -->
<Profile>
<ID>urn:ogc:CSW:2.0.2:HTTP:OGCCORE:ESRI:GPT</ID>
<Name>ArcGIS Server Geoportal Extension</Name>
<CswNamespace>http://www.opengis.net/cat/csw/2.0.2</CswNamespace>
<Description />
<GetRecords>
<XSLTransformations>
<Request>CSW_2.0.2_OGCCORE_ESRI_GPT_GetRecords_Request.xslt</Request>
<Response>CSW_2.0.2_OGCCORE_ESRI_GPT_GetRecords_Response.xslt</Response>
</XSLTransformations>
</GetRecords>
<GetRecordByID>
<RequestKVPs>
<![CDATA[service=CSW&request=GetRecordById&version=2.0.2&ElementSetName=full]]>
</RequestKVPs>
<XSLTransformations>
<Response>CSW_2.0.2_OGCCORE_ESRI_GPT_GetRecordByID_Response.xslt</Response>
</XSLTransformations>
</GetRecordByID>
<SupportSpatialQuery>True</SupportSpatialQuery>
<SupportContentTypeQuery>True</SupportContentTypeQuery>
<SupportSpatialBoundary>True</SupportSpatialBoundary>
</Profile>
<csw:GetRecords version="2.0.2" service="CSW" resultType="RESULTS" startPosition="1" maxRecords="10" xmlns:csw="http://www.opengis.net/cat/csw/2.0.2">
<csw:Query typeNames="csw:Record" xmlns:ogc="http://www.opengis.net/ogc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:gml="http://www.opengis.net/gml">
<csw:ElementSetName>full</csw:ElementSetName>
<csw:Constraint version="1.0.0">
<ogc:Filter xmlns="http://www.opengis.net/ogc">
<ogc:And>
<ogc:PropertyIsLike wildCard="" escape="" singleChar="">
<ogc:PropertyName>AnyText</ogc:PropertyName>
<ogc:Literal>wms</ogc:Literal>
</ogc:PropertyIsLike>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>Format</ogc:PropertyName>
<ogc:Literal>liveData</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>
The CSW Clients are preconfigured to search Geospatial Onestop - the "GOS2 OGC Core" catalog in the search interface - by default. But if you want to search a different catalog service than Geospatial Onestop, it is possible by registering the catalog service in the CSW Clients' Configure tab.
New button to clear the form for your new catalog service entry. http://serverName/geoportal/csw/discovery?Request=GetCapabilities&Service=CSW&Version=2.0.2
Save button to add the new catalog to the catalog list.
Save button.
Delete button.<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="no" encoding="UTF-8" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="csw:GetRecords" use-attribute-sets="GetRecordsAttributes" xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:ogc="http://www.opengis.net/ogc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:gml="http://www.opengis.net/gml">
<csw:Query typeNames="csw:Record">
<csw:ElementSetName>full</csw:ElementSetName>
<csw:Constraint version="1.0.0">
<ogc:Filter xmlns="http://www.opengis.net/ogc">
<ogc:And>
<!-- CSW Client must retrieve the following information to define the search the user specifies in the User Interface: 'KeyWord' corresponds to the search term the user inputs, 'LiveDataMap' corresponds to if the user specifies "Live Data and Maps Only", and 'Envelope' specifies the bounding box for a search based on the current extent of the ArcMap window. The 'tmpltDate' corresponds to searching a catalog via the Geoportal, in the Additional Options, Modified Date search on the Search page. -->
<!-- Key Word search -->
<xsl:apply-templates select="/GetRecords/KeyWord"/>
<!-- LiveDataOrMaps search -->
<xsl:apply-templates select="/GetRecords/LiveDataMap"/>
<!-- Envelope search, e.g. ogc:BBOX -->
<xsl:apply-templates select="/GetRecords/Envelope"/>
<!-- Date Range Search -->
<xsl:call-template name="tmpltDate"/>
</ogc:And>
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</xsl:element>
</xsl:template>
<!-- key word search : This template is used to pass the search term to the catalog service. The PropertyName 'AnyText' is variable, depending on what your catalog service accepts. 'AnyText' will search all fields, irrespective of which XML element. If you wanted to search only the title or abstract, you could change this PropertyName parameter accordingly. The 'PropertyIsLike' elements (wildCard="" escape= "" singleChar="") are specific to the CSW specification your catalog service follows. -->
<xsl:template match="/GetRecords/KeyWord" xmlns:ogc="http://www.opengis.net/ogc">
<xsl:if test="normalize-space(.)!=''">
<ogc:PropertyIsLike wildCard="" escape="" singleChar="">
<ogc:PropertyName>AnyText</ogc:PropertyName>
<ogc:Literal>
<xsl:value-of select="."/>
</ogc:Literal>
</ogc:PropertyIsLike>
</xsl:if>
</xsl:template>
<!-- LiveDataOrMaps search: This template is used to pass the requirement to retrieve only live data/map records from the catalog service. The PropertyName 'Format' depends on the parameter your catalog service accepts to define the type of resource the resulting record describes. The Literal element "liveData" can be changed to indicate the term your service may use to retrieve live data records.-->
<xsl:template match="/GetRecords/LiveDataMap" xmlns:ogc="http://www.opengis.net/ogc">
<xsl:if test="translate(normalize-space(./text()),'true', 'TRUE') ='TRUE'">
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>Format</ogc:PropertyName>
<ogc:Literal>liveData</ogc:Literal>
</ogc:PropertyIsEqualTo>
</xsl:if>
</xsl:template>
<!-- Envelope search: This template is used to define a bounding box for resulting records returned from the catalog service if the "Use Current Extent" option is selected (ArcMap CSW Client only). Resulting records must fall within this bounding box. Do not change the PropertyName, Box, or coordinates elements.-->
<xsl:template match="/GetRecords/Envelope" xmlns:ogc="http://www.opengis.net/ogc">
<!-- generate BBOX query if minx, miny, maxx, maxy are provided -->
<xsl:if test="./MinX and ./MinY and ./MaxX and ./MaxY">
<ogc:BBOX xmlns:gml="http://www.opengis.net/gml">
<ogc:PropertyName>Geometry</ogc:PropertyName>
<gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coordinates>
<xsl:value-of select="MinX"/>,<xsl:value-of select="MinY"/>,<xsl:value-of select="MaxX"/>,<xsl:value-of select="MaxY"/>
</gml:coordinates>
</gml:Box>
</ogc:BBOX>
</xsl:if>
</xsl:template>
<!-- tmpltDate: This template is used to define the date range for when resulting records returned from the catalog service were modified. This is only used for the geoportal search, and not the CSW Client search. This section needs to be included only if you want to apply your custom profile to the geoportal itself as well as the CSW Client (the custom profile would appear in the dropdown list of profiles when a publisher user registers a CSW repository). Do not change this section.-->
<xsl:template name="tmpltDate" xmlns:ogc="http://www.opengis.net/ogc">
<xsl:if test="string-length(normalize-space(/GetRecords/FromDate/text())) > 0">
<ogc:PropertyIsGreaterThanOrEqualTo>
<ogc:PropertyName>Modified</ogc:PropertyName>
<ogc:Literal><xsl:value-of select="normalize-space(/GetRecords/FromDate/text())"/>
</ogc:Literal>
</ogc:PropertyIsGreaterThanOrEqualTo>
</xsl:if>
<xsl:if test="string-length(normalize-space(/GetRecords/ToDate/text())) > 0">
<ogc:PropertyIsLessThanOrEqualTo>
<ogc:PropertyName>Modified</ogc:PropertyName>
<ogc:Literal><xsl:value-of select="normalize-space(/GetRecords/ToDate/text())"/></ogc:Literal>
</ogc:PropertyIsLessThanOrEqualTo>
</xsl:if>
</xsl:template>
<xsl:attribute-set name="GetRecordsAttributes">
<xsl:attribute name="version">2.0.2</xsl:attribute>
<xsl:attribute name="service">CSW</xsl:attribute>
<xsl:attribute name="resultType">RESULTS</xsl:attribute>
<xsl:attribute name="startPosition">
<xsl:value-of select="/GetRecords/StartPosition"/>
</xsl:attribute>
<xsl:attribute name="maxRecords">
<xsl:value-of select="/GetRecords/MaxRecords"/>
</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:dct="http://purl.org/dc/terms/" xmlns:ows="http://www.opengis.net/ows" xmlns:dc="http://purl.org/dc/elements/1.1/" exclude-result-prefixes="csw dc dct ows">
<xsl:output method="xml" indent="no" encoding="UTF-8" omit-xml-declaration="yes" />
<xsl:template match="/">
<xsl:choose>
<!-- if CSW response returns some exception, do the following -->
<xsl:when test="/ows:ExceptionReport">
<exception>
<exceptionText>
<xsl:for-each select="/ows:ExceptionReport/ows:Exception">
<xsl:value-of select="ows:ExceptionText"/>
</xsl:for-each>
</exceptionText>
</exception>
</xsl:when>
<xsl:otherwise>
<Records>
<xsl:attribute name="maxRecords">
<xsl:value-of select="/csw:GetRecordsResponse/csw:SearchResults/@numberOfRecordsMatched"/>
</xsl:attribute>
<xsl:for-each select="/csw:GetRecordsResponse/csw:SearchResults/csw:Record | /csw:GetRecordsResponse/csw:SearchResults/csw:BriefRecord | /csw:GetRecordByIdResponse/csw:Record | /csw:GetRecordsResponse/csw:SearchResults/csw:SummaryRecord">
<Record>
<ID>
<xsl:choose>
<xsl:when test="string-length(normalize-space(dc:identifier[@scheme='urn:x-esri:specification:ServiceType:ArcIMS:Metadata:DocID']/text())) > 0">
<xsl:value-of select="normalize-space(dc:identifier[@scheme='urn:x-esri:specification:ServiceType:ArcIMS:Metadata:DocID'])"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space(dc:identifier)"/>
</xsl:otherwise>
</xsl:choose>
</ID>
<Title>
<xsl:value-of select="dc:title"/>
</Title>
<Abstract>
<xsl:value-of select="dct:abstract"/>
</Abstract>
<Type>
<xsl:value-of select="dc:type"/>
</Type><!--each profile could have a different type of bounding box. Some of have two, some have four. This one has four -->
<LowerCorner>
<xsl:value-of select="ows:WGS84BoundingBox/ows:LowerCorner"/>
</LowerCorner>
<UpperCorner>
<xsl:value-of select="ows:WGS84BoundingBox/ows:UpperCorner"/>
</UpperCorner>
<MaxX>
<xsl:value-of select="normalize-space(substring-before(ows:WGS84BoundingBox/ows:UpperCorner, ' '))"/>
</MaxX>
<MaxY>
<xsl:value-of select="normalize-space(substring-after(ows:WGS84BoundingBox/ows:UpperCorner, ' '))"/>
</MaxY>
<MinX>
<xsl:value-of select="normalize-space(substring-before(ows:WGS84BoundingBox/ows:LowerCorner, ' '))"/>
</MinX>
<MinY>
<xsl:value-of select="normalize-space(substring-after(ows:WGS84BoundingBox/ows:LowerCorner, ' '))"/>
</MinY>
<ModifiedDate>
<xsl:value-of select="./dct:modified"/>
</ModifiedDate>
<!-- used to extract any urls in the document. It gets the urls and the scheme attribute (@scheme, which determines their type (type of url it is (thumbnail, website, server, contact, etc. urls)). We always choose the "server" url when we add to map. -->
<References>
<xsl:for-each select="./dct:references">
<xsl:value-of select="."/>
<xsl:text>✔</xsl:text>
<xsl:value-of select="@scheme"/>
<xsl:text>✕</xsl:text>
</xsl:for-each>
</References>
<!-- this extracts content type information. Can be used to highlight add to map button-->
<Types>
<xsl:for-each select="./dc:type">
<xsl:value-of select="."/>
<xsl:text>✔</xsl:text>
<xsl:value-of select="@scheme"/>
<xsl:text>✕</xsl:text>
</xsl:for-each>
</Types>
</Record>
</xsl:for-each>
</Records>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns:dct="http://purl.org/dc/terms/"
xmlns:ows="http://www.opengis.net/ows"
exclude-result-prefixes="csw dct">
<xsl:output method="text" indent="no" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:choose>
<xsl:when test="/ows:ExceptionReport">
<exception>
<exceptionText>
<xsl:for-each select="/ows:ExceptionReport/ows:Exception">
<xsl:value-of select="ows:ExceptionText"/>
</xsl:for-each>
</exceptionText>
</exception>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="//csw:Record/dct:references"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="//csw:Record/dct:references">
<xsl:value-of select="."/>
<xsl:text>✔</xsl:text>
<xsl:value-of select="@scheme"/>
<xsl:text>✕</xsl:text>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="utf-8" ?>
<CSWProfiles>
<!-- insert the name of your profile here within comments -->
<Profile>
<ID>
<!-- update the ID value with a unique urn value. Doesn't matter what it is as long as it is unique within this file -->
urn:ogc:CSW:2.0.2:HTTP:YourProfile
</ID>
<Name>
<!-- update the Name value with the name you want to display for your profile in the Profile drop-down on the Configure tab in the CSW Client user interface-->
Unique name for display of Profile
</Name>
<CswNamespace>
<!-- update the CswNamespace value with the namespace for your CSW service. For CSW 2.0.2 services, this will typically be http://www.opengis.net/cat/csw/2.0.2. For earlier CSW services, this may be http://www.opengis.net/cat/csw or another namespace -->
http://www.opengis.net/cat/csw/2.0.2
</CswNamespace>
<Description />
<GetRecords>
<XSLTransformations>
<Request>
<!-- update with the name of your custom profile's GetRecords_Request.xslt file-->
MyOrganizationName_GetRecords_Request.xslt
</Request>
<Response>
<!-- update with the name of your custom profile's GetRecords_Response.xslt file-->
MyOrganizationName_GetRecords_Response.xslt
</Response>
</XSLTransformations>
</GetRecords>
<GetRecordByID>
<RequestKVPs>
<!-- update with syntax appropriate for issuing a GetRecordById request to the type catalog service to which you want to connect. In this example, the service would use CS-W 2.0.2 protocol and the full set of metadata record elements from each source record that should be presented in the response (ElementSetName) -->
<![CDATA[service=CSW&request=GetRecordById&version=2.0.2&ElementSetName=full]]>
</RequestKVPs>
<XSLTransformations>
<Response>
<!-- update with the name of your custom profile's GetRecordByID_Response.xslt file-->
MyOrganizationName_GetRecordByID_Response.xslt
</Response>
</XSLTransformations>
</GetRecordByID>
<SupportSpatialQuery>
<!-- update with True if the CS-W service supports returning queries defined by an extent-->
True
</SupportSpatialQuery>
<SupportContentTypeQuery>
<!-- update with True if the CS-W service supports returning the content type of a metadata record-->
True
</SupportContentTypeQuery>
<SupportSpatialBoundary>
<!-- update with True if the CS-W service supports returning bounding box information -->
True
</SupportSpatialBoundary>
</Profile>
<GetRecordByID>
<RequestKVPs>
<![CDATA[service=CSW&request=GetRecordById&version=2.0.2&ElementSetName=full&outputSchema=original]]>
</RequestKVPs>
<XSLTransformations>
<StyleResponse>Custom_Render.xsl</StyleResponse>
</XSLTransformations>
</GetRecordByID>