From 5af2ce0223120b062fa1c15dd0c8eae60ae0b392 Mon Sep 17 00:00:00 2001 From: alangrafu <alvaro@graves.cl> Date: Tue, 4 Oct 2011 22:36:19 -0400 Subject: [PATCH] Adding json export Also, fixed typo in configuration --- classes/Utils.php | 3 +++ common.inc.php | 1 + install.sh | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/Utils.php b/classes/Utils.php index 3407c62c..8f1d17db 100644 --- a/classes/Utils.php +++ b/classes/Utils.php @@ -157,6 +157,9 @@ class Utils{ case 'nt': $ser = ARC2::getNTriplesSerializer(); break; + case 'json': + $ser = ARC2::getRDFJSONSerializer(); + break; case 'rdf': $ser = ARC2::getRDFXMLSerializer(); break; diff --git a/common.inc.php b/common.inc.php index e4a1d795..0def982e 100644 --- a/common.inc.php +++ b/common.inc.php @@ -26,6 +26,7 @@ $conf['resource']['url_delimiter'] = "%u"; $conf['http_accept']['html'] = array('text/html'); $conf['http_accept']['rdf'] = array('application/rdf+xml'); $conf['http_accept']['ttl'] = array('text/n3', 'application/x-turtle', 'application/turtle', 'text/turtle'); +$conf['http_accept']['json'] = array('application/json', 'application/x-javascript', 'text/javascript', 'text/x-javascript', 'text/x-json'); $conf['http_accept']['nt'] = array('text/plain'); diff --git a/install.sh b/install.sh index eae44714..3096417d 100755 --- a/install.sh +++ b/install.sh @@ -81,7 +81,7 @@ LODSPEAKR_HOME=`pwd`/ \$conf['home'] = '$LODSPEAKR_HOME'; \$conf['basedir'] = '$basedir'; \$conf['debug'] = false; -\$conf['use_external_uris'] = fasle; +\$conf['use_external_uris'] = false; #If you want to add/overrid a namespace, add it here \$conf['ns']['local'] = '$ns'; @@ -99,11 +99,13 @@ cp $root_htaccess $parent_htaccess cd views ln -s default.view.rdf default.view.nt ln -s default.view.rdf default.view.ttl +ln -s default.view.rdf default.view.json ln -s owl:Class.view.html rdfs:Class.view.html cd ../models ln -s default.model.rdf default.model.nt ln -s default.model.rdf default.model.ttl +ln -s default.model.rdf default.model.json ln -s owl:Class.model.html rdfs:Class.view.html cd .. -- GitLab