wabur 0.4.0d1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -66
- data/bin/wabur +48 -11
- data/export/assets/css/wab.css +2 -0
- data/export/assets/css/wab.css.map +7 -0
- data/export/assets/fonts/wabfont/README +18 -0
- data/export/assets/fonts/wabfont/fonts/WAB.eot +0 -0
- data/export/assets/fonts/wabfont/fonts/WAB.svg +25 -0
- data/export/assets/fonts/wabfont/fonts/WAB.ttf +0 -0
- data/export/assets/fonts/wabfont/fonts/WAB.woff +0 -0
- data/export/assets/fonts/wabfont/selection.json +460 -0
- data/export/assets/fonts/wabfont/style.css +74 -0
- data/export/assets/js/transpile.js +8 -0
- data/export/assets/js/ui.js +377 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers.js +558 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/asyncGenerator.js +112 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/asyncGeneratorDelegate.js +51 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/asyncIterator.js +14 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/asyncToGenerator.js +28 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/classCallCheck.js +5 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/createClass.js +17 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/defaults.js +14 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/defineEnumerableProperties.js +10 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/defineProperty.js +14 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/extends.js +13 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/get.js +24 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/inherits.js +15 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/instanceof.js +7 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/interopRequireDefault.js +5 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/interopRequireWildcard.js +16 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/jsx.js +42 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/newArrowCheck.js +5 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/objectDestructuringEmpty.js +3 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/objectWithoutProperties.js +11 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/possibleConstructorReturn.js +7 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/selfGlobal.js +1 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/set.js +21 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/slicedToArray.js +37 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/slicedToArrayLoose.js +17 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/taggedTemplateLiteral.js +7 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/taggedTemplateLiteralLoose.js +4 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/temporalRef.js +7 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/temporalUndefined.js +1 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/toArray.js +3 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/toConsumableArray.js +9 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/typeof.js +5 -0
- data/export/assets/js/vendor/plugin-babel/plugin-babel.js +222 -0
- data/export/assets/js/vendor/plugin-babel/regenerator-runtime.js +685 -0
- data/export/assets/js/vendor/plugin-babel/systemjs-babel-browser.js +1 -0
- data/export/assets/js/vendor/plugin-babel/systemjs-babel-node.js +55086 -0
- data/export/assets/js/vendor/systemjs/system-production.js +4 -0
- data/export/assets/js/vendor/systemjs/system-production.js.map +1 -0
- data/export/assets/js/vendor/systemjs/system-production.src.js +1711 -0
- data/export/assets/js/vendor/systemjs/system-production.src.js.map +1 -0
- data/export/assets/js/vendor/systemjs/system.js +4 -0
- data/export/assets/js/vendor/systemjs/system.js.map +1 -0
- data/export/assets/js/vendor/systemjs/system.src.js +4000 -0
- data/export/assets/js/vendor/systemjs/system.src.js.map +1 -0
- data/export/assets/js/wab.js +109 -0
- data/export/index.html +41 -0
- data/lib/wab.rb +13 -0
- data/lib/wab/controller.rb +2 -2
- data/lib/wab/errors.rb +12 -0
- data/lib/wab/impl.rb +2 -0
- data/lib/wab/impl/configuration.rb +24 -6
- data/lib/wab/impl/export_proxy.rb +39 -0
- data/lib/wab/impl/exprs/regex.rb +1 -1
- data/lib/wab/impl/handler.rb +14 -14
- data/lib/wab/impl/init.rb +108 -0
- data/lib/wab/impl/model.rb +4 -3
- data/lib/wab/impl/shell.rb +14 -4
- data/lib/wab/impl/templates/opo-rub.conf.template +253 -0
- data/lib/wab/impl/templates/opo.conf.template +224 -0
- data/lib/wab/impl/templates/spawn.rb.template +42 -0
- data/lib/wab/impl/templates/ui_controller.rb.template +12 -0
- data/lib/wab/impl/templates/wabur.conf.template +40 -0
- data/lib/wab/ui.rb +19 -0
- data/lib/wab/ui/create.rb +26 -0
- data/lib/wab/ui/display.rb +34 -0
- data/lib/wab/ui/flow.rb +54 -0
- data/lib/wab/ui/list.rb +59 -0
- data/lib/wab/ui/multi_flow.rb +23 -0
- data/lib/wab/ui/rest_flow.rb +89 -0
- data/lib/wab/ui/update.rb +27 -0
- data/lib/wab/ui/view.rb +62 -0
- data/lib/wab/utils.rb +4 -4
- data/lib/wab/version.rb +1 -1
- data/pages/Architecture.md +104 -1
- data/test/test_configuration.rb +1 -1
- data/test/test_impl.rb +1 -0
- data/test/test_init.rb +33 -0
- metadata +94 -7
- data/pages/Plan.md +0 -27
data/lib/wab/impl/model.rb
CHANGED
@@ -6,7 +6,7 @@ module WAB
|
|
6
6
|
module Impl
|
7
7
|
|
8
8
|
# The Model class is used to store data when using the
|
9
|
-
# WAB::Impl::Shell. It is
|
9
|
+
# WAB::Impl::Shell. It is not intended for any other use. The *get* and
|
10
10
|
# *query* methods are the primary means of interacting with the model.
|
11
11
|
#
|
12
12
|
# The Model is simple in that it stores data in a Hash references by *ref*
|
@@ -17,9 +17,10 @@ module WAB
|
|
17
17
|
# Create a new Model using the designated directory as the store.
|
18
18
|
#
|
19
19
|
# dir:: directory to store data in
|
20
|
-
def initialize(dir)
|
20
|
+
def initialize(dir, indent=0)
|
21
21
|
@dir = dir.nil? ? nil : File.expand_path(dir)
|
22
22
|
@cnt = 0
|
23
|
+
@indent = indent
|
23
24
|
@map = {}
|
24
25
|
@lock = Thread::Mutex.new
|
25
26
|
FileUtils.mkdir_p(@dir) unless @dir.nil? || Dir.exist?(@dir)
|
@@ -185,7 +186,7 @@ module WAB
|
|
185
186
|
def write_to_file(ref, obj)
|
186
187
|
return if @dir.nil?
|
187
188
|
obj.native if obj.is_a?(WAB::Data)
|
188
|
-
File.open(File.join(@dir, "%016x.json" % ref), 'wb') { |f| f.write(Oj.dump(obj, mode: :wab, indent:
|
189
|
+
File.open(File.join(@dir, "%016x.json" % ref), 'wb') { |f| f.write(Oj.dump(obj, mode: :wab, indent: @indent)) }
|
189
190
|
end
|
190
191
|
|
191
192
|
def remove_file(ref)
|
data/lib/wab/impl/shell.rb
CHANGED
@@ -14,6 +14,8 @@ module WAB
|
|
14
14
|
attr_reader :type_key
|
15
15
|
attr_reader :path_pos
|
16
16
|
|
17
|
+
attr_accessor :indent
|
18
|
+
|
17
19
|
# Call the Model instance with these methods.
|
18
20
|
def_delegators :@model, :get, :query
|
19
21
|
|
@@ -21,15 +23,18 @@ module WAB
|
|
21
23
|
#
|
22
24
|
# config:: Configuration object
|
23
25
|
def initialize(config)
|
24
|
-
@
|
26
|
+
@indent = config[:indent].to_i || 0
|
27
|
+
@pre_path = config[:path_prefix] || '/v1'
|
25
28
|
@path_pos = @pre_path.split('/').length - 1
|
26
29
|
base = config[:base] || '.'
|
27
|
-
@model = Model.new((config['store.dir'] || File.join(base, 'data')).gsub('$BASE', base))
|
30
|
+
@model = Model.new((config['store.dir'] || File.join(base, 'data')).gsub('$BASE', base), indent)
|
28
31
|
@type_key = config[:type_key] || 'kind'
|
29
32
|
@logger = config[:logger]
|
30
33
|
@logger.level = config[:verbosity] unless @logger.nil?
|
31
34
|
@http_dir = (config['http.dir'] || File.join(base, 'pages')).gsub('$BASE', base)
|
32
35
|
@http_port = (config['http.port'] || 6363).to_i
|
36
|
+
@export_proxy = config[:export_proxy]
|
37
|
+
@export_proxy = true if @export_proxy.nil? # The default is true if not present.
|
33
38
|
@controllers = {}
|
34
39
|
|
35
40
|
requires = config[:require]
|
@@ -48,8 +53,13 @@ module WAB
|
|
48
53
|
# Start listening. This should be called after registering Controllers
|
49
54
|
# with the Shell.
|
50
55
|
def start()
|
51
|
-
|
52
|
-
|
56
|
+
mime_types = WEBrick::HTTPUtils::DefaultMimeTypes
|
57
|
+
mime_types['es6'] = 'application/javascript'
|
58
|
+
server = WEBrick::HTTPServer.new(Port: @http_port,
|
59
|
+
DocumentRoot: @http_dir,
|
60
|
+
MimeTypes: mime_types)
|
61
|
+
server.mount(@pre_path, Handler, self)
|
62
|
+
server.mount('/', ExportProxy, @http_dir) if @export_proxy
|
53
63
|
|
54
64
|
trap 'INT' do server.shutdown end
|
55
65
|
server.start
|
@@ -0,0 +1,253 @@
|
|
1
|
+
# opo-rub.conf
|
2
|
+
|
3
|
+
# This sample configuration file for opod includes all the avaliable options
|
4
|
+
# and the default values for those options. All option keys are case
|
5
|
+
# insensitive.
|
6
|
+
|
7
|
+
# The directory to store the opo data.
|
8
|
+
#dir = /var/opo
|
9
|
+
dir = opo/data
|
10
|
+
|
11
|
+
# A journal is kept if this option is true. When set to false changes in the
|
12
|
+
# data are not persisted until a clean exit or a explicit persist command to
|
13
|
+
# the opod.
|
14
|
+
journal = false
|
15
|
+
|
16
|
+
# If sync is true then writes are always synced to disk before
|
17
|
+
# returning. Performance is far better if sync is set to false.
|
18
|
+
sync = false
|
19
|
+
|
20
|
+
# If exit_sync is true then writes are performed on normal shutdown or by
|
21
|
+
# ctrl-C unless journalling is already on or sync is true.
|
22
|
+
exit_sync = true
|
23
|
+
|
24
|
+
# Default format for import and dump. Valid values are JSON, RDF, N-TRiPLES,
|
25
|
+
# N-QUADS, TURTLE, or OG, case insensitive. The indent option if for the JSON
|
26
|
+
# format only.
|
27
|
+
format = JSON
|
28
|
+
|
29
|
+
# One or more threads are created to process requests. Set the threads to the
|
30
|
+
# value best suited to the machine opo will be running on.
|
31
|
+
threads = 2
|
32
|
+
|
33
|
+
################################################################################
|
34
|
+
# Opo supports an HTTP interface. The HTTP interface includes documentation
|
35
|
+
# pages, access helper pages, and REST APIs for interating with opo using
|
36
|
+
# either a JSON model of SPARQL when using the triple store model.
|
37
|
+
|
38
|
+
# The port to connect to opo on using an HTTP browser. A value of zero
|
39
|
+
# indicates no HTTP connectivity.
|
40
|
+
http.port = 6363
|
41
|
+
|
42
|
+
# Opo can also be used to serve custom pages. Note that built in URL paths
|
43
|
+
# take precedence over subdirectories in the provided pages dir. If left blank
|
44
|
+
# then no custom pages are served.
|
45
|
+
#http.dir =
|
46
|
+
http.dir = site
|
47
|
+
|
48
|
+
################################################################################
|
49
|
+
# Log related options are all prefixed with 'log.'. Log files are written to a
|
50
|
+
# specified log directory and rotated as they exceed the maximum size. Log
|
51
|
+
# files are in JSON format.
|
52
|
+
|
53
|
+
# The directory to write log files to.
|
54
|
+
#log.dir = /var/log
|
55
|
+
log.dir = opo/log
|
56
|
+
|
57
|
+
# The maximum number of archived log files to keep in addition to the current
|
58
|
+
# log file.
|
59
|
+
log.maxFiles = 3
|
60
|
+
|
61
|
+
# Size that when exceeded cause the log files to rotate. Note file may and are
|
62
|
+
# usually slightly larger than the maximum size as the maximum size is a
|
63
|
+
# trigger to rotate.
|
64
|
+
log.maxSize = 100000000
|
65
|
+
|
66
|
+
# If true log entries are displayed on the console.
|
67
|
+
log.console = true
|
68
|
+
|
69
|
+
# if true console log output is in classic format. If false, output is in JSON
|
70
|
+
# format.
|
71
|
+
log.classic = true
|
72
|
+
|
73
|
+
# If true console output is colorized.
|
74
|
+
log.colorize = true
|
75
|
+
|
76
|
+
# If the syslog address and port in the format 10.10.0.7:1234 is provided log
|
77
|
+
# messages are also sent to syslog on the provided address. If the UDP option
|
78
|
+
# is true the syslog send is done using UDP instead of TCP.
|
79
|
+
log.syslog.address =
|
80
|
+
log.syslog.udp = true
|
81
|
+
|
82
|
+
# Logging category or feature based. To log details about specific features
|
83
|
+
# turn the category on. Colors can also be set for each category. Supported
|
84
|
+
# colors are:
|
85
|
+
# black
|
86
|
+
# red
|
87
|
+
# green
|
88
|
+
# yellow
|
89
|
+
# blue
|
90
|
+
# magenta
|
91
|
+
# cyan
|
92
|
+
# white
|
93
|
+
# gray
|
94
|
+
# dark_red
|
95
|
+
# dark_green
|
96
|
+
# brown
|
97
|
+
# dark_blue
|
98
|
+
# purple
|
99
|
+
# dark_cyan
|
100
|
+
|
101
|
+
# The error category.
|
102
|
+
log.cats.error.on = true
|
103
|
+
log.cats.error.color = red
|
104
|
+
|
105
|
+
# The warning category.
|
106
|
+
log.cats.warn.on = true
|
107
|
+
log.cats.warn.color = yellow
|
108
|
+
|
109
|
+
# The mod category is used to log changes or modifications to data in the
|
110
|
+
# store. Any insert, update, and delete is logged if true.
|
111
|
+
log.cats.mod.on = true
|
112
|
+
log.cats.mod.color = dark_green
|
113
|
+
|
114
|
+
# The journal category. A log message is published for ever journal
|
115
|
+
# entry. Very verbose.
|
116
|
+
log.cats.journal.on = false
|
117
|
+
log.cats.journal.color = dark_green
|
118
|
+
|
119
|
+
# Logging for http is controlled by these options. Note that HTTP logging is
|
120
|
+
# finer grained that others.
|
121
|
+
log.cats.http_request.on = false
|
122
|
+
log.cats.http_request.color = dark_green
|
123
|
+
|
124
|
+
log.cats.http_response.on = false
|
125
|
+
log.cats.http_response.color = dark_green
|
126
|
+
|
127
|
+
log.cats.http_debug.on = false
|
128
|
+
log.cats.http_debug.color = purple
|
129
|
+
|
130
|
+
log.cats.handler.on = false
|
131
|
+
log.cats.handler.color = blue
|
132
|
+
#
|
133
|
+
###############################################################################
|
134
|
+
# Opo is a triple store but also supports JSON imports and exports. RDF is
|
135
|
+
# also supported. To provide a mapping from one to the other several options
|
136
|
+
# are included.
|
137
|
+
|
138
|
+
# When JSON is generated for query responses it will be indented according to
|
139
|
+
# this option.
|
140
|
+
json.indent = 0
|
141
|
+
|
142
|
+
# Opo data types include more types than supported by JSON natively. The JSON
|
143
|
+
# detect options control what the JSON parse does when it encounters a value
|
144
|
+
# that could be read as a different type.
|
145
|
+
|
146
|
+
# A value starting with http:// will be treated as a IRI if this option is true.
|
147
|
+
json.detect.iri = true
|
148
|
+
|
149
|
+
# If true a string that has the form that matches RFC3339 will be converted to
|
150
|
+
# a date-time. Examples are: 2017-01-05T12:34:56+07:00, 2017-01-05T12:34:56Z
|
151
|
+
# and 2017-01-05T12:34:56.999999999-07:00.
|
152
|
+
json.detect.time.string = true
|
153
|
+
|
154
|
+
# Time is stored as UNIX UTC internally. Time zones are not stored. The time
|
155
|
+
# format options allow the time format and time zone to be used in the output
|
156
|
+
# strings or numbers. Options for time format are:
|
157
|
+
# UNIX: seconds from UTC epoch with 9 decimal places for seconds
|
158
|
+
# UNIX6: seconds from UTC epoch with 6 decimal places for seconds
|
159
|
+
# UNIX3: seconds from UTC epoch with 3 decimal places for seconds
|
160
|
+
# UNIX0: seconds from UTC epoch with no decimal places for seconds
|
161
|
+
# XSD9: XSD date-time with 9 decimal places for seconds
|
162
|
+
# XSD6: XSD date-time with 6 decimal places for seconds
|
163
|
+
# XSD3: XSD date-time with 3 decimal places for seconds
|
164
|
+
# XSD0: XSD date-time with no decimal places for seconds
|
165
|
+
# XSD: XSD date-time with up to 9 decimal places for seconds. trailing 0 are stripped
|
166
|
+
# DATE: XSD date-time with up to 9 decimal places for seconds. trailing 0 are
|
167
|
+
# stripped. If hours, minutes, and seconds are 0 then only the date
|
168
|
+
# portion is output.
|
169
|
+
time.format = XSD
|
170
|
+
time.zone = 0
|
171
|
+
|
172
|
+
# A value that has the format of a UUID (123e4567-e89b-12d3-a456-426655440000)
|
173
|
+
# be treated as a UUID if this option is true. Providing a slight performance
|
174
|
+
# improvment with UUIDs.
|
175
|
+
json.detect.uuid = true
|
176
|
+
|
177
|
+
# It is common for numbers to be used for times as well. A few extra control
|
178
|
+
# parameters are needed to limit the scope of time detection. The min and max
|
179
|
+
# values specify the range for detection. The decimals if non-zero sets up a
|
180
|
+
# requirement for that specific number of decimal places that must match.
|
181
|
+
json.detect.time.number.on = true
|
182
|
+
json.detect.time.number.min = 1400000000
|
183
|
+
json.detect.time.number.max = 1600000000
|
184
|
+
json.detect.time.number.decimals = 9
|
185
|
+
|
186
|
+
# JSON imports are converted to triples but not RDF compliant triples. In an
|
187
|
+
# RDF triple the subject must be either a blank or a IRI. The predicate must
|
188
|
+
# be a IRI. Since imported JSONs do not have namespaces associated with them a
|
189
|
+
# default namespace is used to make the JSON literals into IRIs using a
|
190
|
+
# default namespace.
|
191
|
+
rdf.default.namespace = http://localhost#
|
192
|
+
|
193
|
+
################################################################################
|
194
|
+
# IRI aliases can be registered. These aliases will take precedence over any
|
195
|
+
# prefix defined in a TURTLE import. Note that the commented out sample are
|
196
|
+
# most likely out of date. Thats one of the problems with including the date
|
197
|
+
# in the URL. It is also an advantage is referring to an older specification.
|
198
|
+
ns.dct = http://purl.org/dc/terms/
|
199
|
+
ns.foaf = http://xmlns.com/foaf/0.1/
|
200
|
+
ns.gr = http://purl.org/goodrelations/v1#
|
201
|
+
ns.org = http://www.w3.org/ns/org#
|
202
|
+
ns.owl = http://www.w3.org/2002/07/owl#
|
203
|
+
ns.prov = http://www.w3.org/ns/prov#
|
204
|
+
ns.rdf = http://www.w3.org/1999/02/22-rdf-syntax-ns#
|
205
|
+
ns.rdfs = http://www.w3.org/2000/01/rdf-schema#
|
206
|
+
ns.skos = http://www.w3.org/2004/02/skos/core#
|
207
|
+
ns.time = http://www.w3.org/2006/time#
|
208
|
+
ns.vcard = http://www.w3.org/2006/vcard/ns#
|
209
|
+
ns.xsd = http://www.w3.org/2001/XMLSchema#
|
210
|
+
#ns.xsd = https://www.w3.org/TR/xmlschema11-2/#
|
211
|
+
#ns.xsd = https://www.w3.org/TR/xmlschema-2/#
|
212
|
+
|
213
|
+
# N-Triples and N-Quads literal strings can have a type associated with the
|
214
|
+
# string. Opo attempts to convert the strings to native types if possible. To
|
215
|
+
# do so it looks for know IRI prefixes followed by the type. The supported
|
216
|
+
# types are 'integer', 'double', 'time', and 'datetime'. The listed
|
217
|
+
# type.prefixes are used to form the IRIs that trigger the conversion of a
|
218
|
+
# string to the respective native type. A comma separated list is expected.
|
219
|
+
type.prefixes = http://www.w3.org/2001/XMLSchema#,http://www.w3.org/TR/xmlschema11-2/#,http://www.w3.org/TR/xmlschema-2/#
|
220
|
+
|
221
|
+
# Multiple handlers can be running at the same time if using different
|
222
|
+
# paths. The view conf.js would have to change to use one path or the other by
|
223
|
+
# setting the wab.pathPrefix value.
|
224
|
+
|
225
|
+
handler.ui.path = /v1/ui/**
|
226
|
+
handler.ui.class = UIController
|
227
|
+
%{handlers}
|
228
|
+
################################################################################
|
229
|
+
# When using opo-rub or other opo version with embedded interpreters the
|
230
|
+
# 'embed' options can be used. The handler options are also extended to
|
231
|
+
# support calling the embedded interpreter.
|
232
|
+
|
233
|
+
# The load path is set to include the project lib directory.
|
234
|
+
embed.load_path = lib
|
235
|
+
|
236
|
+
# The Ruby requires. Generally whatever class in the lib directory that should
|
237
|
+
# be imported.
|
238
|
+
embed.require = ui_controller
|
239
|
+
|
240
|
+
embed.setup = puts 'Ruby Started'
|
241
|
+
embed.cleanup = puts 'Ruby Finished'
|
242
|
+
|
243
|
+
# Field to expect the type, class, or kind of record in the stored JSON.
|
244
|
+
embed.type_key = kind
|
245
|
+
|
246
|
+
# Position in the URL path that identifies the record type or kind. The first
|
247
|
+
# position is 0.
|
248
|
+
embed.path_pos = 1
|
249
|
+
|
250
|
+
# This sets up the WABuR gem as an alternate source for the wab default
|
251
|
+
# index.html, CSS, JavaScript, and fonts are loaded from the gem's export
|
252
|
+
# directory is they are not found in the site directory.
|
253
|
+
embed.alternative_source = WAB.get_export
|
@@ -0,0 +1,224 @@
|
|
1
|
+
# opo.conf
|
2
|
+
|
3
|
+
# This sample configuration file for opod includes all the avaliable options
|
4
|
+
# and the default values for those options. All option keys are case
|
5
|
+
# insensitive.
|
6
|
+
|
7
|
+
# The directory to store the opo data.
|
8
|
+
#dir = /var/opo
|
9
|
+
dir = opo/data
|
10
|
+
|
11
|
+
# A journal is kept if this option is true. When set to false changes in the
|
12
|
+
# data are not persisted until a clean exit or a explicit persist command to
|
13
|
+
# the opod.
|
14
|
+
journal = false
|
15
|
+
|
16
|
+
# If sync is true then writes are always synced to disk before
|
17
|
+
# returning. Performance is far better if sync is set to false.
|
18
|
+
sync = false
|
19
|
+
|
20
|
+
# If exit_sync is true then writes are performed on normal shutdown or by
|
21
|
+
# ctrl-C unless journalling is already on or sync is true.
|
22
|
+
exit_sync = true
|
23
|
+
|
24
|
+
# Default format for import and dump. Valid values are JSON, RDF, N-TRiPLES,
|
25
|
+
# N-QUADS, TURTLE, or OG, case insensitive. The indent option if for the JSON
|
26
|
+
# format only.
|
27
|
+
format = JSON
|
28
|
+
|
29
|
+
# One or more threads are created to process requests. Set the threads to the
|
30
|
+
# value best suited to the machine opo will be running on.
|
31
|
+
threads = 2
|
32
|
+
|
33
|
+
################################################################################
|
34
|
+
# Opo supports an HTTP interface. The HTTP interface includes documentation
|
35
|
+
# pages, access helper pages, and REST APIs for interating with opo using
|
36
|
+
# either a JSON model of SPARQL when using the triple store model.
|
37
|
+
|
38
|
+
# The port to connect to opo on using an HTTP browser. A value of zero
|
39
|
+
# indicates no HTTP connectivity.
|
40
|
+
http.port = 6363
|
41
|
+
|
42
|
+
# Opo can also be used to serve custom pages. Note that built in URL paths
|
43
|
+
# take precedence over subdirectories in the provided pages dir. If left blank
|
44
|
+
# then no custom pages are served.
|
45
|
+
#http.dir =
|
46
|
+
http.dir = site
|
47
|
+
|
48
|
+
################################################################################
|
49
|
+
# Log related options are all prefixed with 'log.'. Log files are written to a
|
50
|
+
# specified log directory and rotated as they exceed the maximum size. Log
|
51
|
+
# files are in JSON format.
|
52
|
+
|
53
|
+
# The directory to write log files to.
|
54
|
+
#log.dir = /var/log
|
55
|
+
log.dir = opo/log
|
56
|
+
|
57
|
+
# The maximum number of archived log files to keep in addition to the current
|
58
|
+
# log file.
|
59
|
+
log.maxFiles = 3
|
60
|
+
|
61
|
+
# Size that when exceeded cause the log files to rotate. Note file may and are
|
62
|
+
# usually slightly larger than the maximum size as the the maximum size is a
|
63
|
+
# trigger to rotate.
|
64
|
+
log.maxSize = 100000000
|
65
|
+
|
66
|
+
# If true log entries are displayed on the console.
|
67
|
+
log.console = true
|
68
|
+
|
69
|
+
# if true console log out is in classic format. If false output is in JSON
|
70
|
+
# format.
|
71
|
+
log.classic = true
|
72
|
+
|
73
|
+
# If true console output is colorized.
|
74
|
+
log.colorize = true
|
75
|
+
|
76
|
+
# If the syslog address and port in the format 10.10.0.7:1234 is provided log
|
77
|
+
# messages are also send to syslog on the provided address. If the UDP option
|
78
|
+
# is true the syslog send is done using UDP instead of TCP.
|
79
|
+
log.syslog.address =
|
80
|
+
log.syslog.udp = true
|
81
|
+
|
82
|
+
# Logging category or feature based. To log details about specific features
|
83
|
+
# turn the category on. Colors can also be set for each category. Supported
|
84
|
+
# colors are:
|
85
|
+
# black
|
86
|
+
# red
|
87
|
+
# green
|
88
|
+
# yellow
|
89
|
+
# blue
|
90
|
+
# magenta
|
91
|
+
# cyan
|
92
|
+
# white
|
93
|
+
# gray
|
94
|
+
# dark_red
|
95
|
+
# dark_green
|
96
|
+
# brown
|
97
|
+
# dark_blue
|
98
|
+
# purple
|
99
|
+
# dark_cyan
|
100
|
+
|
101
|
+
# The error category.
|
102
|
+
log.cats.error.on = true
|
103
|
+
log.cats.error.color = red
|
104
|
+
|
105
|
+
# The warning category.
|
106
|
+
log.cats.warn.on = true
|
107
|
+
log.cats.warn.color = yellow
|
108
|
+
|
109
|
+
# The mod category is used to log changes or modifications to data in the
|
110
|
+
# store. Any insert, update, and delete is logged if true.
|
111
|
+
log.cats.mod.on = true
|
112
|
+
log.cats.mod.color = dark_green
|
113
|
+
|
114
|
+
# The journal category. A log message is published for ever journal
|
115
|
+
# entry. Very verbose.
|
116
|
+
log.cats.journal.on = false
|
117
|
+
log.cats.journal.color = dark_green
|
118
|
+
|
119
|
+
# Logging for http is controlled by these options. Note that HTTP logging is
|
120
|
+
# finer grained that others.
|
121
|
+
log.cats.http_request.on = false
|
122
|
+
log.cats.http_request.color = dark_green
|
123
|
+
|
124
|
+
log.cats.http_response.on = false
|
125
|
+
log.cats.http_response.color = dark_green
|
126
|
+
|
127
|
+
log.cats.http_debug.on = false
|
128
|
+
log.cats.http_debug.color = purple
|
129
|
+
|
130
|
+
log.cats.handler.on = false
|
131
|
+
log.cats.handler.color = blue
|
132
|
+
#
|
133
|
+
###############################################################################
|
134
|
+
# Opo is a triple store but also supports JSON imports and exports. RDF is
|
135
|
+
# also supported. To provide a mapping from one to the other several options
|
136
|
+
# are included.
|
137
|
+
|
138
|
+
# When JSON is generated for query responses it will be indented according to
|
139
|
+
# this option.
|
140
|
+
json.indent = 0
|
141
|
+
|
142
|
+
# Opo data types include more types than supported by JSON natively. The JSON
|
143
|
+
# detect options control what the JSON parse does when it encounters a value
|
144
|
+
# that could be read as a different type.
|
145
|
+
|
146
|
+
# A value starting with http:// will be treated as a IRI if this option is true.
|
147
|
+
json.detect.iri = true
|
148
|
+
|
149
|
+
# If true a string that has the form that matches RFC3339 will be converted to
|
150
|
+
# a date-time. Examples are: 2017-01-05T12:34:56+07:00, 2017-01-05T12:34:56Z
|
151
|
+
# and 2017-01-05T12:34:56.999999999-07:00.
|
152
|
+
json.detect.time.string = true
|
153
|
+
|
154
|
+
# Time is stored as UNIX UTC internally. Time zones are not stored. The time
|
155
|
+
# format options allow the time format and time zone to be used in the output
|
156
|
+
# strings or numbers. Options for time format are:
|
157
|
+
# UNIX: seconds from UTC epoch with 9 decimal places for seconds
|
158
|
+
# UNIX6: seconds from UTC epoch with 6 decimal places for seconds
|
159
|
+
# UNIX3: seconds from UTC epoch with 3 decimal places for seconds
|
160
|
+
# UNIX0: seconds from UTC epoch with no decimal places for seconds
|
161
|
+
# XSD9: XSD date-time with 9 decimal places for seconds
|
162
|
+
# XSD6: XSD date-time with 6 decimal places for seconds
|
163
|
+
# XSD3: XSD date-time with 3 decimal places for seconds
|
164
|
+
# XSD0: XSD date-time with no decimal places for seconds
|
165
|
+
# XSD: XSD date-time with up to 9 decimal places for seconds. trailing 0 are stripped
|
166
|
+
# DATE: XSD date-time with up to 9 decimal places for seconds. trailing 0 are
|
167
|
+
# stripped. If hours, minutes, and seconds are 0 then only the date
|
168
|
+
# portion is output.
|
169
|
+
time.format = XSD
|
170
|
+
time.zone = 0
|
171
|
+
|
172
|
+
# A value that has the format of a UUID (123e4567-e89b-12d3-a456-426655440000)
|
173
|
+
# be treated as a UUID if this option is true. Providing a slight performance
|
174
|
+
# improvment with UUIDs.
|
175
|
+
json.detect.uuid = true
|
176
|
+
|
177
|
+
# It is common for numbers to be used for times as well. A few extra control
|
178
|
+
# parameters are needed to limit the scope of time detection. The min and max
|
179
|
+
# values specify the range for detection. The decimals if non-zero sets up a
|
180
|
+
# requirement for that specific number of decimal places that must match.
|
181
|
+
json.detect.time.number.on = true
|
182
|
+
json.detect.time.number.min = 1400000000
|
183
|
+
json.detect.time.number.max = 1600000000
|
184
|
+
json.detect.time.number.decimals = 9
|
185
|
+
|
186
|
+
# JSON imports are converted to triples but not RDF compliant triples. In an
|
187
|
+
# RDF triple the subject must be either a blank or a IRI. The predicate must
|
188
|
+
# be a IRI. Since imported JSONs do not have namespaces associated with them a
|
189
|
+
# default namespace is used to make the JSON literals into IRIs using a
|
190
|
+
# default namespace.
|
191
|
+
rdf.default.namespace = http://localhost#
|
192
|
+
|
193
|
+
################################################################################
|
194
|
+
# IRI aliases can be registered. These aliases will take precedence over any
|
195
|
+
# prefix defined in a TURTLE import. Note that the commented out sample are
|
196
|
+
# most likely out of date. Thats one of the problems with including the date
|
197
|
+
# in the URL. It is also an advantage is referring to an older specification.
|
198
|
+
ns.dct = http://purl.org/dc/terms/
|
199
|
+
ns.foaf = http://xmlns.com/foaf/0.1/
|
200
|
+
ns.gr = http://purl.org/goodrelations/v1#
|
201
|
+
ns.org = http://www.w3.org/ns/org#
|
202
|
+
ns.owl = http://www.w3.org/2002/07/owl#
|
203
|
+
ns.prov = http://www.w3.org/ns/prov#
|
204
|
+
ns.rdf = http://www.w3.org/1999/02/22-rdf-syntax-ns#
|
205
|
+
ns.rdfs = http://www.w3.org/2000/01/rdf-schema#
|
206
|
+
ns.skos = http://www.w3.org/2004/02/skos/core#
|
207
|
+
ns.time = http://www.w3.org/2006/time#
|
208
|
+
ns.vcard = http://www.w3.org/2006/vcard/ns#
|
209
|
+
ns.xsd = http://www.w3.org/2001/XMLSchema#
|
210
|
+
#ns.xsd = https://www.w3.org/TR/xmlschema11-2/#
|
211
|
+
#ns.xsd = https://www.w3.org/TR/xmlschema-2/#
|
212
|
+
|
213
|
+
# N-Triples and N-Quads literal strings can have a type associated with the
|
214
|
+
# string. Opo attempts to convert the strings to native types if possible. To
|
215
|
+
# do so it looks for know IRI prefixes followed by the type. The supported
|
216
|
+
# types are 'integer', 'double', 'time', and 'datetime'. The listed
|
217
|
+
# type.prefixes are used to form the IRIs that trigger the conversion of a
|
218
|
+
# string to the respective native type. A comma separated list is expected.
|
219
|
+
type.prefixes = http://www.w3.org/2001/XMLSchema#,http://www.w3.org/TR/xmlschema11-2/#,http://www.w3.org/TR/xmlschema-2/#
|
220
|
+
|
221
|
+
handler.ruby.path = /v1/**
|
222
|
+
handler.ruby.max_out = 10
|
223
|
+
handler.ruby.cmd = lib/spawn.rb -I lib
|
224
|
+
handler.ruby.timeout = 5.0
|