Skip to content
Snippets Groups Projects
Commit d5d1b3b6 authored by Stein Magne Bjorklund's avatar Stein Magne Bjorklund
Browse files

Autoload ARC2 library

parent d266155e
No related branches found
No related tags found
1 merge request!16Resolve "Introduce PSR-4 autoloading"
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace uib\ub\loadspeakr\modules; namespace uib\ub\loadspeakr\modules;
use ARC2;
use uib\ub\loadspeakr\Endpoint; use uib\ub\loadspeakr\Endpoint;
use uib\ub\loadspeakr\HTTPStatus; use uib\ub\loadspeakr\HTTPStatus;
use uib\ub\loadspeakr\Utils; use uib\ub\loadspeakr\Utils;
...@@ -332,8 +333,6 @@ class AdminModule extends abstractModule ...@@ -332,8 +333,6 @@ class AdminModule extends abstractModule
HTTPStatus::send409("No file was included in the request"); HTTPStatus::send409("No file was included in the request");
} else { } else {
$ng = (isset($_POST['namedgraph'])) ? $_POST['namedgraph'] : 'default'; $ng = (isset($_POST['namedgraph'])) ? $_POST['namedgraph'] : 'default';
require_once __DIR__ . '/../../vendor/semsol/arc2/ARC2.php';
$parser = ARC2::getRDFParser(); $parser = ARC2::getRDFParser();
$parser->parse($_FILES["file"]["tmp_name"]); $parser->parse($_FILES["file"]["tmp_name"]);
$triples = $parser->getTriples(); $triples = $parser->getTriples();
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
namespace uib\ub\loadspeakr\modules; namespace uib\ub\loadspeakr\modules;
use ARC2;
require_once('abstractModule.php'); require_once('abstractModule.php');
class ExportModule extends abstractModule class ExportModule extends abstractModule
...@@ -32,7 +34,6 @@ class ExportModule extends abstractModule ...@@ -32,7 +34,6 @@ class ExportModule extends abstractModule
define("RDFS", "http://www.w3.org/2000/01/rdf-schema#"); define("RDFS", "http://www.w3.org/2000/01/rdf-schema#");
define("OPMV", "http://openprovenance.org/ontology#"); define("OPMV", "http://openprovenance.org/ontology#");
define("SKOS", "http://www.w3.org/2004/02/skos/core#"); define("SKOS", "http://www.w3.org/2004/02/skos/core#");
require __DIR__ . '/../../vendor/semsol/arc2/ARC2.php';
$ser = ARC2::getTurtleSerializer(); $ser = ARC2::getTurtleSerializer();
$triples = array(); $triples = array();
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace uib\ub\loadspeakr\modules; namespace uib\ub\loadspeakr\modules;
use ARC2;
use uib\ub\loadspeakr\Convert; use uib\ub\loadspeakr\Convert;
use uib\ub\loadspeakr\HTTPStatus; use uib\ub\loadspeakr\HTTPStatus;
use uib\ub\loadspeakr\Logging; use uib\ub\loadspeakr\Logging;
...@@ -243,7 +244,6 @@ class ServiceModule extends abstractModule ...@@ -243,7 +244,6 @@ class ServiceModule extends abstractModule
protected function readScaffold($scaffold, $serviceArgs) protected function readScaffold($scaffold, $serviceArgs)
{ {
global $conf; global $conf;
require_once __DIR__ . '/../../vendor/semsol/arc2/ARC2.php';
$parser = ARC2::getTurtleParser(); $parser = ARC2::getTurtleParser();
$parser->parse($scaffold); $parser->parse($scaffold);
$triples = $parser->getTriples(); $triples = $parser->getTriples();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment