Changes between Version 45 and Version 46 of Discovery/DiscoveryWebServiceMEDIN


Ignore:
Timestamp:
03/12/09 22:22:18 (10 years ago)
Author:
mpritcha
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Discovery/DiscoveryWebServiceMEDIN

    v45 v46  
    4141<m:GetListNames xmlns:m="urn:DiscoveryServiceAPI"/> 
    4242}}} 
    43 The getListNamesResponse message comprises a <GetListNamesReturn> element, with child elements containing the names of the lists available for inspection: 
     43The getListNamesResponse message comprises a <!GetListNamesReturn> element, with child elements containing the names of the lists available for inspection: 
    4444{{{ 
    4545<GetListNamesReturn xmlns="urn:DiscoveryServiceAPI"> 
     
    6262=== getList operation === 
    6363 
    64 The contents of each of the lists named by the getListNames operation are accessible by invoking a call to the getList operation, with the name of the list as the single argument, encoded as a GetListRequest message, as defined in the WSDL : 
     64The contents of each of the lists named by the getListNames operation are accessible by invoking a call to the getList operation, with the name of the list as the single argument, encoded as a getListRequest message, as defined in the WSDL : 
    6565 
    6666Request: 
     
    8181</GetListReturn> 
    8282}}} 
    83 An explanation of the PresentFormatList list is given later, in the context of the doPresent operation.  
     83An explanation of the [#PresentFormatList PresentFormatList] is given later, in the context of the doPresent operation.  
    8484 
    8585=== doSearch operation === 
     
    9393[[Image(doSearchSchema.png, 400px)]] 
    9494 
    95 ==== Choice of search criteria: <TermSearch>, <SpatialSearch> and <TemporalSearch> ==== 
    96 The <SearchCriteria> element acts as a container enabling the selection of one or more of <TermSearch>, <SpatialSearch> and <TemporalSearch>. Multiple <TermSearch> elements, but only one of each of <SpatialSearch> and <TemporalSearch> may be included, so that the search has at least one component. If more than one of these three main types is specified, the resulting search combines the components in "AND" combination (i.e. metadata records should match the term search AND the spatial search AND the temporal search criteria). 
    97  
    98 ===== TermSearch ===== 
    99 !TermSearch is a full-text search invoked on a specific target field in the discovery database. Child elements <Term> and <TermTarget> should be populated as follows: 
    100   * <Term> : text term to search for. Whitespace separates component words, which are searched in "OR" combination unless the "+" symbol is used between them, in which case the words joined in this way are searched in "AND" combination. 
    101   * <TermTarget> : target field name taken from the [#TermTargetList TermTargetList] list of valid term targets. 
     95==== Choice of search criteria: <!TermSearch>, <!SpatialSearch> and <!TemporalSearch> ==== 
     96The <!SearchCriteria> element acts as a container enabling the selection of one or more of <!TermSearch>, <!SpatialSearch> and <!TemporalSearch>. Multiple <!TermSearch> elements, but only one of each of <!SpatialSearch> and <!TemporalSearch> may be included, so that the search has at least one component. If more than one of these three main types is specified, the resulting search combines the components in "AND" combination (i.e. metadata records should match the term search AND the spatial search AND the temporal search criteria). 
     97 
     98===== !TermSearch ===== 
     99!TermSearch is a full-text search invoked on a specific target field in the discovery database. Child elements <!Term> and <!TermTarget> should be populated as follows: 
     100  * <!Term> : text term to search for. Whitespace separates component words, which are searched in "OR" combination unless the "+" symbol is used between them, in which case the words joined in this way are searched in "AND" combination. 
     101  * <!TermTarget> : target field name taken from the [#TermTargetList TermTargetList] list of valid term targets. 
    102102If multiple <TermSearch> elements are present (e.g. to search different <TermTargets) ), these are interpreted as successive term searches to be combined in "AND" combination. For example: 
    103103 
     
    120120    author contains "lawrence" 
    121121}}} 
    122 If we were to extend the example by adding an additional <TermSearch> '''also''' targetted at the abstract, this would be combined in OR combination with the first <TermSearch> for '''that''' target (abstract), i.e. 
     122If we were to extend the example by adding an additional <!TermSearch> '''also''' targetted at the abstract, this would be combined in OR combination with the first <!TermSearch> for '''that''' target (abstract), i.e. 
    123123 
    124124{{{ 
     
    145145}}} 
    146146 
    147 ===== Spatial searching : <SpatialOperator> and <BoundingBox> ===== 
    148 The search may incorporate a spatial query to restrict results to those metadata records having spatial coverage(s) matching the search criteria defined by the <BoundingBox> elements <LimitNorth>, <LimitSouth>, <LimitEast> and <LimitWest>. An optional element <SpatialReferenceSystem> may be populated with an entry from the [#SpatialReferenceSystem SpatialReferenceSystem] list to specify an alternative spatial reference system (SRS) of the bounding box coordinates. (*Note : this feature is included for future development e.g. ability to supply spatial search coordinates in British National Grid coordinates. Currently the only supported SRS is EPSG:4326 (WGS84 lat/lon), and this will remain as the default if no SRS is specified.) 
    149  
    150 When using SRS EPSG:4326 (default), values for <LimitNorth>, <LimitSouth>, <LimitEast> and <LlimitWest> should be given in decimal degrees latitude and longitude. <LimitNorth> and <LimitSouth> must be in the range -90.0 to +90.0, with <LimitNorth> greater than <LimitSouth>. <LimitWest> and <LimitEast> must be in the range -180.0 to 180.0 and <LimitEast> should be greater than <LimitWest>. Bounding boxes that span the -180 degree meridian, or the poles, are not supported. 
    151  
    152 An optional <SpatialOperator> may be included, populated with a term from the [#SpatialOperatorList SpatialOperatorList], defining the comparison to be applied to spatial coverage(s) related to metadata records. The default value is "overlaps". Note that in the discovery index database, metadata records may contain several spatial coverages, so a match can occur if any of the spatial coverages related to the metadata item match the criteria specified in the spatial search.  
     147===== Spatial searching : <!SpatialOperator> and <!BoundingBox> ===== 
     148The search may incorporate a spatial query to restrict results to those metadata records having spatial coverage(s) matching the search criteria defined by the <!BoundingBox> elements <!LimitNorth>, <!LimitSouth>, <!LimitEast> and <!LimitWest>. An optional element <!SpatialReferenceSystem> may be populated with an entry from the [#SpatialReferenceSystem SpatialReferenceSystem] list to specify an alternative spatial reference system (SRS) of the bounding box coordinates. (*Note : this feature is included for future development e.g. ability to supply spatial search coordinates in British National Grid coordinates. Currently the only supported SRS is EPSG:4326 (WGS84 lat/lon), and this will remain as the default if no SRS is specified.) 
     149 
     150When using SRS EPSG:4326 (default), values for <!LimitNorth>, <!LimitSouth>, <!LimitEast> and <!LimitWest> should be given in decimal degrees latitude and longitude. <!LimitNorth> and <!LimitSouth> must be in the range -90.0 to +90.0, with <!LimitNorth> greater than <!LimitSouth>. <!LimitWest> and <!LimitEast> must be in the range -180.0 to 180.0 and <!LimitEast> should be greater than <!LimitWest>. Bounding boxes that span the -180 degree meridian, or the poles, are not supported. 
     151 
     152An optional <!SpatialOperator> may be included, populated with a term from the [#SpatialOperatorList SpatialOperatorList], defining the comparison to be applied to spatial coverage(s) related to metadata records. The default value is "overlaps". Note that in the discovery index database, metadata records may contain several spatial coverages, so a match can occur if any of the spatial coverages related to the metadata item match the criteria specified in the spatial search.  
    153153 
    154154===== Temporal searching : <!DateRange> ===== 
    155 The search may incoporate a temporal query to restrict results to those metadata records having temporal coverage(s) matching the search criteria specified within <DateRange>. One or two <date> elements may be specified, to represent either a single date, or a date range. Each <Date> element must contain a <DateValue> element populated in the form YYYY-MM-DD, and optionally a <TemporalOperator> element, populated with a value from [#TemporalOperatorList TemporalOperatorList], defining the semantic meaning of this date criterion in the search. In addition, an optional <DateRangeTarget> element may be included, populated with a value from the [#DateRangeTargetList DateRangeTargetList], to enable searching of dates other than the default of "temporal coverage of data".  
     155The search may incoporate a temporal query to restrict results to those metadata records having temporal coverage(s) matching the search criteria specified within <!DateRange>. One or two <Date> elements may be specified, to represent either a single date, or a date range. Each <Date> element must contain a <DateValue> element populated in the form YYYY-MM-DD, and optionally a <!TemporalOperator> element, populated with a value from [#TemporalOperatorList TemporalOperatorList], defining the semantic meaning of this date criterion in the search. In addition, an optional <!DateRangeTarget> element may be included, populated with a value from the [#DateRangeTargetList DateRangeTargetList], to enable searching of dates other than the default of "temporal coverage of data".  
    156156Examples are shown below: 
    157157 
     
    219219}}} 
    220220 
    221 ==== Paging : <Start> and <HowMany> ==== 
    222 The optional elements <Start> and <HowMany> control which records from the result set should be returned (although the total number of hits is always returned as a number to aid with paging in clients). If <Start> is omitted, the default value used is 1 (i.e. the first record). If <HowMany> is omitted, '''all''' records are returned. 
    223  
    224  
    225 ==== Ordering: <OrderBy> and <OrderByDirection> ==== 
    226 Ordering of the result set can optionally be requested by providing an <OrderBy> element containing one or more <OrderByField>s, each with an optional associated <orderByDirection> (default : descending). Available fields for use as an <OrderByField> are listed in the [#OrderByFieldsList OrderByFieldList]. 
     221==== Paging : <Start> and <!HowMany> ==== 
     222The optional elements <Start> and <!HowMany> control which records from the result set should be returned (although the total number of hits is always returned as a number to aid with paging in clients). If <Start> is omitted, the default value used is 1 (i.e. the first record). If <HowMany> is omitted, '''all''' records are returned. 
     223 
     224 
     225==== Ordering: <!OrderBy> and <!OrderByDirection> ==== 
     226Ordering of the result set can optionally be requested by providing an <!OrderBy> element containing one or more <!OrderByField>s, each with an optional associated <!OrderByDirection> (default : descending). Available fields for use as an <!OrderByField> are listed in the [#OrderByFieldsList OrderByFieldList]. 
    227227 
    228228==== Scope of search: <Scope> ==== 
     
    234234 
    235235==== !RecordDetail ==== 
    236 The optional <RecordDetail> element enables selection of the level of detail included in each result returned in the search result. Values must be one of those available from the [#RecordDetailList RecordDetailList]. Default is DocumentId, which simply returns the id of the document corresponding to the result. See [#SearchResults Search Results] section for further explanation of the structures returned in each of these cases. 
     236The optional <!RecordDetail> element enables selection of the level of detail included in each result returned in the search result. Values must be one of those available from the [#RecordDetailList RecordDetailList]. Default is DocumentId, which simply returns the id of the document corresponding to the result. See [#SearchResults Search Results] section for further explanation of the structures returned in each of these cases. 
    237237 
    238238 
     
    242242[[Image(doSearchReturnSchema.png, 400px)]] 
    243243 
    244 The <DoSearchReturn> element contains the following top-level elements: 
     244The <!DoSearchReturn> element contains the following top-level elements: 
    245245 
    246246  Status:: 
    247247    true if successful AND number of hits > 0, false otherwise (designed so that a client need only proceed to parse the rest of the message if results were successfully returned)  
    248   StatusMessage:: 
     248  !StatusMessage:: 
    249249    Textual information regarding success / failure / errors  
    250   ResultId:: 
     250  !ResultId:: 
    251251    reserved for future use  
    252252  Hits:: 
    253253    TOTAL number of hits returned  
    254254  Documents:: 
    255     parent element for <DocumentId>, <DocumentBrief> OR <DocumentSummary> elements (as per choice in search request) containing returned results.  
     255    parent element for <!DocumentId>, <!DocumentBrief> OR <!DocumentSummary> elements (as per choice in search request) containing returned results.  
    256256 
    257257A result where no hits were returned is shown below: 
     
    265265}}} 
    266266 
    267 A result where 2 hits were returned, with the <RecordDetail> set to DocumentId, is shown below: 
     267A result where 2 hits were returned, with the <!RecordDetail> set to !DocumentId, is shown below: 
    268268{{{ 
    269269<DoSearchReturn xmlns="urn:DiscoveryServiceAPI"> 
     
    279279}}} 
    280280 
    281 If <DocumentBrief> is specified as the recordDetail, a <DocumentBrief> element is returned for each result, as outlined in the doSearchResponeMessage, above. This contains the <DocumentId> element, containing the id of the document, but is accompanied by the additional element <Title>, containing the title from the metadata record, and a set of <OrderedField> elements corresponding to the <OrderByField>s used in the search request. In other words, the requested ordering fields are returned alongside the results so that a client can display the content of those fields which contributed to the resulting record ordering. The purpose of this <DocumentBrief> detail option is to enable clients to render a results list directly from the search response, without having immediately to invoke the doPresent operation to retrieve additional detail. 
    282  
    283 Similarly, if <DocumentSummary> is specified as the recordDetail, a <DocumentSummary> element is returned for each result, as outlined in the doSearchResponseMessage, above. In addition to the content added by the <DocumentBrief> option, <DocumentSummary> includes the metadata abstract, and temporal and spatial information. For the temporal and spatial components of this <DocumentSummary> the schema reuses the structures used for the search request, hence the optional temporalOperator are spatialOperator elements are redundant (and will be omitted) from the return context, however the dateRangeTarget element is useful as a contextual reminder of what the returned date pertains to (temporal coverage of data, last revision date of data, or ingestion date of metadata, etc.). 
    284  
    285 A corresponding <DocumentFull> structure is used in the [#doPresentoperation doPresent operation] operation as the structure in which the document payload is returned. 
     281If <!DocumentBrief> is specified as the !RecordDetail, a <!DocumentBrief> element is returned for each result, as outlined in the doSearchResponeMessage, above. This contains the <!DocumentId> element, containing the id of the document, but is accompanied by the additional element <Title>, containing the title from the metadata record, and a set of <!OrderedField> elements corresponding to the <!OrderByField>s used in the search request. In other words, the requested ordering fields are returned alongside the results so that a client can display the content of those fields which contributed to the resulting record ordering. The purpose of this <!DocumentBrief> detail option is to enable clients to render a results list directly from the search response, without having immediately to invoke the doPresent operation to retrieve additional detail. 
     282 
     283Similarly, if <!DocumentSummary> is specified as the recordDetail, a <!DocumentSummary> element is returned for each result, as outlined in the doSearchResponseMessage, above. In addition to the content added by the <!DocumentBrief> option, <!DocumentSummary> includes the metadata abstract, and temporal and spatial information. For the temporal and spatial components of this <!DocumentSummary> the schema reuses the structures used for the search request, hence the optional temporalOperator are spatialOperator elements are redundant (and will be omitted) from the return context, however the dateRangeTarget element is useful as a contextual reminder of what the returned date pertains to (temporal coverage of data, last revision date of data, or ingestion date of metadata, etc.). 
     284 
     285A corresponding <!DocumentFull> structure is used in the [#doPresentoperation doPresent operation] operation as the structure in which the document payload is returned. 
    286286 
    287287=== doPresent operation === 
     
    291291[[Image(doPresentSchema.png, 400px)]] 
    292292 
    293 Within the <Documents> element, one or more <DocumentId> elements should each contain the name of a document (in the form returned in the <DocumentId> of the doSearchReturn message) to be retrieved. The optional <Format> element should be populated with one of the supported format names as listed by the PresentFormatList accessible via the [#getListoperation getList] operation. All documents returned by a single invocation of the doPresent operation are returned in the same format, i.e. the choice of presentFormat applies to the doPresent request and not individual documents. 
     293Within the <Documents> element, one or more <!DocumentId> elements should each contain the name of a document (in the form returned in the <!DocumentId> of the doSearchReturn message) to be retrieved. The optional <Format> element should be populated with one of the supported format names as listed by the PresentFormatList accessible via the [#getListoperation getList] operation. All documents returned by a single invocation of the doPresent operation are returned in the same format, i.e. the choice of presentFormat applies to the doPresent request and not individual documents. 
    294294For information, it should be noted that documents harvested (via OAI-PMH) are, at the time of ingest, stored in their native format but additionally converted to static copies of each of the supported return formats (listed in the [#PresentFormatList PresentFormatList].) When a document is requested for presenation in a particular format, the static copy (either the native copy or the generated copy in the requested format) is returned from the database. 
    295295 
     
    303303  <Status>:: 
    304304    true if there are any documents returned in the payload, false otherwise.  
    305   <StatusMessage>:: 
     305  <!StatusMessage>:: 
    306306    Textual information regarding success / failure / errors.  
    307307  <Documents>:: 
    308     If some documents have been successfully returned, a <documents> element is present and will contain a child <DocumentFull> element for each document retrieved. In the case where some but not all documents are successfully returned, the <Documents> element will contain populated <DocumentFull> elements for the successfully-retrieved documents, but <DocumentFull> elements containing a populated <DocumentId> but unpopulated <Document> element for those where retrieval failed. If NO documents are successfully returned, however, then the <Status> is set to false and no <Documents> element is included in the doPresentResponse message. 
     308    If some documents have been successfully returned, a <documents> element is present and will contain a child <!DocumentFull> element for each document retrieved. In the case where some but not all documents are successfully returned, the <Documents> element will contain populated <!DocumentFull> elements for the successfully-retrieved documents, but <!DocumentFull> elements containing a populated <!DocumentId> but unpopulated <Document> element for those where retrieval failed. If NO documents are successfully returned, however, then the <Status> is set to false and no <Documents> element is included in the doPresentResponse message. 
    309309 
    310310The <Document> element, if present and populated, contains the retrieved document as an encapsulated string representation of the XML. Depending on the client used to display the payload document, it either appears contained within a <![CDATA[ ... ]]> construct, or as XML with the opening angle brackets "<" escaped as "&lt;". Most XML parsers should successfully parse the string to reconstruct the XML document, but it is returned in this form to avoid namespace issues.  
     
    350350The following lists and their contents are available via the getListNames and getList operations, but are repeated here with explanations of the list members. 
    351351 
    352 === TermTargetList === 
    353  FullText:: 
     352=== !TermTargetList === 
     353 !FullText:: 
    354354   Target is a stored version of the original harvested XML metadata document 
    355355 Author:: 
     
    357357 Parameter:: 
    358358   Target is entries in the discovery index database corresponding to parameter keywords extracted from the metadata. 
    359  MEDINTermTarget.1*:: 
     359 !MEDINTermTarget.1*:: 
    360360   Target is entry in the discovery database corresponding to the '''MEDINTermTarget.1''' field in the MEDIN metadata format. (*It has been agreed that the search capability will be extended to support direct searching of a limited number of target fields within the MEDIN metadata format. List of fields currently to be confirmed by MEDIN). 
    361361 
    362 === PresentFormatList === 
     362=== !PresentFormatList === 
    363363 
    364364 DC:: 
     
    371371   ISO19115 (Geographic Information: Metadata) encoded as ISO19139 XML. Currently an alias for MEDIN_v2.3.1, i.e. the MEDIN format is used as the implementation of ISO within the Discovery Service. 
    372372 
    373 === OrderByFieldList === 
    374  TextRelevance:: 
     373=== !OrderByFieldList === 
     374 !TextRelevance:: 
    375375   Ranking metric based on relevance of match to search term (metric derived by postgres text ranking function). 
    376  DatasetStartDate::  
     376 !DatasetStartDate::  
    377377   The start date of the date range given for the temporal coverage of the metadata record. Records with no start date defined are treated as if their start date is later than that last record with a start date defined, hence appearing at the end of the results. 
    378  DatasetEndDate::  
     378 !DatasetEndDate::  
    379379   The end date of the date range given for the temporal coverage of the metadata record. Records with no end date defined are treated as if their end date is later than that last record with a start date defined, hence appearing at the end of the results. 
    380  DataCentre:: 
     380 !DataCentre:: 
    381381   The name of the data centre supplying the metadata record. In the case of records supplied in DIF format, this is the Data_Centre_Name/Short_Name field. In the case of other metadata formats, the most appropriate equivalent field is used as this index (e.g. "DistributorName" for MDIP format) 
    382  DatasetResultsetPopularity:: 
     382 !DatasetResultsetPopularity:: 
    383383   Measure of the popularity of a metadata record, related to how many times it has appeared in a result set in discovery searches. 
    384  Proximity:: 
     384 !Proximity:: 
    385385   The geographical proximity of the centre of the spatial coverage defined in the metadata record to the centre of the original search bounding box.  Where no spatial information was originally selected proximity is calculated against the centre of a 'global' bounding box (0N, 0E).  Metadata records with no spatial information originally defined are omitted from the search 
    386  ProximityNearMiss:: 
     386 !ProximityNearMiss:: 
    387387   An ordering based on records that were not within the originally requested spatial extent, but that occur within an arbritrary 10% of the original bounding box extent.  Where records are present that satisfy this scenario, they are ordered according to proximity to the outside edge of the original bounding box.  This option is to give users an idea of datasets that were close to the original bounding box and still matched the search without having to redefine the original bounding box and original search terms.  
    388  DatasetUpdateOrder:: 
     388 !DatasetUpdateOrder:: 
    389389   Date order based on the most recent update/edit by the original provider to the metadata record. 
    390  DatasetOrder:: 
     390 !DatasetOrder:: 
    391391   Alphabetical order based on the name of the metadata record.  In DIF records this is the Entry_Title field and for MDIP the Title field. 
    392  DiscoveryIngestDate:: 
     392 !DiscoveryIngestDate:: 
    393393   Date order based on the date of insertion of that record into the underlying database supporting the service.  Note that this differs from "datasetUpdateOrder" in that this records the actual date a record was placed in the database as opposed to the last edit date of that record. 
    394  MEDINTermTarget.1*:: 
     394 !MEDINTermTarget.1*:: 
    395395   One of fields specified by MEDIN for use as a termTarget : it should be possible to configure these for use as orderByFields, too. 
    396396 
    397 === ScopeList === 
     397=== !ScopeList === 
    398398 MDIP:: 
    399399   Marine Data Information Partnership (organisation now renamed MEDIN) 
     
    408408 
    409409 
    410 === SpatialOperatorList === 
     410=== !SpatialOperatorList === 
    411411 Overlaps (default):: 
    412412   Return metadata records having one or more spatial coverages that spatially overlap the search bounding box.  
    413  DoesNotOverlap:: 
     413 !DoesNotOverlap:: 
    414414   Return metadata records having no spatial coverages that spatially overlap the search bounding box. 
    415415 Within:: 
    416416   Return metadata records having one or more spatial coverages that are entirely within the search bounding box. 
    417417 
    418 === SpatialReferenceSystemList === 
     418=== !SpatialReferenceSystemList === 
    419419 EPSG:4326:: 
    420420   WGS84 Lat/Lon, in decimal degrees 
    421421 
    422422=== DateRangeTargetList === 
    423  TemporalCoverage:: 
     423 !TemporalCoverage:: 
    424424   The temporal coverage of the data described by the metadata record. 
    425  LastRevisionDate:: 
     425 !LastRevisionDate:: 
    426426   The data of last revision to the dataset, recorded in the metadata record. 
    427  DiscoveryIngestDate:: 
     427 !DiscoveryIngestDate:: 
    428428   The date that the metadata record was (last) ingested into the discovery index. 
    429429 
     
    431431 Equals:: 
    432432   Target date value is the same as the date specified 
    433  DoesNotEqual:: 
     433 !DoesNotEqual:: 
    434434   Target date values does not equal the date specified 
    435  OnOrBefore:: 
     435 !OnOrBefore:: 
    436436   Target date is equal to or before the date specified 
    437  OnOrAfter:: 
     437 !OnOrAfter:: 
    438438   Target date is equal to or after the date specified 
    439439 Before:: 
     
    442442   Target date is after the date specified 
    443443 
    444 === MetadataFormatList === 
     444=== !MetadataFormatList === 
    445445(Note this is separate from presentFormatList, to distinguish between purposes). metadataFormatList lists values available to distinguish the original source format of a harvested metadata item. 
    446446 
     
    454454   ISO19115 (Geographic Information: Metadata) encoded as ISO19139 XML. Currently an alias for MEDIN_v2.3.1, i.e. the MEDIN format is used as the implementation of ISO within the Discovery Service. 
    455455 
    456 === RecordDetailList === 
     456=== !RecordDetailList === 
    457457 Id:: 
    458458   Return a <DocumentId> element containing the id of the matching metadata document, in a form that can be used as input to a doPresent request.