-
Notifications
You must be signed in to change notification settings - Fork 2
/
constants.py
29 lines (22 loc) · 888 Bytes
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from rdflib import Namespace
RESULTS_PER_PAGE = 500
FORMAT = "turtle" #Options: {"rdfxml", "jsonld", "turtle", "ntriples"}
#Path for API call
API_PATH = "http://henripoincare.fr/api/"
ITEMS = "items" # API_PATH + ITEMS for getting all items
MEDIAS = "media"
COLLECTIONS = "item_sets"
VOCABULARIES = "vocabularies"
#Files management
MAX_DAYS = 7 #Number of days to keep backup files (.log and .ttl files)
FILES_REPOSITORY = "/var/lib/rdf_db_hp/"
BACKUP_REPOSITORY = "/opt/backup/rdf_db_hp/"
LOGS_REPOSITORY = "/var/lib/rdf_db_hp/logs/"
ITEMS_FILE = "items.ttl"
MEDIAS_FILE = "medias.ttl"
COLLECTIONS_FILE = "collections.ttl"
#Prefixes which will store prefixes with RDF namespaces by calling Omeka S vocabularies API
namespaces = {}
#Omeka related namespaces (added for quick access)
O = Namespace("http://omeka.org/s/vocabs/o#")
O_CNT = Namespace("http://www.w3.org/2011/content#")