Zum Inhalt

Bookkeeping RDF data model

Introduction

The bookkeeping graph records the identity, storage history, processing state, and provenance of publications handled by the WDM workflows. Its central distinction is between a publication as a logical object and the publication's data locations as physical or workflow-specific representations. One wdmvoc:Publication can therefore have a delivered representation, a component in a shared archive, a current NAS working copy, and one or more archival or dissemination representations without duplicating the publication itself.

The WDM vocabulary namespace is:

@prefix wdmvoc: <https://purl.ulb.tu-darmstadt.de/wdm/voc#> .

The model deliberately reuses established vocabularies: Dublin Core Terms for identifiers, dates, and part relations; PROV-O for derivation and processing provenance; Schema.org for file resources and deletion dates; SPDX for checksums; XKOS for previous/next workflow modules; RiC-O for the controlling pipeline; and OWL for deprecation state.

The description below reflects the vocabulary snapshot from 2025-09-22, the current bookkeeping implementation, and the supplied pb.ttl and generic_delivery_sorter.ttl example graphs.

Overview

Class and relationship overview

Open the editable SVG

The figure uses hollow arrows for rdfs:subClassOf and labelled solid arrows for RDF properties. The inheritance tree is the intended conceptual hierarchy. The runtime graph does not depend on an RDF reasoner: concrete types and relations are written explicitly.

The most important path through the graph is:

Publication --wdmvoc:hasLocation--> DataLocation
DataPackage --dcterms:hasPart-----> DataPackageComponent
DataLocation --dcterms:hasPart----> schema:MediaObject
schema:MediaObject --spdx:checksum-> spdx:Checksum

A package component participates in both of the first two relationships. It belongs to exactly one logical publication in normal bookkeeping data, while the enclosing package can contain components for many publications.

Main classes

Publication

wdmvoc:Publication is the stable logical entity around which bookkeeping data is organized. It is identified with one or more dcterms:identifier literals. These normally include the internally generated UUID and a normalized provider identifier such as doi:10.5194/pb-4-1-2017. Optional identifiers used by later systems are attached to the publication, for example wdmvoc:toolboxID and wdmvoc:dspaceDatasetID.

The publication does not directly contain files. Instead, wdmvoc:hasLocation connects it to each representation of its data. A location IRI is normally constructed by appending a location UUID as a fragment to the publication IRI:

https://wdm.ulb.tu-darmstadt.de/uuid/{publication-uuid}#{location-uuid}

Data locations

wdmvoc:DataLocation is the conceptual superclass of locations at which the data for one independently processed publication can be found. Concrete locations use these common properties:

Property Meaning
dcterms:date Date and time at which the location was registered.
dcterms:hasPart Files recorded as part of the location.
wdmvoc:contentPath Path within the base location or package. It may also name an inner ZIP file.
wdmvoc:contentFilter Optional selector within the path. The implementation currently supports values beginning with regex:.
wdmvoc:locationBaseAbs Stable absolute filesystem path or remote URL for an unpacked location.
prov:wasDerivedFrom Earlier location(s) from which this representation was produced.
prov:wasGeneratedBy Processing activity that created or updated the location.
wdmvoc:hasFlag One or more operational or preservation-state flags.
owl:deprecated Whether the representation has been superseded and should no longer be treated as current.
schema:dateDeleted Actual deletion time; the Unix epoch is used as the sentinel for “not deleted”.

The main concrete location classes are:

Class Purpose
wdmvoc:DeliveryDataPackageComponent Data for one publication inside a shared package received from a provider.
wdmvoc:NASDataPackageComponent Data for one publication inside a shared package stored on the backed-up NAS.
wdmvoc:UnpackedDelivery A delivered source that contains exactly one independently processed publication. “Unpacked” refers to the data-model structure; the source itself may still be a ZIP file.
wdmvoc:NASProcessingFiles The current working representation in the processing area. It carries pipeline routing and the operational flags used to obtain jobs.
wdmvoc:AIP An archival information package in the long-term archive. Its identifier is recorded with dcterms:identifier, and its optional name with wdmvoc:nameOfAIP. AIPs are deliberately excluded when older locations are deprecated.
wdmvoc:DSpaceDataset The publication's dataset representation in DSpace. Its DSpace object UUID is stored on the publication with wdmvoc:dspaceDatasetID.
wdmvoc:WDBPlusText Intended vocabulary class for text converted to the WDB+ XML-based format. See the implementation note below about wdmvoc:DSpaceItem.

wdmvoc:DataPackageComponent and wdmvoc:UnpackedDataLocation are grouping classes. The former covers packed per-publication locations; the latter covers locations that directly represent one publication and therefore do not need a shared package node.

