Skip to content

Commit 39f7967

Browse files
committed
Switch back from extremely silly rog abbreviation to rdfiog
1 parent 3c700b0 commit 39f7967

5 files changed

Lines changed: 30 additions & 30 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ These are some configuration options that you might want to adjust to your speci
9999
# "http://example.org/someOntology#" => "ont1",
100100
# "http://example.org/anotherOntology#" => "ont2"
101101
# );
102-
# $rogBaseURIs = array();
102+
# $rdfiogBaseURIs = array();
103103
# ---------------------------------------------------------------
104104
# Query by /Output Equivalent URIs SPARQL Endpoint
105105
# (overrides settings in HTML Form)
106106
#
107-
# $rogQueryByEquivURI = false;
108-
# $rogOutputEquivURIs = false;
107+
# $rdfiogQueryByEquivURI = false;
108+
# $rdfiogOutputEquivURIs = false;
109109
#
110-
# $rogTitleProperties = array(
110+
# $rdfiogTitleProperties = array(
111111
# 'http://semantic-mediawiki.org/swivt/1.0#page',
112112
# 'http://www.w3.org/2000/01/rdf-schema#label',
113113
# 'http://purl.org/dc/elements/1.1/title',
@@ -118,7 +118,7 @@ These are some configuration options that you might want to adjust to your speci
118118
# ---------------------------------------------------------------
119119
# Allow edit operations via SPARQL from remote services
120120
#
121-
# $rogAllowRemoteEdit = false;
121+
# $rdfiogAllowRemoteEdit = false;
122122
# ---------------------------------------------------------------
123123
```
124124

classes/parsers/RDFIO_URIToWikiTitleConverter.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function getExistingTitleForURI( $uri ) {
7272
* Strategy 2: Use configured properties to get the title
7373
*/
7474
function applyGlobalSettingForPropertiesToUseAsWikiTitle( $uri ) {
75-
global $rogTitleProperties;
75+
global $rdfiogTitleProperties;
7676

7777
$title = '';
7878

@@ -85,7 +85,7 @@ function applyGlobalSettingForPropertiesToUseAsWikiTitle( $uri ) {
8585
foreach ( $index as $subject => $properties ) {
8686
if ( $subject === $uri ) {
8787
foreach ( $properties as $prop => $obj ) {
88-
if ( in_array( $prop, $rogTitleProperties ) ) {
88+
if ( in_array( $prop, $rdfiogTitleProperties ) ) {
8989
$title = $obj[0];
9090
}
9191
}
@@ -118,14 +118,14 @@ function parseBNode( $uri ) {
118118
* imported data)
119119
*/
120120
function shortenURINamespaceToAliasInSourceRDF( $uri ) {
121-
global $rogBaseURIs;
121+
global $rdfiogBaseURIs;
122122

123123
$nsPrefixes = $this->arc2NSPrefixes;
124124
$title = '';
125125

126126
// The same, but according to mappings from LocalSettings.php
127-
if ( is_array( $rogBaseURIs ) ) {
128-
$nsPrefixes = array_merge( $nsPrefixes, $rogBaseURIs );
127+
if ( is_array( $rdfiogBaseURIs ) ) {
128+
$nsPrefixes = array_merge( $nsPrefixes, $rdfiogBaseURIs );
129129
}
130130

131131
// Collect all the inputs for abbreviation, and apply:
@@ -161,20 +161,20 @@ function useValueAsIs( $uri ) {
161161
/////// HELPER METHODS ///////
162162

163163
/**
164-
* Just tell if $rogTitleProperties is set or not.
164+
* Just tell if $rdfiogTitleProperties is set or not.
165165
*/
166166
function globalSettingForPropertiesToUseAsWikiTitleExists() {
167-
global $rogTitleProperties;
168-
return isset( $rogTitleProperties );
167+
global $rdfiogTitleProperties;
168+
return isset( $rdfiogTitleProperties );
169169
}
170170

171171
/**
172172
* Default settings for which RDF properties to use for getting
173173
* possible candidates for wiki page title names.
174174
*/
175175
function setglobalSettingForPropertiesToUseAsWikiTitleToDefault() {
176-
global $rogTitleProperties;
177-
$rogTitleProperties = array(
176+
global $rdfiogTitleProperties;
177+
$rdfiogTitleProperties = array(
178178
'http://semantic-mediawiki.org/swivt/1.0#page', // Suggestion for new property
179179
'http://www.w3.org/2000/01/rdf-schema#label',
180180
'http://purl.org/dc/terms/title',
@@ -239,7 +239,7 @@ function abbreviateParserNSPrefixes( $uri, $nsPrefixes ) {
239239
* @return array
240240
*/
241241
public function splitURI( $uri ) {
242-
global $rogBaseURIs;
242+
global $rdfiogBaseURIs;
243243
/* ADAPTED FROM ARC2 WITH SOME MODIFICATIONS
244244
* the following namespaces may lead to conflated URIs,
245245
* we have to set the split position manually
@@ -250,8 +250,8 @@ public function splitURI( $uri ) {
250250
'http://www.w3.org/2005/Atom',
251251
'http://www.w3.org/1999/xhtml',
252252
);
253-
if ( $rogBaseURIs != '' ) {
254-
$specials = array_merge( $specials, $rogBaseURIs );
253+
if ( $rdfiogBaseURIs != '' ) {
254+
$specials = array_merge( $specials, $rdfiogBaseURIs );
255255
}
256256
foreach ( $specials as $ns ) {
257257
if ( strpos( $uri, $ns ) === 0 ) {

specials/SpecialRDFIOAdmin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function execute( $par ) {
3030

3131
$this->setHeaders();
3232

33-
$rdfioAction = $wRequest->getText( 'rdfio-action', '' );
33+
$rdfiogAction = $wRequest->getText( 'rdfio-action', '' );
3434

3535
$wOut->addHTML('<h3>' . wfMessage( 'rdfio-triplestore-setup' )->parse() . '</h3>' );
3636

@@ -45,7 +45,7 @@ function execute( $par ) {
4545
if ( $store->isSetUp() ) {
4646
$this->infoMsg( wfMessage( 'rdfio-triplestore-is-already-setup' )->parse() );
4747
} else {
48-
if ( $rdfioAction === 'setup' ) {
48+
if ( $rdfiogAction === 'setup' ) {
4949
$this->setUpStore( $store, $wUser, $wRequest );
5050
} else {
5151
$this->infoMsg( 'Store is <b>not</b> set up' );

specials/SpecialSPARQLEndpoint.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ public function execute( $par ) {
2525
throw new PermissionsError( 'rdfio-sparql', array( 'rdfio-specialpage-access-permission-missing' ) );
2626
}
2727

28-
global $rogQueryByEquivURIs, $rogOutputEquivUris;
28+
global $rdfiogQueryByEquivURIs, $rdfiogOutputEquivUris;
2929
$wUser = $this->getUser();
3030
$wRequest = $this->getRequest();
3131

3232
$this->setHeaders();
33-
$options = $this->buildOptionsObj( $this->getRequest(), $rogQueryByEquivURIs, $rogOutputEquivUris );
33+
$options = $this->buildOptionsObj( $this->getRequest(), $rdfiogQueryByEquivURIs, $rdfiogOutputEquivUris );
3434

3535
if ( $options->query == '' ) {
3636
$this->printHTMLForm( $options );

tests/phpunit/classes/parsers/RDFIO_URIToWikiTitleConverterTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testConvertWithABunchOfExampleURLs() {
4646
* @covers RDFIOURIToTitleConverter::applyGlobalSettingForPropertiesToUseAsWikiTitle
4747
*/
4848
public function testApplyGlobalSettingForPropertiesToUseAsWikiTitleWorksWithCorrectSettings() {
49-
$GLOBALS['rogTitleProperties'] = array(
49+
$GLOBALS['rdfiogTitleProperties'] = array(
5050
'http://semantic-mediawiki.org/swivt/1.0#page',
5151
'http://www.w3.org/2000/01/rdf-schema#label',
5252
'http://purl.org/dc/elements/1.1/title',
@@ -61,7 +61,7 @@ public function testApplyGlobalSettingForPropertiesToUseAsWikiTitleWorksWithCorr
6161
}
6262

6363
public function testApplyGlobalSettingForPropertiesToUseAsWikiTitleDoesNotWorkWithWrongSetting() {
64-
$GLOBALS['rogTitleProperties'] = array(
64+
$GLOBALS['rdfiogTitleProperties'] = array(
6565
'http://semantic-mediawiki.org/swivt/1.0#page',
6666
'http://purl.org/dc/elements/1.1/title',
6767
'http://www.w3.org/2004/02/skos/core#preferredLabel',
@@ -79,7 +79,7 @@ public function testApplyGlobalSettingForPropertiesToUseAsWikiTitleDoesNotWorkWi
7979
* @covers RDFIOURIToTitleConverter::abbreviateParserNSPrefixes
8080
*/
8181
public function testShortenURINamespaceToAliasInSourceRDF() {
82-
global $rogBaseURIs;
82+
global $rdfiogBaseURIs;
8383

8484
$title = $this->uriToWikiTitleConverter->shortenURINamespaceToAliasInSourceRDF( 'http://www.countries.fake.org/onto/Canada' );
8585
$this->assertEquals( 'countries:Canada', $title );
@@ -114,26 +114,26 @@ public function testExtractLocalPartFromURIWorks() {
114114
* @covers RDFIOURIToTitleConverter::globalSettingForPropertiesToUseAsWikiTitleExists
115115
*/
116116
public function testGlobalSettingForPropertiesToUseAsWikiTitleExistsReturnsTrueOnExists() {
117-
global $rogTitleProperties;
117+
global $rdfiogTitleProperties;
118118
$uriToWikiTitleConverter = new RDFIOURIToTitleConverter( array(), array(), array() );
119-
$rogTitleProperties = array();
119+
$rdfiogTitleProperties = array();
120120
$this->assertTrue( $uriToWikiTitleConverter->globalSettingForPropertiesToUseAsWikiTitleExists() );
121121

122122
// A normal unset only destroys the local variable binding, so we have to do like
123123
// this inseta
124-
$GLOBALS['rogTitleProperties'] = null;
124+
$GLOBALS['rdfiogTitleProperties'] = null;
125125
$this->assertFalse( $uriToWikiTitleConverter->globalSettingForPropertiesToUseAsWikiTitleExists() );
126126
}
127127

128128
/**
129129
* @covers RDFIOURIToTitleConverter::globalSettingForPropertiesToUseAsWikiTitleExists
130130
*/
131131
public function testGlobalSettingForPropertiesToUseAsWikiTitleExistsReturnsFalseOnDOesntExist() {
132-
global $rogTitleProperties;
132+
global $rdfiogTitleProperties;
133133
$uriToWikiTitleConverter = new RDFIOURIToTitleConverter( array(), array(), array() );
134134
// A normal unset only destroys the local variable binding, so we have to do like
135135
// this inseta
136-
$GLOBALS['rogTitleProperties'] = null;
136+
$GLOBALS['rdfiogTitleProperties'] = null;
137137
$this->assertFalse( $uriToWikiTitleConverter->globalSettingForPropertiesToUseAsWikiTitleExists() );
138138
}
139139

0 commit comments

Comments
 (0)