Skip to content

Commit

Permalink
Merge pull request #43 from ArchivesNationalesFR/issue-33-recordPart
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrancart authored Aug 2, 2023
2 parents 5ae4a40 + b4135b9 commit be8e67b
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -730,20 +730,20 @@
<!-- 'otherlevel' is already matched above -->
</xsl:choose>
</xsl:when>
<xsl:when test="ead2rico:isRicoRecordPart(.)">
<rdf:type rdf:resource="https://www.ica.org/standards/RiC/ontology#RecordPart"/>
</xsl:when>
<xsl:otherwise>
<!-- nothing -->
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- ***** @otherlevel processing : this is used when determining the type in a function ***** -->
<!-- ***** but we need to generate a dc:type + rico:type in case it is unknown ***** -->
<!-- ***** but we need to generate a dc:type + rico:type systematically ***** -->
<xsl:template match="@otherlevel">
<xsl:if test="not(matches(.,$OTHERLEVEL_RECORDSET_PATTERN))">
<xsl:message><xsl:value-of select="concat($faId,' - id ', ../@id ,' - ','UNKNOWN_VALUE_OF_OTHERLEVEL',' : ',.)" /></xsl:message>
<dc:type><xsl:value-of select="." /></dc:type>
<rico:type><xsl:value-of select="." /></rico:type>
</xsl:if>
<dc:type><xsl:value-of select="." /></dc:type>
<rico:type><xsl:value-of select="." /></rico:type>
</xsl:template>

<!-- ***** custodhist / acqinfo processing for instantiation only ***** -->
Expand Down Expand Up @@ -1583,6 +1583,20 @@
"/>
</xsl:function>

<!-- Tests if a c or archdesc element corresponds to a RecordPart -->
<xsl:function name="ead2rico:isRicoRecordPart" as="xs:boolean">
<xsl:param name="cOrArchdesc"/>

<!-- if archdesc without an explicit level, consider it a RecordSet -->
<xsl:sequence select="
$cOrArchdesc/@level = 'otherlevel'
and
$cOrArchdesc/@otherlevel
and
matches($cOrArchdesc/@otherlevel,$OTHERLEVEL_RECORDPART_PATTERN)
"/>
</xsl:function>


<xsl:function name="ead2rico:isDateRange" as="xs:boolean">
<xsl:param name="text"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

<!-- Pattern to be used to detect RecordSet from the @otherlevel attribute -->
<xsl:param name="OTHERLEVEL_RECORDSET_PATTERN">dossier|fonds|serie|série|articles|groupe-de-pieces|collection|subgrp|sbgrp</xsl:param>
<xsl:param name="OTHERLEVEL_RECORDPART_PATTERN">page-de-titre|groupe-de-page|groupes-de-page|groupe-depage</xsl:param>

<!-- Indicates the root of the URI that will be generated -->
<xsl:param name="BASE_URI">http://data.archives-nationales.culture.gouv.fr/</xsl:param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<rico:includesOrIncluded rdf:resource="recordResource/058220-a3.1" />
<rico:includesOrIncluded rdf:resource="recordResource/058220-a3.2" />
<rico:includesOrIncluded rdf:resource="recordResource/058220-a3.3" />
<rico:includesOrIncluded rdf:resource="recordResource/058220-a3.4" />
</rico:RecordResource>

<!-- cas 3.1 : c RecordSet -->
Expand Down Expand Up @@ -128,5 +129,31 @@
</rico:RecordResource>
</rico:hasOrHadPart>
</rico:RecordResource>


<!-- cas 3.4 : c RecordPart -->
<rico:RecordResource rdf:about="recordResource/058220-a3.4">
<rico:isOrWasIncludedIn rdf:resource="recordResource/top-058220"/>
<rico:hasInstantiation>
<rico:Instantiation rdf:about="instantiation/058220-a3.4-i1">
<rico:isInstantiationOf rdf:resource="recordResource/058220-a3.4"/>
<rdfs:seeAlso rdf:resource="https://www.siv.archives-nationales.culture.gouv.fr/siv/UD/FRAN_IR_058220/a3.4"/>
</rico:Instantiation>
</rico:hasInstantiation>
<rico:hasOrHadPart>
<rico:RecordResource rdf:about="recordResource/058220-a3.4-child">
<rico:isOrWasPartOf rdf:resource="recordResource/058220-a3.4"/>
<!-- This is a RecordPart, hence using isOrWasPartOf -->
<rdf:type rdf:resource="https://www.ica.org/standards/RiC/ontology#RecordPart"/>
<dc:type>page-de-titre</dc:type>
<rico:type>page-de-titre</rico:type>
<rico:hasInstantiation>
<rico:Instantiation rdf:about="instantiation/058220-a3.4-child-i1">
<rico:isInstantiationOf rdf:resource="recordResource/058220-a3.4-child"/>
<rdfs:seeAlso rdf:resource="https://www.siv.archives-nationales.culture.gouv.fr/siv/UD/FRAN_IR_058220/a3.4-child"/>
</rico:Instantiation>
</rico:hasInstantiation>
</rico:RecordResource>
</rico:hasOrHadPart>
</rico:RecordResource>

