-- Application configuration. local plpath = require "pl.path" local ROOT = os.getenv("PKAR_ROOT") or "" return { id = { -- Length in ASCII characters of system-generated IDs. len = 16, -- Two seeds for the random ID generator. seed = {256, 512}, }, md = { -- Single-valued fields. TODO rely on content model cardinality. single_values = { ["dc:identifier"] = true, ["pas:contentType"] = true, ["dc:title"] = true, ["path"] = true, ["pas:sourcePath"] = true, }, -- Map of data types in prop definitions to RDF literal types. -- Non-mapped items are set to `xsd:string`. datatypes = { integer = "xsd:integer", decimal = "xsd:decimal", float = "xsd:double", boolean = "xsd:boolean", datetime = "xsd:datetime", } }, fs = { -- Base path to write opaque resources. ores_path = os.getenv("PKAR_ORES") or plpath.join(ROOT, "data/ores"), -- Base path of LSUP store for descriptive resources (RDF). dres_path = os.getenv("PKAR_DRES") or plpath.join(ROOT, "data/dres"), -- How many bytes to read when handling files. Adjust to memory -- availability. stream_chunk_size = 1024 ^ 2, -- 1Mb }, -- Namespace prefixes to populate the Pocket Archive NS map. namespace = { b2 = "urn:blake2:", dc = "http://purl.org/dc/terms/", foaf = "http://xmlns.com/foaf/0.1/", par = "urn:pkar:resource/", pas = "http://id.pkar.knowledgetx.com/schema#", premis = "http://id.loc.gov/vocabulary/preservation/", rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#", rdfs = "http://www.w3.org/2000/01/rdf-schema#", xsd = "http://www.w3.org/2001/XMLSchema#", }, -- Static and dynamic site settings. site = { title = "Pocket Archive demo site" }, -- Static site generation settings. htmlgen = { out_dir = "./out/html", }, }