The implementation also uses maintenance types such as wdmvoc:NASProcessingFilesCachingArtefact and wdmvoc:NASProcessingFilesRestartArtefact when old working-location records must be retained but excluded from normal job selection.

Data packages and package components

wdmvoc:DataPackage represents one archive containing data for multiple publications. It has two principal concrete types:

Class Purpose
wdmvoc:DeliveryDataPackage A provider delivery stored outside the backed-up NAS package area, commonly at an SFTP URL.
wdmvoc:NASDataPackage A package retained on backed-up NAS storage and used as a source for further processing.

A package carries a UUID in dcterms:identifier, its stable archive path or URL in wdmvoc:packageLocation, and lifecycle metadata in owl:deprecated and schema:dateDeleted. It links to every component using dcterms:hasPart.

The component, rather than the package, is linked to a publication with wdmvoc:hasLocation. This is what permits one archive to contain many publications:

DeliveryDataPackage ── dcterms:hasPart ──> DeliveryDataPackageComponent
                                                   ^
                                                   |
                                      wdmvoc:hasLocation
                                                   |
                                              Publication

The component selects its files inside the shared package using wdmvoc:contentPath, wdmvoc:contentFilter, or both. The package's wdmvoc:packageLocation is found by following the inverse dcterms:hasPart relation from the component. The component does not repeat wdmvoc:packageLocation in the RDF.

For example, generic_delivery_sorter.ttl contains a DeliveryDataPackage at the SFTP URL .../digital-02-02.zip. It has a component for DOI 10.3390/digital2020018; that component uses contentFilter "regex:^digital-02-00018.". The same publication is linked to that delivery component, a derived NASDataPackageComponent, and a NASProcessingFiles location. prov:wasDerivedFrom connects the NAS component to the delivery component.

Files and checksums

Each registered file is a schema:MediaObject linked from its location with dcterms:hasPart. Its IRI is location-scoped and ends with the relative file path. polymat:hasPath records that relative path as a literal.

The file points through spdx:checksum to an spdx:Checksum resource. SHA-256 checksum resources use a urn:sha256:{digest} IRI and carry:

spdx:algorithm spdx:checksumAlgorithm_sha256 ;
spdx:checksumValue "..."^^xsd:hexBinary .

This separation allows the same checksum resource to be reused when identical content appears in more than one location.

Agents, activities, and workflow routing

The graph uses prov:Agent for workflow modules and prov:Activity for their executions. A versioned agent is connected to its unversioned module with prov:specializationOf. Activities record prov:wasAssociatedWith, prov:startedAtTime, and prov:endedAtTime; nested activities are connected with dcterms:hasPart.

Processing provenance is expressed from both directions used by PROV-O:

  • an activity prov:used its input location or files;
  • a new or updated location/file prov:wasGeneratedBy the activity;
  • a successor location prov:wasDerivedFrom its source location.

For wdmvoc:NASProcessingFiles, xkos:previous and xkos:next point to module agents and represent workflow routing. rico:hasOrHadController links the location to its pipeline. These routing relations, together with the Active flag and suspension date, drive job selection.

Flags

General behavior

wdmvoc:Flag is a class of marker resources. Individual flags are instances, not subclasses, and locations receive them through wdmvoc:hasFlag. They are lightweight annotations used by the orchestration code when choosing, pausing, superseding, or preserving locations.

Flags are not modeled as a single-valued state machine. A location can have several flags at once, and RDF/OWL constraints do not make flags mutually exclusive. Their meaning comes from the code that writes and queries them. They also serve a different purpose from the two lifecycle properties:

  • owl:deprecated true means that a location or package has been superseded and is no longer current;
  • a non-epoch schema:dateDeleted means that its stored content was actually removed;
  • wdmvoc:hasFlag carries workflow or preservation state that may coexist with either lifecycle value.

Operational flags

