# opo-rub.conf

# This sample configuration file for opod includes all the avaliable options # and the default values for those options. All option keys are case # insensitive.

# The directory to store the opo data. dir = /var/opo dir = opo/data

# A journal is kept if this option is true. When set to false changes in the # data are not persisted until a clean exit or a explicit persist command to # the opod. journal = false

# If sync is true then writes are always synced to disk before # returning. Performance is far better if sync is set to false. sync = false

# If exit_sync is true then writes are performed on normal shutdown or by # ctrl-C unless journalling is already on or sync is true. exit_sync = true

# Default format for import and dump. Valid values are JSON, RDF, N-TRiPLES, # N-QUADS, TURTLE, or OG, case insensitive. The indent option if for the JSON # format only. format = JSON

# One or more threads are created to process requests. Set the threads to the # value best suited to the machine opo will be running on. threads = 2

################################################################################ # Opo supports an HTTP interface. The HTTP interface includes documentation # pages, access helper pages, and REST APIs for interating with opo using # either a JSON model of SPARQL when using the triple store model.

# The port to connect to opo on using an HTTP browser. A value of zero # indicates no HTTP connectivity. http.port = 6363

# Opo can also be used to serve custom pages. Note that built in URL paths # take precedence over subdirectories in the provided pages dir. If left blank # then no custom pages are served. http.dir = http.dir = site

################################################################################ # Log related options are all prefixed with 'log.'. Log files are written to a # specified log directory and rotated as they exceed the maximum size. Log # files are in JSON format.

# The directory to write log files to. log.dir = /var/log log.dir = opo/log

# The maximum number of archived log files to keep in addition to the current # log file. log.maxFiles = 3

# Size that when exceeded cause the log files to rotate. Note file may and are # usually slightly larger than the maximum size as the maximum size is a # trigger to rotate. log.maxSize = 100000000

# If true log entries are displayed on the console. log.console = true

# if true console log output is in classic format. If false, output is in JSON # format. log.classic = true

# If true console output is colorized. log.colorize = true

# If the syslog address and port in the format 10.10.0.7:1234 is provided log # messages are also sent to syslog on the provided address. If the UDP option # is true the syslog send is done using UDP instead of TCP. log.syslog.address = log.syslog.udp = true

# Logging category or feature based. To log details about specific features # turn the category on. Colors can also be set for each category. Supported # colors are: # black # red # green # yellow # blue # magenta # cyan # white # gray # dark_red # dark_green # brown # dark_blue # purple # dark_cyan

# The error category. log.cats.error.on = true log.cats.error.color = red

# The warning category. log.cats.warn.on = true log.cats.warn.color = yellow

# The mod category is used to log changes or modifications to data in the # store. Any insert, update, and delete is logged if true. log.cats.mod.on = true log.cats.mod.color = dark_green

# The journal category. A log message is published for ever journal # entry. Very verbose. log.cats.journal.on = false log.cats.journal.color = dark_green

# Logging for http is controlled by these options. Note that HTTP logging is # finer grained that others. log.cats.http_request.on = false log.cats.http_request.color = dark_green

log.cats.http_response.on = false log.cats.http_response.color = dark_green

log.cats.http_debug.on = false log.cats.http_debug.color = purple

log.cats.handler.on = false log.cats.handler.color = blue # ############################################################################### # Opo is a triple store but also supports JSON imports and exports. RDF is # also supported. To provide a mapping from one to the other several options # are included.

# When JSON is generated for query responses it will be indented according to # this option. json.indent = 0

# Opo data types include more types than supported by JSON natively. The JSON # detect options control what the JSON parse does when it encounters a value # that could be read as a different type.

# A value starting with http:// will be treated as a IRI if this option is true. json.detect.iri = true

# If true a string that has the form that matches RFC3339 will be converted to # a date-time. Examples are: 2017-01-05T12:34:56+07:00, 2017-01-05T12:34:56Z # and 2017-01-05T12:34:56.999999999-07:00. json.detect.time.string = true

