Methods
(static) quote(word) → {string}
- Description:
Returns a wjson string name or value with
"
quotes if required, to avoid syntax error.- Called with the
wjson::quote(word)
construct.
- Called with the
Parameters:
Name | Type | Description |
---|---|---|
word |
string | The word to quote if required. |
Returns:
Either the word itself or with quote, if appropriate.
- Type
- string
(static) string2json(string, sort_namesopt) → {JSON}
- Description:
Static C/C++ string to JSON conversion for convenience.
// Typical usage is for constructor or method arguments of the form, e.g.: … set(wjson::string2json(aidesys::echo("{do: grab device: %d}", device), …
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
string |
String | The initial value. |
||
sort_names |
bool |
<optional> |
false
|
If true sorts the names in alphabetic order, as performed by sortNames() |
Returns:
A temporary reference towards the best effort parsed value.
- Type
- JSON
(static) run_protege()
- Description:
Remote control of the Protégé GUI interface system.
-
This allows to interface a LValue with a reasoner.
-
Only available as a command line application:
Usage: ./src/run_protege.sh input.owl Runs Protégé loading the ontology, running the default reasoner, and exporting the inferred axioms. Generates an output file of name input.owl.inferred.owl in Turtle format. Generates a log of all operations in /tmp/run_protege.log. The Protege GUI must be manually parameterized before use, for instance defining the default reasoner. Caution: do not manipulate the mouse or keyboard during the process, only one instance can run at a given time. Disclaimer: this is only an experimental fragile setup, only available under Linux, valid only for Protege-5.5.0 (GUI parameters may have to be redefined for another Protégé version). Requires: xdotool.
-
(static) ttl2n3()
- Description:
Converts a file from turtle to n-triples format
- Only available as a command line application:
Usage: ./src/ttl2n3.js < input > output
(static) wjson2html()
- Description:
Command line wrapper to reformat a strong or weak JSON syntax string to a normalized weak JSON format.
- Only available as a command line application, see also wJSON object.
Usage: ./src/wjson2html.js < json-file.json > json-file.html
(static) wjson2json(Input) → {string}
- Description:
Command line wrapper to reformats a weak JSON syntax string to a normalized standard JSON format.
Parameters:
Name | Type | Description |
---|---|---|
Input |
string | string, in wjson or json format. |
Returns:
Output string in pretty json format.
- Also available as a line command application (see also wJSON object):
Usage: ./src/wjson2json.js < wjson-file.json > json-file.json
- Type
- string
(static) wjson2wjson(Input) → {string}
- Description:
Command line wrapper to reformat a strong or weak JSON syntax string to a normalized weak JSON format.
Parameters:
Name | Type | Description |
---|---|---|
Input |
string | string, in wjson or json format. |
Returns:
Output string in pretty wjson format.
- Also available as a line command application, (see also wJSON object):
Usage: ./src/wjson2wjson.js < json-file.json > wjson-file.json
- Type
- string