Flag Meaning in the current implementation
wdmvoc:Active Marks the current NASProcessingFiles location eligible for normal job selection in a pipeline. When a newer working location becomes active, older active locations in that pipeline are deprecated and lose this flag.
wdmvoc:Queued Marks a new working location waiting in the special -inLTA pipeline. It is used instead of Active when a prior location of the publication already carries InLTA; older queued locations are deprecated and marked Outdated. This flag is used by the code although it is absent from the supplied vocabulary snapshot.
wdmvoc:StopProcessing Stops ordinary automatic selection after a module reports a “do not process” result or an integrity check fails. Stopped jobs can be requested explicitly for diagnosis or continuation. A later update removes the old stop marker unless it is deliberately re-added.
wdmvoc:NeedsManualIntervention Intended to mark a location that requires manual handling. The update logic removes this marker when processing resumes. See the naming inconsistency below: job selection currently queries wdmvoc:ManualIntervention.
wdmvoc:Outdated Marks an older active or queued working representation that was superseded by newer data. The implementation normally adds it while also setting owl:deprecated true.
wdmvoc:InLTA Indicates that processing has advanced to long-term-archive ingestion. The presence of this flag changes later incoming data from the default pipeline to the -inLTA queue because a simple restart could invalidate the archived state. Cleanup routines preserve this flag.
wdmvoc:LTAVerified Indicates that the exported archival derivative passed the long-term-archive derivation/hash check. Once present on a publication's processing location, delivery and NAS-package source locations may be deprecated. Cleanup routines preserve this flag.

wdmvoc:suspendedUntil complements the flags. It is an xsd:dateTime on NASProcessingFiles; normal job selection skips a location while this timestamp is in the future, unless suspension is explicitly ignored.

Vocabulary flags without current runtime behavior

The vocabulary snapshot also declares the following wdmvoc:Flag instances, but no producer or consumer for them was found in the current repository or supplied example data:

Flag Vocabulary-level intent / status
wdmvoc:Removed Name suggests removed content; no runtime semantics are currently established. Physical deletion is represented authoritatively by schema:dateDeleted.
wdmvoc:Finished Name suggests completed processing; no runtime semantics are currently established.
wdmvoc:PackageEntryIncomplete Name suggests incomplete package registration or content; no runtime semantics are currently established.
wdmvoc:QueuedForReconversion Name suggests routing into a reconversion queue; no runtime semantics are currently established.
wdmvoc:QueuedForReclassification Name suggests routing into a reclassification queue; no runtime semantics are currently established.

These terms should not be treated as enforced workflow states until their writers, readers, and transition rules are defined.

Compact example

The following shortened Turtle illustrates the core pattern. Identifiers and paths follow the supplied example data, while ellipses replace UUIDs and omitted file lists.

@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix prov:    <http://www.w3.org/ns/prov#> .
@prefix wdmvoc:  <https://purl.ulb.tu-darmstadt.de/wdm/voc#> .

<urn:publication> a wdmvoc:Publication ;
    dcterms:identifier "doi:10.3390/digital2020018" ;
    wdmvoc:hasLocation <urn:delivery-component>,
                       <urn:nas-component>,
                       <urn:processing-location> .

<urn:delivery-package> a wdmvoc:DeliveryDataPackage ;
    wdmvoc:packageLocation
        "sftp://u301496-sub12.your-storagebox.de:22/digital-02-02.zip" ;
    dcterms:hasPart <urn:delivery-component> .

<urn:delivery-component> a wdmvoc:DeliveryDataPackageComponent ;
    wdmvoc:contentFilter "regex:^digital-02-00018." ;
    dcterms:hasPart <urn:delivery-file> .

<urn:nas-component> a wdmvoc:NASDataPackageComponent ;
    prov:wasDerivedFrom <urn:delivery-component> .

<urn:processing-location> a wdmvoc:NASProcessingFiles ;
    wdmvoc:locationBaseAbs "/mnt/nas-tmp/.../digital-02-00018" ;
    wdmvoc:contentPath "current-module" ;
    wdmvoc:hasFlag wdmvoc:Active .

Implementation notes and known inconsistencies

NOTE: This points have been noted down as bokkeeping issues in the harvesting repo. However, their priority is currently pretty low, so they have not been fixed yet.

  • The supplied 2025-09-22 vocabulary is a short working snapshot, not a complete machine-valid ontology. It contains typographical issues (owl:class, rdfs:rdfs:subClassOf, and the malformed QueuedForReclassification subject) and explicitly notes missing location properties. The implementation and example graphs were therefore used to complete this documentation.
  • The vocabulary conceptually declares wdmvoc:DataPackage as a subclass of wdmvoc:DataLocation. In the Python implementation, DataPackage is a separate container class, and package nodes are not linked from publications by wdmvoc:hasLocation; their component nodes are.
  • The vocabulary and update code use wdmvoc:NeedsManualIntervention, while job-selection queries use wdmvoc:ManualIntervention. Until this is normalized, manual-job queries may not find locations written with the vocabulary term.
  • The vocabulary snapshot names wdmvoc:NASDataPackageComponentCachingArtefact, whereas current maintenance code writes wdmvoc:NASProcessingFilesCachingArtefact. These should be regarded as distinct terms until the vocabulary and implementation are aligned.