jenkins-bot has submitted this change and it was merged.
Change subject: Inject RdfVocabulary where needed
......................................................................
Inject RdfVocabulary where needed
Change-Id: Ice2d54ff160911b99392d807ae80b1c80df877f1
---
M repo/includes/Dumpers/RdfDumpGenerator.php
M repo/includes/LinkedData/EntityDataSerializationService.php
M repo/includes/WikibaseRepo.php
M repo/includes/specials/SpecialEntityData.php
M repo/maintenance/dumpRdf.php
M repo/tests/phpunit/data/maintenance/dumpRdf-out.txt
M repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php
M repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php
M repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php
M repo/tests/phpunit/includes/WikibaseRepoTest.php
M repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
M repo/tests/phpunit/maintenance/dumpRdfTest.php
12 files changed, 177 insertions(+), 205 deletions(-)
Approvals:
Hoo man: Looks good to me, approved
Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/repo/includes/Dumpers/RdfDumpGenerator.php
b/repo/includes/Dumpers/RdfDumpGenerator.php
index 4c16b2a..ffa99f2 100644
--- a/repo/includes/Dumpers/RdfDumpGenerator.php
+++ b/repo/includes/Dumpers/RdfDumpGenerator.php
@@ -156,14 +156,12 @@
/**
* @param string $format
* @param resource $output
- * @param string $baseUri
- * @param string $dataUri
* @param SiteList $sites
* @param EntityRevisionLookup $entityRevisionLookup
* @param PropertyDataTypeLookup $propertyLookup
* @param ValueSnakRdfBuilderFactory $valueSnakRdfBuilderFactory
* @param EntityPrefetcher $entityPrefetcher
- * @param string[] $canonicalLanguageCodes Mapping of non-standard to
canonical language codes.
+ * @param RdfVocabulary $vocabulary
*
* @return RdfDumpGenerator
* @throws MWException
@@ -171,14 +169,12 @@
public static function createDumpGenerator(
$format,
$output,
- $baseUri,
- $dataUri,
SiteList $sites,
EntityRevisionLookup $entityRevisionLookup,
PropertyDataTypeLookup $propertyLookup,
ValueSnakRdfBuilderFactory $valueSnakRdfBuilderFactory,
EntityPrefetcher $entityPrefetcher,
- array $canonicalLanguageCodes = array()
+ RdfVocabulary $vocabulary
) {
$rdfWriter = self::getRdfWriter( $format );
if ( !$rdfWriter ) {
@@ -191,7 +187,7 @@
$rdfBuilder = new RdfBuilder(
$sites,
- new RdfVocabulary( $baseUri, $dataUri,
$canonicalLanguageCodes ),
+ $vocabulary,
$valueSnakRdfBuilderFactory,
$propertyLookup,
$flavor,
diff --git a/repo/includes/LinkedData/EntityDataSerializationService.php
b/repo/includes/LinkedData/EntityDataSerializationService.php
index 673c16c..14d1ecd 100644
--- a/repo/includes/LinkedData/EntityDataSerializationService.php
+++ b/repo/includes/LinkedData/EntityDataSerializationService.php
@@ -62,16 +62,6 @@
);
/**
- * @var string|null
- */
- private $rdfBaseURI = null;
-
- /**
- * @var string|null
- */
- private $rdfDataURI = null;
-
- /**
* @var EntityLookup|null
*/
private $entityLookup = null;
@@ -112,9 +102,9 @@
private $siteStore;
/**
- * @var string[] Mapping of non-standard to canonical language codes.
+ * @var RdfVocabulary
*/
- private $canonicalLanguageCodes;
+ private $rdfVocabulary;
/**
* @var ValueSnakRdfBuilderFactory
@@ -122,8 +112,6 @@
private $valueSnakRdfBuilderFactory;
/**
- * @param string $rdfBaseURI
- * @param string $rdfDataURI
* @param EntityLookup $entityLookup
* @param EntityTitleLookup $entityTitleLookup
* @param PropertyDataTypeLookup $propertyLookup
@@ -132,13 +120,11 @@
* @param EntityDataFormatProvider $entityDataFormatProvider
* @param SerializerFactory $serializerFactory
* @param SiteStore $siteStore
- * @param string[] $canonicalLanguageCodes Mapping of non-standard to
canonical language codes.
+ * @param RdfVocabulary $rdfVocabulary
*
* @since 0.4
*/
public function __construct(
- $rdfBaseURI,
- $rdfDataURI,
EntityLookup $entityLookup,
EntityTitleLookup $entityTitleLookup,
PropertyDataTypeLookup $propertyLookup,
@@ -147,10 +133,8 @@
EntityDataFormatProvider $entityDataFormatProvider,
SerializerFactory $serializerFactory,
SiteStore $siteStore,
- array $canonicalLanguageCodes = array()
+ RdfVocabulary $rdfVocabulary
) {
- $this->rdfBaseURI = $rdfBaseURI;
- $this->rdfDataURI = $rdfDataURI;
$this->entityLookup = $entityLookup;
$this->entityTitleLookup = $entityTitleLookup;
$this->serializerFactory = $serializerFactory;
@@ -159,7 +143,7 @@
$this->sites = $sites;
$this->entityDataFormatProvider = $entityDataFormatProvider;
$this->siteStore = $siteStore;
- $this->canonicalLanguageCodes = $canonicalLanguageCodes;
+ $this->rdfVocabulary = $rdfVocabulary;
$this->rdfWriterFactory = new RdfWriterFactory();
}
@@ -176,34 +160,6 @@
*/
public function getFieldsToShow() {
return $this->fieldsToShow;
- }
-
- /**
- * @param string $rdfBaseURI
- */
- public function setRdfBaseURI( $rdfBaseURI ) {
- $this->rdfBaseURI = $rdfBaseURI;
- }
-
- /**
- * @return string
- */
- public function getRdfBaseURI() {
- return $this->rdfBaseURI;
- }
-
- /**
- * @param string $rdfDataURI
- */
- public function setRdfDataURI( $rdfDataURI ) {
- $this->rdfDataURI = $rdfDataURI;
- }
-
- /**
- * @return string
- */
- public function getRdfDataURI() {
- return $this->rdfDataURI;
}
/**
@@ -431,7 +387,7 @@
$rdfBuilder = new RdfBuilder(
$this->sites,
- new RdfVocabulary( $this->rdfBaseURI,
$this->rdfDataURI, $this->canonicalLanguageCodes ),
+ $this->rdfVocabulary,
$this->valueSnakRdfBuilderFactory,
$this->propertyLookup,
$this->getFlavor( $flavorName ),
diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index 1258ec3..510b804 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -17,6 +17,7 @@
use SiteSQLStore;
use SiteStore;
use StubObject;
+use Title;
use User;
use ValueFormatters\FormatterOptions;
use ValueFormatters\ValueFormatter;
@@ -71,6 +72,7 @@
use Wikibase\Lib\WikibaseSnakFormatterBuilders;
use Wikibase\Lib\WikibaseValueFormatterBuilders;
use Wikibase\PropertyInfoBuilder;
+use Wikibase\Rdf\RdfVocabulary;
use Wikibase\Rdf\ValueSnakRdfBuilderFactory;
use Wikibase\Repo\Api\ApiHelperFactory;
use Wikibase\Repo\CachingCommonsMediaFileNameLookup;
@@ -222,6 +224,11 @@
* @var ValueSnakRdfBuilderFactory
*/
private $valueSnakRdfBuilderFactory;
+
+ /**
+ * @var RdfVocabulary
+ */
+ private $rdfVocabulary;
/**
* @var CachingCommonsMediaFileNameLookup|null
@@ -876,6 +883,32 @@
}
/**
+ * @return RdfVocabulary
+ */
+ public function getRdfVocabulary() {
+ global $wgDummyLanguageCodes;
+
+ if ( $this->rdfVocabulary === null ) {
+ $settings = $this->getSettings();
+
+ $languageCodes = array_merge(
+ $wgDummyLanguageCodes,
+ $settings->getSetting( 'canonicalLanguageCodes'
)
+ );
+
+ $entityDataTitle = Title::makeTitle( NS_SPECIAL,
'EntityData' );
+
+ $this->rdfVocabulary = new RdfVocabulary(
+ $settings->getSetting( 'conceptBaseUri' ),
+ $entityDataTitle->getCanonicalURL() . '/',
+ $languageCodes
+ );
+ }
+
+ return $this->rdfVocabulary;
+ }
+
+ /**
* @return ExceptionLocalizer
*/
public function getExceptionLocalizer() {
diff --git a/repo/includes/specials/SpecialEntityData.php
b/repo/includes/specials/SpecialEntityData.php
index ce4d77d..b381784 100644
--- a/repo/includes/specials/SpecialEntityData.php
+++ b/repo/includes/specials/SpecialEntityData.php
@@ -87,14 +87,7 @@
SerializerFactory::OPTION_SERIALIZE_REFERENCE_SNAKS_WITHOUT_HASH
);
- $languageCodes = array_merge(
- $GLOBALS['wgDummyLanguageCodes'],
- $wikibaseRepo->getSettings()->getSetting(
'canonicalLanguageCodes' )
- );
-
$serializationService = new EntityDataSerializationService(
- $wikibaseRepo->getSettings()->getSetting(
'conceptBaseUri' ),
- $this->getPageTitle()->getCanonicalURL() . '/',
$wikibaseRepo->getStore()->getEntityLookup(),
$titleLookup,
$wikibaseRepo->getPropertyDataTypeLookup(),
@@ -103,7 +96,7 @@
$entityDataFormatProvider,
$serializerFactory,
$wikibaseRepo->getSiteStore(),
- $languageCodes
+ $wikibaseRepo->getRdfVocabulary()
);
$maxAge = $wikibaseRepo->getSettings()->getSetting(
'dataSquidMaxage' );
diff --git a/repo/maintenance/dumpRdf.php b/repo/maintenance/dumpRdf.php
index 6a5af00..f62633d 100644
--- a/repo/maintenance/dumpRdf.php
+++ b/repo/maintenance/dumpRdf.php
@@ -3,12 +3,12 @@
namespace Wikibase;
use SiteStore;
-use Title;
use Wikibase\DataModel\Services\Entity\EntityPrefetcher;
use Wikibase\DataModel\Services\Lookup\PropertyDataTypeLookup;
use Wikibase\Dumpers\DumpGenerator;
use Wikibase\Dumpers\RdfDumpGenerator;
use Wikibase\Lib\Store\EntityRevisionLookup;
+use Wikibase\Rdf\RdfVocabulary;
use Wikibase\Rdf\ValueSnakRdfBuilderFactory;
use Wikibase\Repo\Store\EntityPerPage;
use Wikibase\Repo\WikibaseRepo;
@@ -50,9 +50,9 @@
private $valueSnakRdfBuilderFactory;
/**
- * @var string
+ * @var RdfVocabulary
*/
- private $conceptBaseUri;
+ private $rdfVocabulary;
/**
* @var bool
@@ -71,7 +71,7 @@
* @param PropertyDataTypeLookup $propertyDataTypeLookup
* @param ValueSnakRdfBuilderFactory $valueSnakRdfBuilderFactory
* @param EntityRevisionLookup $entityRevisionLookup
- * @param string $conceptBaseUri
+ * @param RdfVocabulary $rdfVocabulary
*/
public function setServices(
EntityPerPage $entityPerPage,
@@ -80,7 +80,7 @@
PropertyDataTypeLookup $propertyDataTypeLookup,
ValueSnakRdfBuilderFactory $valueSnakRdfBuilderFactory,
EntityRevisionLookup $entityRevisionLookup,
- $conceptBaseUri
+ RdfVocabulary $rdfVocabulary
) {
parent::setDumpEntitiesServices( $entityPerPage );
$this->entityPrefetcher = $entityPrefetcher;
@@ -88,7 +88,7 @@
$this->propertyDatatypeLookup = $propertyDataTypeLookup;
$this->valueSnakRdfBuilderFactory = $valueSnakRdfBuilderFactory;
$this->revisionLookup = $entityRevisionLookup;
- $this->conceptBaseUri = $conceptBaseUri;
+ $this->rdfVocabulary = $rdfVocabulary;
$this->hasHadServicesSet = true;
}
@@ -102,7 +102,7 @@
$wikibaseRepo->getPropertyDataTypeLookup(),
$wikibaseRepo->getValueSnakRdfBuilderFactory(),
$wikibaseRepo->getEntityRevisionLookup(
'uncached' ),
- $wikibaseRepo->getSettings()->getSetting(
'conceptBaseUri' )
+ $wikibaseRepo->getRdfVocabulary()
);
}
parent::execute();
@@ -125,24 +125,15 @@
* @return DumpGenerator
*/
protected function createDumper( $output ) {
- $entityDataTitle = Title::makeTitle( NS_SPECIAL, 'EntityData' );
-
- $languageCodes = array_merge(
- $GLOBALS['wgDummyLanguageCodes'],
-
WikibaseRepo::getDefaultInstance()->getSettings()->getSetting(
'canonicalLanguageCodes' )
- );
-
return RdfDumpGenerator::createDumpGenerator(
$this->getOption( 'format', 'ttl' ),
$output,
- $this->conceptBaseUri,
- $entityDataTitle->getCanonicalURL() . '/',
$this->siteStore->getSites(),
$this->revisionLookup,
$this->propertyDatatypeLookup,
$this->valueSnakRdfBuilderFactory,
$this->entityPrefetcher,
- $languageCodes
+ $this->rdfVocabulary
);
}
diff --git a/repo/tests/phpunit/data/maintenance/dumpRdf-out.txt
b/repo/tests/phpunit/data/maintenance/dumpRdf-out.txt
index 5509df8..3ccfb58 100644
--- a/repo/tests/phpunit/data/maintenance/dumpRdf-out.txt
+++ b/repo/tests/phpunit/data/maintenance/dumpRdf-out.txt
@@ -4,112 +4,112 @@
<http://wikiba.se/ontology-beta#Dump> <http://schema.org/softwareVersion>
"0.0.1" .
<http://wikiba.se/ontology-beta#Dump> <http://schema.org/dateModified>
"2015-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<http://wikiba.se/ontology-beta#Dump> <http://www.w3.org/2002/07/owl#imports>
<http://wikiba.se/ontology-1.0.owl> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/Q1>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Dataset> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/Q1>
<http://schema.org/about> <fooUriQ1> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/Q1>
<http://schema.org/version> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/Q1>
<http://schema.org/dateModified>
"2000-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
-<fooUriQ1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Item> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/P1>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Dataset> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/P1>
<http://schema.org/about> <fooUriP1> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/P1>
<http://schema.org/version> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/P1>
<http://schema.org/dateModified>
"2000-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
-<fooUriP1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Property> .
-<fooUriP1> <http://wikiba.se/ontology-beta#propertyType>
<http://wikiba.se/ontology-beta#String> .
-<fooUriP1> <http://wikiba.se/ontology-beta#directClaim> <fooUriprop/direct/P1>
.
-<fooUriP1> <http://wikiba.se/ontology-beta#claim> <fooUriprop/P1> .
-<fooUriP1> <http://wikiba.se/ontology-beta#statementProperty>
<fooUriprop/statement/P1> .
-<fooUriP1> <http://wikiba.se/ontology-beta#statementValue>
<fooUriprop/statement/value/P1> .
-<fooUriP1> <http://wikiba.se/ontology-beta#qualifier>
<fooUriprop/qualifier/P1> .
-<fooUriP1> <http://wikiba.se/ontology-beta#qualifierValue>
<fooUriprop/qualifier/value/P1> .
-<fooUriP1> <http://wikiba.se/ontology-beta#reference>
<fooUriprop/reference/P1> .
-<fooUriP1> <http://wikiba.se/ontology-beta#referenceValue>
<fooUriprop/reference/value/P1> .
-<fooUriP1> <http://wikiba.se/ontology-beta#novalue> <fooUriprop/novalue/P1> .
-<fooUriprop/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
-<fooUriprop/statement/value/P1>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
-<fooUriprop/qualifier/value/P1>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
-<fooUriprop/reference/value/P1>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
-<fooUriprop/direct/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
-<fooUriprop/statement/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
-<fooUriprop/qualifier/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
-<fooUriprop/reference/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
-<fooUriprop/novalue/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#Class> .
-<fooUriprop/novalue/P1> <http://www.w3.org/2002/07/owl#complementOf> _:genid1 .
+<acme/EntityData/Q1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://schema.org/Dataset> .
+<acme/EntityData/Q1> <http://schema.org/about> <fooUri/Q1> .
+<acme/EntityData/Q1> <http://schema.org/version>
"1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<acme/EntityData/Q1> <http://schema.org/dateModified>
"2000-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<fooUri/Q1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Item> .
+<acme/EntityData/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://schema.org/Dataset> .
+<acme/EntityData/P1> <http://schema.org/about> <fooUri/P1> .
+<acme/EntityData/P1> <http://schema.org/version>
"1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<acme/EntityData/P1> <http://schema.org/dateModified>
"2000-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<fooUri/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Property> .
+<fooUri/P1> <http://wikiba.se/ontology-beta#propertyType>
<http://wikiba.se/ontology-beta#String> .
+<fooUri/P1> <http://wikiba.se/ontology-beta#directClaim>
<fooUri/prop/direct/P1> .
+<fooUri/P1> <http://wikiba.se/ontology-beta#claim> <fooUri/prop/P1> .
+<fooUri/P1> <http://wikiba.se/ontology-beta#statementProperty>
<fooUri/prop/statement/P1> .
+<fooUri/P1> <http://wikiba.se/ontology-beta#statementValue>
<fooUri/prop/statement/value/P1> .
+<fooUri/P1> <http://wikiba.se/ontology-beta#qualifier>
<fooUri/prop/qualifier/P1> .
+<fooUri/P1> <http://wikiba.se/ontology-beta#qualifierValue>
<fooUri/prop/qualifier/value/P1> .
+<fooUri/P1> <http://wikiba.se/ontology-beta#reference>
<fooUri/prop/reference/P1> .
+<fooUri/P1> <http://wikiba.se/ontology-beta#referenceValue>
<fooUri/prop/reference/value/P1> .
+<fooUri/P1> <http://wikiba.se/ontology-beta#novalue> <fooUri/prop/novalue/P1> .
+<fooUri/prop/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
+<fooUri/prop/statement/value/P1>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
+<fooUri/prop/qualifier/value/P1>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
+<fooUri/prop/reference/value/P1>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
+<fooUri/prop/direct/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<fooUri/prop/statement/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<fooUri/prop/qualifier/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<fooUri/prop/reference/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<fooUri/prop/novalue/P1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#Class> .
+<fooUri/prop/novalue/P1> <http://www.w3.org/2002/07/owl#complementOf> _:genid1
.
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#Restriction> .
-_:genid1 <http://www.w3.org/2002/07/owl#onProperty> <fooUriprop/direct/P1> .
+_:genid1 <http://www.w3.org/2002/07/owl#onProperty> <fooUri/prop/direct/P1> .
_:genid1 <http://www.w3.org/2002/07/owl#someValuesFrom>
<http://www.w3.org/2002/07/owl#Thing> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/P12>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Dataset> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/P12>
<http://schema.org/about> <fooUriP12> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/P12>
<http://schema.org/version> "2"^^<http://www.w3.org/2001/XMLSchema#integer> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/P12>
<http://schema.org/dateModified>
"2000-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
-<fooUriP12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Property> .
-<fooUriP12> <http://wikiba.se/ontology-beta#propertyType>
<http://wikiba.se/ontology-beta#String> .
-<fooUriP12> <http://wikiba.se/ontology-beta#directClaim>
<fooUriprop/direct/P12> .
-<fooUriP12> <http://wikiba.se/ontology-beta#claim> <fooUriprop/P12> .
-<fooUriP12> <http://wikiba.se/ontology-beta#statementProperty>
<fooUriprop/statement/P12> .
-<fooUriP12> <http://wikiba.se/ontology-beta#statementValue>
<fooUriprop/statement/value/P12> .
-<fooUriP12> <http://wikiba.se/ontology-beta#qualifier>
<fooUriprop/qualifier/P12> .
-<fooUriP12> <http://wikiba.se/ontology-beta#qualifierValue>
<fooUriprop/qualifier/value/P12> .
-<fooUriP12> <http://wikiba.se/ontology-beta#reference>
<fooUriprop/reference/P12> .
-<fooUriP12> <http://wikiba.se/ontology-beta#referenceValue>
<fooUriprop/reference/value/P12> .
-<fooUriP12> <http://wikiba.se/ontology-beta#novalue> <fooUriprop/novalue/P12> .
-<fooUriprop/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
-<fooUriprop/statement/value/P12>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
-<fooUriprop/qualifier/value/P12>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
-<fooUriprop/reference/value/P12>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
-<fooUriprop/direct/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
-<fooUriprop/statement/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
-<fooUriprop/qualifier/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
-<fooUriprop/reference/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
-<fooUriprop/novalue/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#Class> .
-<fooUriprop/novalue/P12> <http://www.w3.org/2002/07/owl#complementOf> _:genid2
.
+<acme/EntityData/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://schema.org/Dataset> .
+<acme/EntityData/P12> <http://schema.org/about> <fooUri/P12> .
+<acme/EntityData/P12> <http://schema.org/version>
"2"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<acme/EntityData/P12> <http://schema.org/dateModified>
"2000-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<fooUri/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Property> .
+<fooUri/P12> <http://wikiba.se/ontology-beta#propertyType>
<http://wikiba.se/ontology-beta#String> .
+<fooUri/P12> <http://wikiba.se/ontology-beta#directClaim>
<fooUri/prop/direct/P12> .
+<fooUri/P12> <http://wikiba.se/ontology-beta#claim> <fooUri/prop/P12> .
+<fooUri/P12> <http://wikiba.se/ontology-beta#statementProperty>
<fooUri/prop/statement/P12> .
+<fooUri/P12> <http://wikiba.se/ontology-beta#statementValue>
<fooUri/prop/statement/value/P12> .
+<fooUri/P12> <http://wikiba.se/ontology-beta#qualifier>
<fooUri/prop/qualifier/P12> .
+<fooUri/P12> <http://wikiba.se/ontology-beta#qualifierValue>
<fooUri/prop/qualifier/value/P12> .
+<fooUri/P12> <http://wikiba.se/ontology-beta#reference>
<fooUri/prop/reference/P12> .
+<fooUri/P12> <http://wikiba.se/ontology-beta#referenceValue>
<fooUri/prop/reference/value/P12> .
+<fooUri/P12> <http://wikiba.se/ontology-beta#novalue>
<fooUri/prop/novalue/P12> .
+<fooUri/prop/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
+<fooUri/prop/statement/value/P12>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
+<fooUri/prop/qualifier/value/P12>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
+<fooUri/prop/reference/value/P12>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#ObjectProperty> .
+<fooUri/prop/direct/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<fooUri/prop/statement/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<fooUri/prop/qualifier/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<fooUri/prop/reference/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<fooUri/prop/novalue/P12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#Class> .
+<fooUri/prop/novalue/P12> <http://www.w3.org/2002/07/owl#complementOf>
_:genid2 .
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#Restriction> .
-_:genid2 <http://www.w3.org/2002/07/owl#onProperty> <fooUriprop/direct/P12> .
+_:genid2 <http://www.w3.org/2002/07/owl#onProperty> <fooUri/prop/direct/P12> .
_:genid2 <http://www.w3.org/2002/07/owl#someValuesFrom>
<http://www.w3.org/2002/07/owl#Thing> .
-<fooUriP12> <fooUriprop/direct/P999> _:genid3 .
-<fooUriP12> <fooUriprop/P999> <fooUristatement/GUID1> .
-<fooUristatement/GUID1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Statement> .
-<fooUristatement/GUID1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#BestRank> .
-<fooUristatement/GUID1> <http://wikiba.se/ontology-beta#rank>
<http://wikiba.se/ontology-beta#NormalRank> .
-<fooUristatement/GUID1> <fooUriprop/statement/P999> _:genid4 .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/Q2>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Dataset> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/Q2>
<http://schema.org/about> <fooUriQ2> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/Q2>
<http://schema.org/version> "3"^^<http://www.w3.org/2001/XMLSchema#integer> .
-<http://dump.rdf.test/DumpRdfTest/Special:EntityData/Q2>
<http://schema.org/dateModified>
"2000-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
-<fooUriQ2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Item> .
-<fooUriQ2> <http://www.w3.org/2000/01/rdf-schema#label> "en-label"@en .
-<fooUriQ2> <http://www.w3.org/2004/02/skos/core#prefLabel> "en-label"@en .
-<fooUriQ2> <http://schema.org/name> "en-label"@en .
-<fooUriQ2> <http://www.w3.org/2000/01/rdf-schema#label> "de-label"@de .
-<fooUriQ2> <http://www.w3.org/2004/02/skos/core#prefLabel> "de-label"@de .
-<fooUriQ2> <http://schema.org/name> "de-label"@de .
-<fooUriQ2> <http://schema.org/description> "en-desc"@fr .
-<fooUriQ2> <http://schema.org/description> "de-desc"@de .
-<fooUriQ2> <http://www.w3.org/2004/02/skos/core#altLabel> "ali1"@en .
-<fooUriQ2> <http://www.w3.org/2004/02/skos/core#altLabel> "ali2"@en .
-<fooUriQ2> <http://www.w3.org/2004/02/skos/core#altLabel> "ali11"@dv .
-<fooUriQ2> <http://www.w3.org/2004/02/skos/core#altLabel> "ali22"@dv .
-<fooUriQ2> <fooUriprop/direct/P12> _:genid5 .
-<fooUriQ2> <fooUriprop/direct/P12> _:genid6 .
-<fooUriQ2> <fooUriprop/P12> <fooUristatement/GUID1> .
-<fooUristatement/GUID1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Statement> .
-<fooUristatement/GUID1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#BestRank> .
-<fooUristatement/GUID1> <http://wikiba.se/ontology-beta#rank>
<http://wikiba.se/ontology-beta#NormalRank> .
-<fooUristatement/GUID1> <fooUriprop/statement/P12> _:genid7 .
-<fooUriQ2> <fooUriprop/P12> <fooUristatement/GUID2> .
-<fooUristatement/GUID2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Statement> .
-<fooUristatement/GUID2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#BestRank> .
-<fooUristatement/GUID2> <http://wikiba.se/ontology-beta#rank>
<http://wikiba.se/ontology-beta#NormalRank> .
-<fooUristatement/GUID2> <fooUriprop/statement/P12> _:genid8 .
-<fooUristatement/GUID2> <fooUriprop/qualifier/P12> _:genid9 .
-<fooUristatement/GUID2> <fooUriprop/qualifier/P12> "stringVal" .
-<fooUristatement/GUID2> <http://www.w3.org/ns/prov#wasDerivedFrom>
<fooUrireference/2d8eac3c95db6407b057e9883971cbdb562d6473> .
+<fooUri/P12> <fooUri/prop/direct/P999> _:genid3 .
+<fooUri/P12> <fooUri/prop/P999> <fooUri/statement/GUID1> .
+<fooUri/statement/GUID1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Statement> .
+<fooUri/statement/GUID1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#BestRank> .
+<fooUri/statement/GUID1> <http://wikiba.se/ontology-beta#rank>
<http://wikiba.se/ontology-beta#NormalRank> .
+<fooUri/statement/GUID1> <fooUri/prop/statement/P999> _:genid4 .
+<acme/EntityData/Q2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://schema.org/Dataset> .
+<acme/EntityData/Q2> <http://schema.org/about> <fooUri/Q2> .
+<acme/EntityData/Q2> <http://schema.org/version>
"3"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<acme/EntityData/Q2> <http://schema.org/dateModified>
"2000-01-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<fooUri/Q2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Item> .
+<fooUri/Q2> <http://www.w3.org/2000/01/rdf-schema#label> "en-label"@en .
+<fooUri/Q2> <http://www.w3.org/2004/02/skos/core#prefLabel> "en-label"@en .
+<fooUri/Q2> <http://schema.org/name> "en-label"@en .
+<fooUri/Q2> <http://www.w3.org/2000/01/rdf-schema#label> "de-label"@de .
+<fooUri/Q2> <http://www.w3.org/2004/02/skos/core#prefLabel> "de-label"@de .
+<fooUri/Q2> <http://schema.org/name> "de-label"@de .
+<fooUri/Q2> <http://schema.org/description> "en-desc"@fr .
+<fooUri/Q2> <http://schema.org/description> "de-desc"@de .
+<fooUri/Q2> <http://www.w3.org/2004/02/skos/core#altLabel> "ali1"@en .
+<fooUri/Q2> <http://www.w3.org/2004/02/skos/core#altLabel> "ali2"@en .
+<fooUri/Q2> <http://www.w3.org/2004/02/skos/core#altLabel> "ali11"@dv .
+<fooUri/Q2> <http://www.w3.org/2004/02/skos/core#altLabel> "ali22"@dv .
+<fooUri/Q2> <fooUri/prop/direct/P12> _:genid5 .
+<fooUri/Q2> <fooUri/prop/direct/P12> _:genid6 .
+<fooUri/Q2> <fooUri/prop/P12> <fooUri/statement/GUID1> .
+<fooUri/statement/GUID1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Statement> .
+<fooUri/statement/GUID1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#BestRank> .
+<fooUri/statement/GUID1> <http://wikiba.se/ontology-beta#rank>
<http://wikiba.se/ontology-beta#NormalRank> .
+<fooUri/statement/GUID1> <fooUri/prop/statement/P12> _:genid7 .
+<fooUri/Q2> <fooUri/prop/P12> <fooUri/statement/GUID2> .
+<fooUri/statement/GUID2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Statement> .
+<fooUri/statement/GUID2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#BestRank> .
+<fooUri/statement/GUID2> <http://wikiba.se/ontology-beta#rank>
<http://wikiba.se/ontology-beta#NormalRank> .
+<fooUri/statement/GUID2> <fooUri/prop/statement/P12> _:genid8 .
+<fooUri/statement/GUID2> <fooUri/prop/qualifier/P12> _:genid9 .
+<fooUri/statement/GUID2> <fooUri/prop/qualifier/P12> "stringVal" .
+<fooUri/statement/GUID2> <http://www.w3.org/ns/prov#wasDerivedFrom>
<fooUri/reference/2d8eac3c95db6407b057e9883971cbdb562d6473> .
<https://en.wikipedia.org/wiki/Berlin>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Article> .
-<https://en.wikipedia.org/wiki/Berlin> <http://schema.org/about> <fooUriQ2> .
+<https://en.wikipedia.org/wiki/Berlin> <http://schema.org/about> <fooUri/Q2> .
<https://en.wikipedia.org/wiki/Berlin> <http://schema.org/inLanguage> "en" .
<https://de.wikipedia.org/wiki/England>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Article> .
-<https://de.wikipedia.org/wiki/England> <http://schema.org/about> <fooUriQ2> .
+<https://de.wikipedia.org/wiki/England> <http://schema.org/about> <fooUri/Q2> .
<https://de.wikipedia.org/wiki/England> <http://schema.org/inLanguage> "de" .
-<https://de.wikipedia.org/wiki/England> <http://wikiba.se/ontology-beta#badge>
<fooUriQ1> .
-<fooUrireference/2d8eac3c95db6407b057e9883971cbdb562d6473>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Reference> .
-<fooUrireference/2d8eac3c95db6407b057e9883971cbdb562d6473>
<fooUriprop/reference/P12> "refSnakVal" .
-<fooUrireference/2d8eac3c95db6407b057e9883971cbdb562d6473>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <fooUriprop/novalue/P12> .
+<https://de.wikipedia.org/wiki/England> <http://wikiba.se/ontology-beta#badge>
<fooUri/Q1> .
+<fooUri/reference/2d8eac3c95db6407b057e9883971cbdb562d6473>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://wikiba.se/ontology-beta#Reference> .
+<fooUri/reference/2d8eac3c95db6407b057e9883971cbdb562d6473>
<fooUri/prop/reference/P12> "refSnakVal" .
+<fooUri/reference/2d8eac3c95db6407b057e9883971cbdb562d6473>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <fooUri/prop/novalue/P12> .
diff --git a/repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php
b/repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php
index 9d7eacc..ed5c1e9 100644
--- a/repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php
+++ b/repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php
@@ -15,6 +15,7 @@
use Wikibase\Dumpers\RdfDumpGenerator;
use Wikibase\EntityRevision;
use Wikibase\Lib\Store\RevisionedUnresolvedRedirectException;
+use Wikibase\Rdf\RdfVocabulary;
use Wikibase\Repo\Tests\Rdf\NTriplesRdfTestHelper;
use Wikibase\Repo\WikibaseRepo;
use Wikibase\Test\Rdf\RdfBuilderTest;
@@ -130,14 +131,16 @@
return RdfDumpGenerator::createDumpGenerator(
'ntriples',
$out,
- self::URI_BASE,
- self::URI_DATA,
$this->getSiteList(),
$entityRevisionLookup,
$dataTypeLookup,
$rdfBuilderFactory,
new NullEntityPrefetcher(),
- array( 'test' => 'en-x-test' )
+ new RdfVocabulary(
+ self::URI_BASE,
+ self::URI_DATA,
+ array( 'test' => 'en-x-test' )
+ )
);
}
diff --git
a/repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php
b/repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php
index e670702..3830453 100644
--- a/repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php
+++ b/repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php
@@ -15,6 +15,7 @@
use Wikibase\DataModel\Entity\EntityId;
use Wikibase\DataModel\SerializerFactory;
use Wikibase\DataModel\Entity\BasicEntityIdParser;
+use Wikibase\Rdf\RdfVocabulary;
use Wikibase\Repo\LinkedData\EntityDataFormatProvider;
use Wikibase\Repo\LinkedData\EntityDataRequestHandler;
use Wikibase\Repo\LinkedData\EntityDataSerializationService;
@@ -100,8 +101,6 @@
$rdfBuilder =
WikibaseRepo::getDefaultInstance()->getValueSnakRdfBuilderFactory();
$service = new EntityDataSerializationService(
- EntityDataSerializationServiceTest::URI_BASE,
- EntityDataSerializationServiceTest::URI_DATA,
$mockRepository,
$titleLookup,
$propertyLookup,
@@ -109,7 +108,11 @@
new SiteList(),
$entityDataFormatProvider,
$serializerFactory,
- new HashSiteStore()
+ new HashSiteStore(),
+ new RdfVocabulary(
+ EntityDataSerializationServiceTest::URI_BASE,
+ EntityDataSerializationServiceTest::URI_DATA
+ )
);
$entityDataFormatProvider->setFormatWhiteList(
diff --git
a/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php
b/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php
index c0ac38e..11a8940 100644
---
a/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php
+++
b/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php
@@ -16,6 +16,7 @@
use Wikibase\DataModel\SerializerFactory;
use Wikibase\DataModel\Snak\PropertyValueSnak;
use Wikibase\EntityRevision;
+use Wikibase\Rdf\RdfVocabulary;
use Wikibase\RedirectRevision;
use Wikibase\Repo\LinkedData\EntityDataFormatProvider;
use Wikibase\Repo\LinkedData\EntityDataSerializationService;
@@ -100,8 +101,6 @@
$rdfBuilder =
WikibaseRepo::getDefaultInstance()->getValueSnakRdfBuilderFactory();
$service = new EntityDataSerializationService(
- self::URI_BASE,
- self::URI_DATA,
$this->getMockRepository(),
$titleLookup,
$dataTypeLookup,
@@ -109,7 +108,8 @@
new SiteList(),
new EntityDataFormatProvider(),
$serializerFactory,
- new HashSiteStore()
+ new HashSiteStore(),
+ new RdfVocabulary( self::URI_BASE, self::URI_DATA )
);
return $service;
diff --git a/repo/tests/phpunit/includes/WikibaseRepoTest.php
b/repo/tests/phpunit/includes/WikibaseRepoTest.php
index 130254f..416687c 100644
--- a/repo/tests/phpunit/includes/WikibaseRepoTest.php
+++ b/repo/tests/phpunit/includes/WikibaseRepoTest.php
@@ -372,6 +372,11 @@
$this->assertInstanceOf(
'Wikibase\Rdf\ValueSnakRdfBuilderFactory', $factory );
}
+ public function testGetRdfVocabulary() {
+ $factory = $this->getWikibaseRepo()->getRdfVocabulary();
+ $this->assertInstanceOf( 'Wikibase\Rdf\RdfVocabulary', $factory
);
+ }
+
public function testGetCachingCommonsMediaFileNameLookup() {
$lookup =
$this->getWikibaseRepo()->getCachingCommonsMediaFileNameLookup();
$this->assertInstanceOf(
'Wikibase\Repo\CachingCommonsMediaFileNameLookup', $lookup );
diff --git a/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
b/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
index 3174cff..1c23e21 100644
--- a/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
+++ b/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
@@ -15,6 +15,7 @@
use Wikibase\DataModel\Entity\EntityId;
use Wikibase\DataModel\SerializerFactory;
use Wikibase\DataModel\Entity\BasicEntityIdParser;
+use Wikibase\Rdf\RdfVocabulary;
use Wikibase\Repo\LinkedData\EntityDataFormatProvider;
use Wikibase\Repo\LinkedData\EntityDataRequestHandler;
use Wikibase\Repo\LinkedData\EntityDataSerializationService;
@@ -80,8 +81,6 @@
$rdfBuilder =
WikibaseRepo::getDefaultInstance()->getValueSnakRdfBuilderFactory();
$serializationService = new EntityDataSerializationService(
- self::URI_BASE,
- self::URI_DATA,
$mockRepository,
$titleLookup,
$dataTypeLookup,
@@ -89,7 +88,8 @@
new SiteList(),
$entityDataFormatProvider,
$serializerFactory,
- new HashSiteStore()
+ new HashSiteStore(),
+ new RdfVocabulary( self::URI_BASE, self::URI_DATA )
);
$formats = array( 'json', 'rdfxml', 'ntriples' );
diff --git a/repo/tests/phpunit/maintenance/dumpRdfTest.php
b/repo/tests/phpunit/maintenance/dumpRdfTest.php
index 6865260..be0cac6 100644
--- a/repo/tests/phpunit/maintenance/dumpRdfTest.php
+++ b/repo/tests/phpunit/maintenance/dumpRdfTest.php
@@ -30,6 +30,7 @@
use Wikibase\DataModel\Term\Term;
use Wikibase\DataModel\Term\TermList;
use Wikibase\DumpRdf;
+use Wikibase\Rdf\RdfVocabulary;
use Wikibase\Repo\Test\MockEntityPerPage;
use Wikibase\Repo\WikibaseRepo;
@@ -43,15 +44,6 @@
* @author Addshore
*/
class DumpRdfTest extends MediaWikiLangTestCase {
-
- protected function setUp() {
- parent::setUp();
-
- $this->setMwGlobals( array(
- 'wgCanonicalServer' => 'http://dump.rdf.test',
- 'wgArticlePath' => '/DumpRdfTest/$1',
- ) );
- }
public function testScript() {
$dumpScript = new DumpRdf();
@@ -137,7 +129,7 @@
$this->getMockPropertyDataTypeLookup(),
$rdfBuilder,
$mockRepo,
- 'fooUri'
+ new RdfVocabulary( 'fooUri/', 'acme/EntityData/' )
);
$logFileName = tempnam( sys_get_temp_dir(),
"Wikibase-DumpRdfTest" );
--
To view, visit https://gerrit.wikimedia.org/r/270007
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ice2d54ff160911b99392d807ae80b1c80df877f1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: JanZerebecki <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits