Skip to content

File

A file recordtype will need the following properties.

Type

memorix:typeOf memorix:File;

Marks the recordtype as "File" recordtype.

File identifier

Statement on a string field to be used as custom identifier by the archival institution.

memorix:typeOf memorix:Identifier

This is a statement on a link field to identify the relation to the fond.

memorix:typeOf memorix:FondsFieldLink

Optional tree path

It's possible to display the path of all series back to the fond to see the context of the file within the fonds.

1
2
3
4
memorix:hasInformationComponent [
        a memorix:TreePathComponent ;
        memorix:hasRecordtype recordtypes:Serie ;
] ;

Reference recordtype

Below is a basic implementation of File recordtype.

@prefix dc:              <http://purl.org/dc/elements/1.1/> .
@prefix sh:              <http://www.w3.org/ns/shacl#> .
@prefix rdf:             <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:            <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dash:            <http://datashapes.org/dash#> .
@prefix xsd:             <http://www.w3.org/2001/XMLSchema#> .
@prefix skos:            <http://www.w3.org/2004/02/skos/core#> .
@prefix html:            <http://www.w3.org/1999/xhtml/> .
@prefix memorix:         <http://memorix.io/ontology#> .
@prefix vocabularies:    </vocabularies/> .
@prefix recordtypes:     </resources/recordtypes/> .
@prefix file:            </resources/recordtypes/File#> .

recordtypes:File
    a                    memorix:Recordtype, sh:NodeShape ;
    rdfs:label           "File" ;
    rdfs:comment         "File recordtype" ;
    dc:identifier        "File" ;
    sh:closed            true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:targetClass       recordtypes:File ;
    memorix:typeOf       memorix:File ;
    memorix:hasInformationComponent [
        a memorix:DepotLocationComponent ;
    ] ;
    # Element to show the path of all serie records back to the Fonds
    memorix:hasInformationComponent [
        a memorix:TreePathComponent ;
        memorix:hasRecordtype recordtypes:Serie ;
    ] ;
    sh:property          [ memorix:typeOf   memorix:Identifier ;
                           rdfs:label       "File identifier"@en ;
                           html:placeholder "Enter a file identifier"@en ;
                           sh:path          file:id ;
                           memorix:inTitleAt 1.0 ;
                           sh:order         1.0 ;
                           sh:message       "File identifier field should not be empty"@en ;
                           sh:group         file:DisplayGroup ;
                           dash:editor      dash:TextFieldEditor ;
                           sh:datatype      xsd:string ;
                           sh:minCount      1 ;
                           sh:maxCount      1 ; ] ;
    sh:property          [ rdfs:label        "Title" ;
                           sh:path           file:title ;
                           memorix:inTitleAt 2.0 ;
                           sh:minCount       1 ;
                           sh:maxCount       1 ;
                           sh:order          2.0 ;
                           sh:message        "Title field is required" ;
                           sh:group          file:DisplayGroup ;
                           sh:datatype       xsd:string ;
                           dash:editor       dash:TextFieldEditor ;
                           dash:singleLine   true ; ] ;
    sh:property          [ memorix:typeOf memorix:FondsFieldLink ;
                           rdfs:label     "Fonds/Archive" ;
                           sh:path        file:fonds ;
                           sh:order       3.0 ;
                           sh:nodeKind    sh:IRI ;
                           sh:or          ( [ sh:class recordtypes:Fonds ] ) ;
                           sh:group       file:DisplayGroup ;
                           dash:editor    memorix:LinkedRecordEditor ;
                           sh:minCount    1 ;
                           sh:maxCount    1 ; ] ;
    sh:property          [ rdf:type            sh:PropertyShape ;
                           rdfs:label          "Description"@nl ;
                           sh:path             file:textarea ;
                           memorix:inSummaryAt 1.0 ;
                           sh:maxCount         1 ;
                           sh:order            4.0 ;
                           sh:message          "Empty or missing description." ;
                           sh:datatype         xsd:string ;
                           sh:group            file:DisplayGroup ;
                           dash:editor         dash:TextAreaEditor ;
                           dash:singleLine     false ; ] ;
.

file:DisplayGroup
    rdf:type   sh:PropertyGroup ;
    rdfs:label "File" ;
    sh:order   1.0
.