Changes between Initial Version and Version 1 of proposals/MetadataEditorSuggestion


Ignore:
Timestamp:
Jan 27, 2011, 12:51:21 PM (13 years ago)
Author:
fxp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • proposals/MetadataEditorSuggestion

    v1 v1  
     1= Metadata editor suggestion =
     2
     3|| '''Date''' || 2011/01/27 ||
     4|| '''Contact(s)''' || Francois ||
     5|| '''Last edited''' || ||
     6|| '''Status''' || complete ||
     7|| '''Assigned to release''' || 2.7.0 ||
     8|| '''Resources''' || Available ||
     9|| '''Ticket''' || #44XX ||
     10
     11== Overview ==
     12
     13This proposal aims to '''improve metadata quality and help metadata editor make better metadata records'''. The main principle is to provide a set of suggestions based on metadata records analysis. A suggestion checks for a rules and improve provide a mechanism to fix or improved the metadata record on a particular point.
     14
     15Suggestions are defined on a schema basis and could be used on any kind of schema (iso19139 and others).
     16
     17Suggestions analysis is made on a metadata record (not supposed to be applied by massive actions).
     18
     19The suggestion mechanism is based on the 3 main action steps:
     20 1) (Optional) list registered processes for a schema
     21
     22 2) Analyze a metadata record according to a set of suggestions|processes
     23
     24 3) Trigger a particular process to apply the suggestion solutions (require metadata editor action)
     25
     26
     27Some examples of suggestions:
     28 a) Explode keywords containing coma (ie. ',').
     29
     30 b) Check if scale denominator contains '1/' or '1:' or ' ' and remove them.
     31
     32 c) Compute extent if keyword of type place are available based on thesaurus analysis. (see http://trac.osgeo.org/geonetwork/wiki/BoundingBoxFromKeyword)
     33
     34 d) Compute extent if a WMS and layer name is set in the online resource section.
     35
     36 e) If a metadata record contains an INSPIRE theme, add an evaluation section.
     37
     38
     39b) is already available since GeoNetwork 2.5.x but the "compute action" button is available even if no keyword of type pace exists. Suggestion analysis phase allows to only suggests action relevant to current metadata record in the editing session.
     40
     41
     42Metadata editor suggestion should help end users to create better metadata and more up-to-date content.
     43
     44
     45This proposal implements the suggestion service and configuration mechanism. The user interface to interact with this service will be part of a futur proposal. A sample GUI is described here.
     46
     47
     48
     49=== Proposal Type ===
     50 * '''Type''': Editor improvement
     51 * '''App''': !GeoNetwork
     52
     53=== Links ===
     54 * '''Documents''':
     55 * '''Email discussions''':
     56 * '''Other wiki discussions''':
     57
     58=== Voting History ===
     59 * Vote proposed by Francois on XYZ, result was
     60
     61----
     62
     63== Proposal ==
     64A service '''metadata.suggestion''' is added and allowed for metadata editors.
     65
     66Service parameters :
     67 * id or uuid : Mandatory metadata identifier.
     68 * action : The operation to run.
     69  * "list" provide a list of registered processes (default).
     70  * "analyze" will analyze the metadata record agains each process and return a message if the process is applicable.
     71 * process : Optional process identifier to analyze the metadata against.
     72
     73A process is an XSL transformation like the one used by Xsl or MassiveXslProcessing features.
     74
     75
     76=== Configuration of suggestion for a schema ===
     77 * Add a suggest.xsl file in the schema directory.
     78 * Register a new process.
     79{{{
     80  <!-- Register here the list of process for the schema-->
     81  <xsl:include href="process/keywords-comma-exploder.xsl"/>
     82  <xsl:include href="process/scale-denominator-formatter.xsl"/>
     83  <xsl:include href="process/add-extent-from-geokeywords.xsl"/>
     84  <xsl:variable name="processes">
     85    <p>keywords-comma-exploder</p>
     86    <p>scale-denominator-formatter</p>
     87    <p>add-extent-from-geokeywords</p>
     88  </xsl:variable>
     89 
     90}}}
     91
     92=== Process definition ===
     93
     94==== Main configuration ====
     95
     96In order to be visible in schema suggestion, the process :
     97 * MUST be registered in suggest.xsl file for the schema.
     98 * MUST provide 2 templates named list-{processIdentifier} and analyze-{processIdentifier} (the main match="@*|node()" is used for processing). This 2 templates are called by suggest.xsl according to the action of the metadata.suggestion service.
     99
     100The list-* template simply return the process identifier. eg.
     101{{{
     102    <xsl:template name="list-keywords-comma-exploder">
     103      <suggestion process="keywords-comma-exploder"/>
     104    </xsl:template>
     105}}}
     106
     107The analyze-* template check if the metadata record meets the condition of the processes and return useful information to the end user:
     108 * a human readable message to be displayed (TODO : i18n)
     109 * an optional params element to return required parameters definition to run the process
     110eg.
     111{{{
     112<!-- Analyze the metadata record and return available suggestion
     113      for that process -->
     114    <xsl:template name="analyze-keywords-comma-exploder">
     115      <xsl:param name="root"/>
     116      <xsl:variable name="keywordWithComma"
     117        select="$root//gmd:keyword[contains(gco:CharacterString, ',')]"/><!-- TODO : PT_FreeText -->
     118     
     119      <xsl:if test="$keywordWithComma">
     120        <suggestion process="keywords-comma-exploder" category="keyword" target="keyword">
     121          <name xml:lang="en">Keyword field contains "," (ie.
     122            <xsl:value-of select="string-join($keywordWithComma, ' and ')"/>
     123            ). Run this task to explode
     124                that keywords.</name>
     125        </suggestion>
     126      </xsl:if>
     127    </xsl:template>
     128}}}
     129
     130
     131==== Add parameters to your process ====
     132
     133A process may require some parameters to run successfully. For example, the compute extent from keywords need geonetwork URL, the current language (only keyword in GUI language are searched for) and an extra parameter to replace or not the existing extent elements.
     134
     135The parameters definition is the following:
     136{{{
     137<params>{
     138                gurl:{type:'string', defaultValue:'<xsl:value-of select="$gurl"/>'},
     139                lang:{type:'string', defaultValue:'<xsl:value-of select="$lang"/>'},
     140                replace:{type:'boolean', defaultValue:'<xsl:value-of select="$replace"/>'}
     141}</params>
     142}}}
     143(Basically JSON based in order to be easily processed by a JS client).
     144
     145"gurl" and "lang" could be considered as reserved parameter's name and the client should automatically set these value to geonetwork http url (eg. http://localhost:8080) and lang to the current GUI language (and optionnaly hide them from end user). Default values are provided using XSL param default values. eg.
     146{{{
     147  <xsl:param name="lang" select="'en'"/>
     148}}}
     149
     150The client is in charge of settings correct labels for parameters.
     151
     152
     153
     154=== Sample client interface for metadata suggestion ===
     155
     156A suggestion manager could use metadata.suggestion?id=currentMetadataId&action=list to retrieve the list of processes registered for the metadata schema. It could then check if processes have suggestions for the metadata record using metadata.suggestion?id=2&action=analyze to analyze for all known processes or
     157using metadata.suggestion?id=2&action=analyze&process=keywords-comma-exploder to analyze for only one process.
     158
     159The result could be displayed as a list of elements:
     160
     161[[Image(suggestion-manager.png)]]
     162
     163
     164
     165Suggestion depends on metadata content:
     166
     167[[Image(suggestion-analysis.png)]]
     168
     169
     170After processing the metadata record is updated:
     171
     172[[Image(suggestion-analysis-after-processing.png)]]
     173
     174
     175
     176Optionnaly a process may require some extra parameter that need to be defined by end user:
     177
     178[[Image(suggestion-processing-with-parameter.png)]]
     179
     180
     181
     182=== Backwards Compatibility Issues ===
     183None.
     184
     185=== New libraries added ===
     186None.
     187
     188
     189== Participants ==
     190 * Francois