Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Commit

Permalink
replaced remaining nodeUtils variables with rdfHelpers
Browse files Browse the repository at this point in the history
  • Loading branch information
k00ni committed May 8, 2017
1 parent 5c6c204 commit 7670285
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions NQuadsParser.php
Expand Up @@ -35,7 +35,7 @@ public function __construct(
RdfHelpers $rdfHelpers
) {
$this->nodeFactory = $nodeFactory;
$this->nodeUtils = $rdfHelpers;
$this->rdfHelpers = $rdfHelpers;
$this->statementFactory = $statementFactory;
$this->statementIteratorFactory = $statementIteratorFactory;
}
Expand Down Expand Up @@ -65,19 +65,19 @@ public function getCurrentPrefixList()
public function parseStringToIterator($inputString, $baseUri = null)
{
// check $baseUri
if (null !== $baseUri && false == $this->nodeUtils->simpleCheckURI($baseUri)) {
if (null !== $baseUri && false == $this->rdfHelpers->simpleCheckURI($baseUri)) {
throw new \Exception('No base URI support for now. To continue, just leave $baseUri = null.');
}

$statements = array();

$pattern = '/' .
$this->nodeUtils->getRegexStringForNodeRecognition(true) .'\s*|\t*'.
$this->nodeUtils->getRegexStringForNodeRecognition() .'\s*|\t*'.
$this->nodeUtils->getRegexStringForNodeRecognition(
$this->rdfHelpers->getRegexStringForNodeRecognition(true) .'\s*|\t*'.
$this->rdfHelpers->getRegexStringForNodeRecognition() .'\s*|\t*'.
$this->rdfHelpers->getRegexStringForNodeRecognition(
true, true, true, true, true, true
) . '\s*|\t*'.
$this->nodeUtils->getRegexStringForNodeRecognition() .
$this->rdfHelpers->getRegexStringForNodeRecognition() .
'/is';

foreach (explode(PHP_EOL, $inputString) as $line) {
Expand Down
8 changes: 4 additions & 4 deletions RDFXMLParser.php
Expand Up @@ -38,7 +38,7 @@ public function __construct(
RdfHelpers $rdfHelpers
) {
$this->nodeFactory = $nodeFactory;
$this->nodeUtils = $rdfHelpers;
$this->rdfHelpers = $rdfHelpers;
$this->statementFactory = $statementFactory;
$this->statementIteratorFactory = $statementIteratorFactory;
}
Expand Down Expand Up @@ -68,7 +68,7 @@ public function getCurrentPrefixList()
public function parseStringToIterator($inputString, $baseUri = null)
{
// check $baseUri
if (null !== $baseUri && false == $this->nodeUtils->simpleCheckURI($baseUri)) {
if (null !== $baseUri && false == $this->rdfHelpers->simpleCheckURI($baseUri)) {
throw new \Exception('No base URI support for now. To continue, just leave $baseUri = null.');
}

Expand Down Expand Up @@ -125,7 +125,7 @@ public function parseStringToIterator($inputString, $baseUri = null)

// object is URI
if (isset($objectValue['attributes'][$rdfResourceString])
&& $this->nodeUtils->simpleCheckURI(
&& $this->rdfHelpers->simpleCheckURI(
$objectValue['attributes'][$rdfResourceString])
) {

Expand All @@ -134,7 +134,7 @@ public function parseStringToIterator($inputString, $baseUri = null)
);

// object is blank node
} elseif ($this->nodeUtils->simpleCheckBlankNodeId($objectValue['value'])) {
} elseif ($this->rdfHelpers->simpleCheckBlankNodeId($objectValue['value'])) {
$object = $this->nodeFactory->createBlankNode($objectValue['value']);

// guess object is of type literal
Expand Down

0 comments on commit 7670285

Please sign in to comment.