Skip to content

Commit

Permalink
[#14] Updated MMO mapping. Extended example.
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Jul 23, 2024
1 parent eaa9db3 commit 58e755c
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 14 deletions.
41 changes: 27 additions & 14 deletions transformations/abcd2bioschemas/abcd2bioschemas-xml.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ exclude-result-prefixes="xsl md panxslt set">
<xsl:variable name="biostratigraphic" select="/abcd:DataSets/abcd:DataSet/abcd:Units/abcd:Unit/abcd:Gathering/abcd:Stratigraphy/abcd:BiostratigraphicTerms/abcd:BiostratigraphicTerm/abcd:Term"></xsl:variable>
<xsl:variable name="taxon_name" select="/abcd:DataSets/abcd:DataSet/abcd:Units/abcd:Unit/abcd:Identifications/abcd:Identification/abcd:Result/abcd:TaxonIdentified/abcd:ScientificName/abcd:FullScientificNameString"></xsl:variable>
<xsl:variable name="higher_taxon" select="/abcd:DataSets/abcd:DataSet/abcd:Units/abcd:Unit/abcd:Identifications/abcd:Identification/abcd:Result/abcd:TaxonIdentified/abcd:HigherTaxa/abcd:HigherTaxon/abcd:HigherTaxonName"></xsl:variable>
<xsl:variable name="multimedia_object" select="/abcd:DataSets/abcd:DataSet/abcd:Units/abcd:Unit/abcd:MultimediaObjects/abcd:MultimediaObject"></xsl:variable>
<xsl:variable name="multimedia_object" select="/abcd:DataSets/abcd:DataSet/abcd:Units/abcd:Unit/abcd:MultiMediaObjects/abcd:MultiMediaObject"></xsl:variable>



Expand Down Expand Up @@ -215,19 +215,32 @@ exclude-result-prefixes="xsl md panxslt set">
</temporalCoverage>
</xsl:if>

<!-- associatedMedia -->
<xsl:for-each select="$multimedia_object">
<associatedMedia>
<contentUrl><xsl:value-of select="./abcd:FileURI"/></contentUrl>
<mainEntityOfPage><xsl:value-of select="./abcd:ProductURI"/></mainEntityOfPage>
<encodingFormat><xsl:value-of select="./abcd:MIMEType"/></encodingFormat>
<xsl:for-each select="./IPR/Licenses/License">
<name><xsl:value-of select="./Text"/></name>
<description><xsl:value-of select="./Details"/></description>
<uri><xsl:value-of select="./URI"/></uri>
</xsl:for-each>
</associatedMedia>
</xsl:for-each>
<!-- associatedMedia -->
<xsl:for-each select="$multimedia_object">
<associatedMedia type="MediaObject">
<contentUrl><xsl:value-of select="./abcd:FileURI"/></contentUrl>
<mainEntityOfPage><xsl:value-of select="./abcd:ProductURI"/></mainEntityOfPage>
<encodingFormat><xsl:value-of select="./abcd:Format"/></encodingFormat>
<xsl:for-each select="./abcd:IPR/abcd:Licenses/abcd:License">
<license type="CreativeWork">
<xsl:if test="./abcd:Text">
<name><xsl:value-of select="./abcd:Text"/></name>
</xsl:if>
<xsl:if test="./abcd:Details">
<description><xsl:value-of select="./abcd:Details"/></description>
</xsl:if>
<xsl:if test="./abcd:URI">
<url><xsl:value-of select="./abcd:URI"/></url>
</xsl:if>
</license>
</xsl:for-each>
<xsl:if test="./abcd:Creator">
<creator type="Person">
<name><xsl:value-of select="./abcd:Creator"/></name>#
</creator>
</xsl:if>
</associatedMedia>
</xsl:for-each>

<!-- Keywords -->
<xsl:for-each select="$scope_taxonomic[not(.=preceding::*)]">
Expand Down
58 changes: 58 additions & 0 deletions transformations/abcd2bioschemas/example_files/HoffmannPlantsV3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,36 @@
</Identification>
</Identifications>
<RecordBasis>HumanObservation</RecordBasis>
<MultiMediaObjects>
<MultiMediaObject>
<FileURI>https://image.bgbm.org/images/internal/HerbarThumbs/test0</FileURI>
<ProductURI>https://herbarium.bgbm.org/object/test0</ProductURI>
<Format>image/jpeg</Format>
<IPR>
<Licenses>
<License>
<Text>Partial images provided by this server are released under the Creative Commons cc-by-sa 3.0 (generic) licence [https://creativecommons.org/licenses/by-sa/3.0/de/]. Please credit images to BGBM following our citation guidelines [https://ww2.bgbm.org/Herbarium/cite.cfm]. If you would like to use images in a format or resolution which is not provided here, please contact us (d.roepert[at]bgbm.org).</Text>
<URI>https://creativecommons.org/licenses/by-sa/3.0/</URI>
</License>
</Licenses>
</IPR>
<Creator>Hoffmann, Anke</Creator>
</MultiMediaObject>
<MultiMediaObject>
<FileURI>https://herbarium.bgbm.org/data/iiif/test0/manifest.json</FileURI>
<ProductURI>https://iiif.bgbm.org/?manifest=https://herbarium.bgbm.org/object/test0/manifest.json</ProductURI>
<Format>application/json</Format>
<IPR>
<Licenses>
<License>
<Text>Partial images provided by this server are released under the Creative Commons cc-by-sa 3.0 (generic) licence [https://creativecommons.org/licenses/by-sa/3.0/de/]. Please credit images to BGBM following our citation guidelines [https://ww2.bgbm.org/Herbarium/cite.cfm]. If you would like to use images in a format or resolution which is not provided here, please contact us (d.roepert[at]bgbm.org).</Text>
<URI>https://creativecommons.org/licenses/by-sa/3.0/</URI>
</License>
</Licenses>
</IPR>
<Creator>Hoffmann, Anke</Creator>
</MultiMediaObject>
</MultiMediaObjects>
<Gathering>
<DateTime>
<ISODateTimeEnd>1995-06-13</ISODateTimeEnd>
Expand Down Expand Up @@ -150,6 +180,34 @@
</Identification>
</Identifications>
<RecordBasis>HumanObservation</RecordBasis>
<MultiMediaObjects>
<MultiMediaObject>
<FileURI>https://image.bgbm.org/images/internal/HerbarThumbs/test1</FileURI>
<ProductURI>https://herbarium.bgbm.org/object/test1</ProductURI>
<Format>image/jpeg</Format>
<IPR>
<Licenses>
<License language="en">
<Text>Partial images provided by this server are released under the Creative Commons cc-by-sa 3.0 (generic) licence [https://creativecommons.org/licenses/by-sa/3.0/de/]. Please credit images to BGBM following our citation guidelines [https://ww2.bgbm.org/Herbarium/cite.cfm]. If you would like to use images in a format or resolution which is not provided here, please contact us (d.roepert[at]bgbm.org).</Text>
<URI>https://creativecommons.org/licenses/by-sa/3.0/</URI>
</License>
</Licenses>
</IPR>
</MultiMediaObject>
<MultiMediaObject>
<FileURI>https://herbarium.bgbm.org/data/iiif/test1/manifest.json</FileURI>
<ProductURI>https://iiif.bgbm.org/?manifest=https://herbarium.bgbm.org/object/test1/manifest.json</ProductURI>
<Format>application/json</Format>
<IPR>
<Licenses>
<License language="en">
<Text>Partial images provided by this server are released under the Creative Commons cc-by-sa 3.0 (generic) licence [https://creativecommons.org/licenses/by-sa/3.0/de/]. Please credit images to BGBM following our citation guidelines [https://ww2.bgbm.org/Herbarium/cite.cfm]. If you would like to use images in a format or resolution which is not provided here, please contact us (d.roepert[at]bgbm.org).</Text>
<URI>https://creativecommons.org/licenses/by-sa/3.0/</URI>
</License>
</Licenses>
</IPR>
</MultiMediaObject>
</MultiMediaObjects>
<Gathering>
<DateTime>
<ISODateTimeEnd>1995-06-13</ISODateTimeEnd>
Expand Down

0 comments on commit 58e755c

Please sign in to comment.