clarin-eric / VLO

Virtual Language Observatory
GNU General Public License v3.0
14 stars 6 forks source link

Separate field/facet configuration from concept mapping #318

Closed twagoo closed 3 years ago

twagoo commented 3 years ago

Currently concept mapping and display and behaviour aspects of fields and facets are defined in a single file. Define a new schema for configuring fields and facets.

This could also incorporate the classification of technical fields, hidden fields etc that is currently part of VloConfig.xml.

Conditions (see #36, #290) could also be defined here.

Example

Snippet from current (VLO 4.9) facetConcepts.xml file:

<facetConcepts>
    ...
    <facetConcept name="projectName" description="The project within which the resource or tool was created" definition="The name of the project(s) originally involved in the creation of the resource or tool, also if these projects no longer exist or are not the ones to be contacted regarding the resource/tool, which is often the case.">
        <concept>http://www.isocat.org/datcat/DC-2536</concept>
        (..)

        <pattern>/cmd:CMD/cmd:Components/cmdp:teiHeader/cmdp:fileDesc/cmdp:publicationStmt/cmdp:publisher/cmdp:orgName/cmdp:orgName[@role="project"]/text()</pattern>
        (..)
    </facetConcept>
    ...
</facetConcepts>

A field configuration could look like this:

<facets>
    ...
    <facet name="projectName">
        <allowMultipleValues>false</allowMultipleValues>
        <multilingual>false</multilingual>
        <description>The project within which the resource or tool was created</description>
        <definition>The name of the project(s) originally involved in the creation of the resource or tool, also if these projects no longer exist or are not the ones to be contacted regarding the resource/tool, which is often the case</definition>
    </facet>
    ...
</facets>
twagoo commented 3 years ago

Also configure primary/secondary facets, technical facets etc here?

twagoo commented 3 years ago

Facet description, definition, display type(s) and optional conditions defined in new facets configuration file. For current testing snapshot, see https://github.com/clarin-eric/VLO-mapping/blob/1.6.0-beta1/config/facetsConfiguration.xml