Skip to the content.

.NET E-ARK SIP

Build Status
Latest Release
License

A .NET library and CLI tool for creating E-ARK Submission Information Packages (SIPs). Providing support for E-ARK SIP formats (2.0.4, 2.1.0, 2.2.0), this project makes it easier to create and manage valid SIPs for long-term digital preservation using the E-ARK standards.

Table of Contents

Introduction

This repository provides a command-line interface (CLI) and a .NET library to create E-ARK Submission Information Packages version 2.2.0.

The E-ARK Information Package specifications are maintained by the DILCIS Board. The DILCIS Board is an international group of experts dedicated to developing and maintaining interoperability specifications for the long-term preservation of digital content.

These specifications have been sponsored and are promoted by the European Commission under the eArchiving Initiative.

Why .NET E-ARK SIP?

Features

Requirements

Download the latest release to use as a standalone CLI tool, or reference it in your .NET project.

Usage

You can use the dotnet-eark-sip as a command-line tool or as a .NET library (by referencing it in your project).

Use as a Command-line Tool

  1. Download the latest release.
  2. Unzip or place the tool in a directory of your choice.
  3. Run the following command (adjusting paths accordingly):
dotnet-eark-sip-cli create

Available options

Descriptive Metadata Options
Representation Options

Example

dotnet-eark-sip-cli create --metadata-files metadata.xml --metadata-types ead --metadata-schemas ead2002.xsd \
--representation-data-lists dataFile1.pdf,dataFolder1,dataFile2.png \
--sip-id sip1 --ancestors sip2,sip3 --documentation documentation1,documentationFolder \
--path outputFolder --submitter-name agent1 --submitter-id 123

Use as a .NET Library

Note: If you do not plan to use this as a .NET library, you can skip this section.

Install the package via NuGet

dotnet add package dotnet-eark-sip

Use it in your .NET code

// Import dependencies
using IP;
using Mets;

// Start creating a SIP
SIP sip = new EARKSIP("SIP_1", IPContentType.GetMIXED(), IPContentInformationType.GetMIXED(), "2.2.0");

// Set the name of the software that is submitting the SIP (mandatory)
sip.AddsubmitterSoftwareAgent("Instituto de Gestão Financeira e Equipamentos da Justiça", "IGFEJ");

// Set optional human-readable description
sip.SetDescription("A full E-ARK SIP");

// Add descriptive metadata (SIP level)
string metadataPath = ".\\Resources\\EARK\\metadata_descriptive_dc.xml";
IPDescriptiveMetadata descriptiveMetadata = new(
   new IPFile(metadataPath),
   new MetadataType(IMetadataMdtype.DC),
   null
);
sip.AddDescriptiveMetadata(descriptiveMetadata);

// Add xml schema (SIP level)
string schemaPath = ".\\Resources\\EARK\\schema.xsd";
sip.AddSchema(new IPFile(schemaPath));

// Add a representation (status will be set to the default value, i.e. ORIGINAL)
IPRepresentation representation1 = new("representation 1");
sip.AddRepresentation(representation1);

// Add a file to the representation
string representationFilePath = ".\\Resources\\EARK\\documentation.pdf";
IPFile representationFile = new(representationFilePath);
representationFile.SetRenameTo("data_.pdf");
representation1.AddFile(representationFile);

// Add another representation
IPRepresentation representation2 = new("representation 2");
sip.AddRepresentation(representation2);

// Add a file to the representation and put it inside a folder
// called 'abc' which has a folder inside called 'def'
IPFile representationFile2 = new(representationFilePath);
representationFile2.SetRelativeFolders(["abc", "def"]);
representation.AddFile(representationFile2);

// Set optional related information about ancestors
sip.SetAncestors(["b6f24059-8973-4582-932d-eb0b2cb48f28"]);

// Build the SIP
ZipWriteStrategyFactory zipWriteStrategyFactory = new();
IWriteStrategy writeStrategy = zipWriteStrategyFactory.Create(outputPath);
string zipSIP = sip.Build(writeStrategy);

In-depth usage

Look into the repository’s dotnet-eark-sip-examples folder for more in-depth usage patterns and advanced features.

Contributing

Contributions are welcome! Here are the basic steps:

  1. Fork the repository and clone your fork.
  2. Create a new feature branch.
  3. Commit your changes, ensuring you follow the existing style and conventions.
  4. Open a Pull Request (PR) describing the changes you’ve made and why they’re needed.

FAQ

  1. Does this work on all platforms?
    Yes, it is built for .NET Standard 2.0, so it should work on Windows, macOS, and Linux.

  2. Are older versions of .NET supported?
    .NET Standard 2.0 is compatible with .NET 5 (and higher), .NET Core 2.0 (and higher), and .NET Framework 4.6.1 (with some limitations).

  3. What if I need an E-ARK version not listed?
    Feel free to open an issue or contribute via pull request.

License

This project is licensed under the European Union Public Licence (EUPL) version 1.2. The EUPL grants you the following rights:

  1. Use and access: You are free to download and use this software, in whole or in part, for any lawful purpose, subject to the terms of the licence.
  2. Modification: You can modify the source code to suit your needs, and you are encouraged to contribute your improvements back to the community.
  3. Distribution: You can redistribute the original code or your modified version(s) to others. When you do, you must share it under the EUPL or a compatible licence, making the source code available under equivalent conditions.

Limitations and Requirements

For full details, please refer to the EUPL licence text.

Credits

Sponsorship

The sponsor of this development was the Institute for the Financial Management and Infrastructures of Justice (IGFEJ) a public institute, endowed with administrative and financial autonomy and its own assets, which pursues the attributions of the Ministry of Justice, under its supervision and tutelage.

The funding was provided by: Sponsor