</rdf:RDF>
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,22 @@
<!-- Cas 3 : archdesc Unknown, implicetly a RecordSet -->
<archdesc>
<dsc>
<!-- Cas 3.1 : c RecordSet -->
<!-- Cas 3.1 : c RecordSet == rico:includesOrIncluded -->
<c id="a3.1" level="subfonds">
<c id="a3.1-child" />
</c>
<!-- Cas 3.2 c Record -->
<!-- Cas 3.2 c Record == rico:hasOrHadConstituent -->
<c id="a3.2" level="item">
<c id="a3.2-child" />
</c>
<!-- Cas 3.3 c Unknown -->
<!-- Cas 3.3 c Unknown == rico:hasOrHadPart -->
<c id="a3.3">
<c id="a3.3-child" />
</c>
<!-- Cas 3.4 c Unknown with RecordPart children == rico:hasOrHadPart and child is typed as RecordPart -->
<c id="a3.4">
<c id="a3.4-child" level="otherlevel" otherlevel="page-de-titre" />
</c>
</dsc>
</archdesc>
</ead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,26 @@
<!-- case 1 : we can match on the value -->
<rico:RecordResource rdf:about="recordResource/top-058220">
<rico:isOrWasDescribedBy rdf:resource="record/058220"/>
<rdf:type rdf:resource="https://www.ica.org/standards/RiC/ontology#RecordSet"/>
<rico:hasInstantiation>
<rico:Instantiation rdf:about="instantiation/top-058220-i1">
<rico:isInstantiationOf rdf:resource="recordResource/top-058220"/>
</rico:Instantiation>
</rico:hasInstantiation>
<rdf:type rdf:resource="https://www.ica.org/standards/RiC/ontology#RecordSet"/>
<dc:type>sous-sous-série</dc:type>
<rico:type>sous-sous-série</rico:type>
<rico:hasInstantiation>
<rico:Instantiation rdf:about="instantiation/top-058220-i1">
<rico:isInstantiationOf rdf:resource="recordResource/top-058220"/>
</rico:Instantiation>
</rico:hasInstantiation>
</rico:RecordResource>

<!-- case 2 : we can't match -->
<rico:RecordResource rdf:about="recordResource/top-058220">
<rico:isOrWasDescribedBy rdf:resource="record/058220"/>
<dc:type>something unknown</dc:type>
<rico:type>something unknown</rico:type>
<rico:hasInstantiation>
<rico:type>something unknown</rico:type>
<rico:hasInstantiation>
<rico:Instantiation rdf:about="instantiation/top-058220-i1">
<rico:isInstantiationOf rdf:resource="recordResource/top-058220"/>
</rico:Instantiation>
</rico:hasInstantiation>
</rico:hasInstantiation>
</rico:RecordResource>


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rico="https://www.ica.org/standards/RiC/ontology#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xml:base="http://data.archives-nationales.culture.gouv.fr/">
<!-- rico recordSetTypes :
https://www.ica.org/standards/RiC/vocabularies/recordSetTypes#Collection
https://www.ica.org/standards/RiC/vocabularies/recordSetTypes#File
https://www.ica.org/standards/RiC/vocabularies/recordSetTypes#Fonds
https://www.ica.org/standards/RiC/vocabularies/recordSetTypes#Series
-->
<rico:Record rdf:about="record/058220">
<rico:hasDocumentaryFormType rdf:resource="https://www.ica.org/standards/RiC/vocabularies/documentaryFormTypes#FindingAid"/>
<rico:describesOrDescribed rdf:resource="recordResource/top-058220"/>
<rico:hasInstantiation>
<rico:Instantiation rdf:about="instantiation/058220-i1">
<rico:isInstantiationOf rdf:resource="record/058220"/>
<dc:format xml:lang="en">text/xml</dc:format>
<rico:identifier>FRAN_IR_058220</rico:identifier>
<rico:hasOrHadHolder rdf:resource="agent/005061"/>
<rdfs:seeAlso rdf:resource="https://www.siv.archives-nationales.culture.gouv.fr/siv/IR/FRAN_IR_058220"/>
</rico:Instantiation>
</rico:hasInstantiation>
</rico:Record>

<!-- case 1 : we can match on the value as RecordPart -->
<rico:RecordResource rdf:about="recordResource/top-058220">
<rico:isOrWasDescribedBy rdf:resource="record/058220"/>
<rdf:type rdf:resource="https://www.ica.org/standards/RiC/ontology#RecordPart"/>
<dc:type>page-de-titre</dc:type>
<rico:type>page-de-titre</rico:type>
<rico:hasInstantiation>
<rico:Instantiation rdf:about="instantiation/top-058220-i1">
<rico:isInstantiationOf rdf:resource="recordResource/top-058220"/>
</rico:Instantiation>
</rico:hasInstantiation>
</rico:RecordResource>

</rdf:RDF>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<ead>
<eadheader>
<!-- the metadata of the finding aid -->
<eadid>FRAN_IR_058220</eadid>
</eadheader>

<!-- case 1 : we can match on the value -->
<archdesc level="otherlevel" otherlevel="page-de-titre" />
</ead>

0 comments on commit be8e67b

Please sign in to comment.