app.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. -- Application configuration.
  2. local ROOT = os.getenv("PKA_ROOT") or "./"
  3. return {
  4. md = {
  5. -- Single-valued fields. TODO rely on content model cardinality.
  6. single_values = {
  7. ["dc:identifier"] = true,
  8. ["dc:type"] = true,
  9. ["dc:title"] = true,
  10. ["path"] = true,
  11. ["pas:sourcePath"] = true,
  12. },
  13. },
  14. fs = {
  15. -- Base path to write opaque resources.
  16. ores_path = ROOT .. "data/ores/",
  17. -- Base path of LSUP store for descriptive resources (RDF).
  18. dres_path = ROOT .. "data/dres/",
  19. -- How many bytes to read when handling files. Adjust to memory
  20. -- availability.
  21. stream_chunk_size = 1024 ^ 2, -- 1Mb
  22. },
  23. -- Namespace prefixes to populate the Pocket Archive NS map.
  24. namespace = {
  25. dc = "http://purl.org/dc/terms/",
  26. foaf = "http://xmlns.com/foaf/0.1/",
  27. pas = "http://id.pkar.knowledgetx.com/schema#",
  28. par = "http://id.pkar.knowledgetx.com/resource/",
  29. premis = "http://id.loc.gov/vocabulary/preservation/",
  30. rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
  31. rdfs = "http://www.w3.org/2000/01/rdf-schema#",
  32. xsd = "http://www.w3.org/2001/XMLSchema#",
  33. },
  34. }