dpa-gmbh / metadata-mapper

http://dpa-gmbh.github.io/metadata-mapper/
Other
5 stars 1 forks source link

processing copyright holder #32

Open schmidt-nia opened 9 years ago

schmidt-nia commented 9 years ago

The mapping for the common used source (IIM 2:115) is defined as follows:

<metadata name="Source">
  <xpath rank="1"><![CDATA[//rightsInfo/copyrightHolder/name]]></xpath>
  <iim>
    <mapsTo field="Source" dataset="115" targetType="STRING"/>
  </iim>
  <xmp>
    <mapsTo field="Source" targetNamespace="http://ns.adobe.com/photoshop/1.0/" targetType="Text"/>
  </xmp>
</metadata>

Regarding the rightsInfo model of G2, there can be more then one <rightsInfo> elements with different validity dates. e.g.

<rightsInfo validto="2015-03-11T08:06:29+01:00">
  <copyrightHolder qcode="nprov:xyz">
    <name>another provider</name>
  </copyrightHolder>
</rightsInfo>
<rightsInfo validto="2015-03-10T00:00:00+01:00">
  <copyrightHolder qcode="nprov:dpa">
    <name>dpa</name>
  </copyrightHolder>
</rightsInfo>

In case of multiple rightsInfothe following strategy should be implemented:

  1. use exists(//rightsInfo[isEmpty(@validto)]
  2. use //rightsInfo[@validto = max(//rightsInfo/xs:dateTime(@validto))]
schmidt-nia commented 9 years ago

We need a xpath 2.0 implementation e.g. Saxon 9.x to support this feature. I made some experiments and will add code sniplets

ola-github commented 9 years ago

please see also: #33