# Time is stored as UNIX UTC internally. Time zones are not stored. The time # format options allow the time format and time zone to be used in the output # strings or numbers. Options for time format are: # UNIX: seconds from UTC epoch with 9 decimal places for seconds # UNIX6: seconds from UTC epoch with 6 decimal places for seconds # UNIX3: seconds from UTC epoch with 3 decimal places for seconds # UNIX0: seconds from UTC epoch with no decimal places for seconds # XSD9: XSD date-time with 9 decimal places for seconds # XSD6: XSD date-time with 6 decimal places for seconds # XSD3: XSD date-time with 3 decimal places for seconds # XSD0: XSD date-time with no decimal places for seconds # XSD: XSD date-time with up to 9 decimal places for seconds. trailing 0 are stripped # DATE: XSD date-time with up to 9 decimal places for seconds. trailing 0 are # stripped. If hours, minutes, and seconds are 0 then only the date # portion is output. time.format = XSD time.zone = 0

# A value that has the format of a UUID (123e4567-e89b-12d3-a456-426655440000) # be treated as a UUID if this option is true. Providing a slight performance # improvment with UUIDs. json.detect.uuid = true

# It is common for numbers to be used for times as well. A few extra control # parameters are needed to limit the scope of time detection. The min and max # values specify the range for detection. The decimals if non-zero sets up a # requirement for that specific number of decimal places that must match. json.detect.time.number.on = true json.detect.time.number.min = 1400000000 json.detect.time.number.max = 1600000000 json.detect.time.number.decimals = 9

# JSON imports are converted to triples but not RDF compliant triples. In an # RDF triple the subject must be either a blank or a IRI. The predicate must # be a IRI. Since imported JSONs do not have namespaces associated with them a # default namespace is used to make the JSON literals into IRIs using a # default namespace. rdf.default.namespace = localhost#

################################################################################ # IRI aliases can be registered. These aliases will take precedence over any # prefix defined in a TURTLE import. Note that the commented out sample are # most likely out of date. Thats one of the problems with including the date # in the URL. It is also an advantage is referring to an older specification. ns.dct = purl.org/dc/terms/ ns.foaf = xmlns.com/foaf/0.1/ ns.gr = purl.org/goodrelations/v1# ns.org = www.w3.org/ns/org# ns.owl = www.w3.org/2002/07/owl# ns.prov = www.w3.org/ns/prov# ns.rdf = www.w3.org/1999/02/22-rdf-syntax-ns# ns.rdfs = www.w3.org/2000/01/rdf-schema# ns.skos = www.w3.org/2004/02/skos/core# ns.time = www.w3.org/2006/time# ns.vcard = www.w3.org/2006/vcard/ns# ns.xsd = www.w3.org/2001/XMLSchema# ns.xsd = www.w3.org/TR/xmlschema11-2/# ns.xsd = www.w3.org/TR/xmlschema-2/#

# N-Triples and N-Quads literal strings can have a type associated with the # string. Opo attempts to convert the strings to native types if possible. To # do so it looks for know IRI prefixes followed by the type. The supported # types are 'integer', 'double', 'time', and 'datetime'. The listed # type.prefixes are used to form the IRIs that trigger the conversion of a # string to the respective native type. A comma separated list is expected. type.prefixes = www.w3.org/2001/XMLSchema#,http://www.w3.org/TR/xmlschema11-2/#,http://www.w3.org/TR/xmlschema-2/#

# Multiple handlers can be running at the same time if using different # paths. The view conf.js would have to change to use one path or the other by # setting the wab.pathPrefix value.

handler.ui.path = /v1/ui/** handler.ui.class = UIController %{handlers} ################################################################################ # When using opo-rub or other opo version with embedded interpreters the # 'embed' options can be used. The handler options are also extended to # support calling the embedded interpreter.

# The load path is set to include the project lib directory. embed.load_path = lib

# The Ruby requires. Generally whatever class in the lib directory that should # be imported. embed.require = ui_controller

embed.setup = puts 'Ruby Started' embed.cleanup = puts 'Ruby Finished'

# Field to expect the type, class, or kind of record in the stored JSON. embed.type_key = kind

# Position in the URL path that identifies the record type or kind. The first # position is 0. embed.path_pos = 1

# This sets up the WABuR gem as an alternate source for the wab default # index.html, CSS, JavaScript, and fonts are loaded from the gem's export # directory is they are not found in the site directory. embed.alternative_source = WAB.get_export