Index: trunk/extensions/RdfRedland/test/includes/Namespace.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | * @subpackage Extensions |
26 | 26 | */ |
27 | 27 | |
28 | | -class Namespace { |
| 28 | +class MWNamespace { |
29 | 29 | |
30 | 30 | public static function isTalk( $namespace ) { |
31 | 31 | switch ( $namespace ) { |
Index: trunk/extensions/RdfRedland/test/MwRdfTest_Vocabulary.php |
— | — | @@ -30,33 +30,33 @@ |
31 | 31 | |
32 | 32 | public function testNamespaceInheritance() { |
33 | 33 | $ns = 'http://example.com/test/'; |
34 | | - $this->assertEquals( $ns, TestVocabularyClass::NAMESPACE ); |
| 34 | + $this->assertEquals( $ns, TestVocabularyClass::RDF_NAMESPACE ); |
35 | 35 | $this->assertEquals( $ns, TestVocabularyClass::getNS() ); |
36 | 36 | |
37 | 37 | $ns = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; |
38 | | - $this->assertEquals( $ns, MwRdf_Vocabulary_Rdf::NAMESPACE ); |
| 38 | + $this->assertEquals( $ns, MwRdf_Vocabulary_Rdf::RDF_NAMESPACE ); |
39 | 39 | $this->assertEquals( $ns, MwRdf_Vocabulary_Rdf::getNS() ); |
40 | 40 | |
41 | 41 | $ns = "http://www.w3.org/2000/01/rdf-schema#"; |
42 | | - $this->assertEquals( $ns, MwRdf_Vocabulary_RdfSchema::NAMESPACE ); |
| 42 | + $this->assertEquals( $ns, MwRdf_Vocabulary_RdfSchema::RDF_NAMESPACE ); |
43 | 43 | $this->assertEquals( $ns, MwRdf_Vocabulary_RdfSchema::getNS() ); |
44 | 44 | |
45 | 45 | $ns = 'http://web.resource.org/cc/'; |
46 | | - $this->assertEquals( $ns, MwRdf_Vocabulary_CreativeCommons::NAMESPACE ); |
| 46 | + $this->assertEquals( $ns, MwRdf_Vocabulary_CreativeCommons::RDF_NAMESPACE ); |
47 | 47 | $this->assertEquals( $ns, MwRdf_Vocabulary_CreativeCommons::getNS() ); |
48 | 48 | |
49 | 49 | $ns = "http://purl.org/dc/elements/1.1/"; |
50 | | - $this->assertEquals( $ns, MwRdf_Vocabulary_DCMES::NAMESPACE ); |
| 50 | + $this->assertEquals( $ns, MwRdf_Vocabulary_DCMES::RDF_NAMESPACE ); |
51 | 51 | $this->assertEquals( $ns, MwRdf_Vocabulary_DCMES::getNS() ); |
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
55 | 55 | class TestVocabularyClass extends MwRdf_Vocabulary { |
56 | 56 | |
57 | | - const NAMESPACE = 'http://example.com/test/'; |
| 57 | + const RDF_NAMESPACE = 'http://example.com/test/'; |
58 | 58 | |
59 | 59 | public function getNS() { |
60 | | - return self::NAMESPACE; |
| 60 | + return self::RDF_NAMESPACE; |
61 | 61 | } |
62 | 62 | |
63 | 63 | public $Right; |
Index: trunk/extensions/RdfRedland/Vocabularies/DCmes.php |
— | — | @@ -27,10 +27,10 @@ |
28 | 28 | class MwRdf_Vocabulary_DCMES extends MwRdf_Vocabulary { |
29 | 29 | |
30 | 30 | // base uri |
31 | | - const NAMESPACE = "http://purl.org/dc/elements/1.1/"; // FIXME |
| 31 | + const RDF_NAMESPACE = "http://purl.org/dc/elements/1.1/"; // FIXME |
32 | 32 | |
33 | 33 | public function getNS() { |
34 | | - return self::NAMESPACE; |
| 34 | + return self::RDF_NAMESPACE; |
35 | 35 | } |
36 | 36 | |
37 | 37 | // Terms |
Index: trunk/extensions/RdfRedland/Vocabularies/Rdf.php |
— | — | @@ -26,8 +26,8 @@ |
27 | 27 | class MwRdf_Vocabulary_Rdf extends MwRdf_Vocabulary { |
28 | 28 | |
29 | 29 | //base uri |
30 | | - const NAMESPACE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; |
31 | | - public function getNS() { return self::NAMESPACE; } |
| 30 | + const RDF_NAMESPACE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; |
| 31 | + public function getNS() { return self::RDF_NAMESPACE; } |
32 | 32 | |
33 | 33 | // Terms |
34 | 34 | public $Alt; |
Index: trunk/extensions/RdfRedland/Vocabularies/RdfSchema.php |
— | — | @@ -27,8 +27,8 @@ |
28 | 28 | class MwRdf_Vocabulary_RdfSchema extends MwRdf_Vocabulary { |
29 | 29 | |
30 | 30 | //base uri |
31 | | - const NAMESPACE = "http://www.w3.org/2000/01/rdf-schema#"; |
32 | | - public function getNS() { return self::NAMESPACE; } |
| 31 | + const RDF_NAMESPACE = "http://www.w3.org/2000/01/rdf-schema#"; |
| 32 | + public function getNS() { return self::RDF_NAMESPACE; } |
33 | 33 | |
34 | 34 | // Terms |
35 | 35 | public $Resource; |
Index: trunk/extensions/RdfRedland/Vocabularies/CreativeCommons.php |
— | — | @@ -34,10 +34,10 @@ |
35 | 35 | class MwRdf_Vocabulary_CreativeCommons extends MwRdf_Vocabulary { |
36 | 36 | |
37 | 37 | // base uri |
38 | | - const NAMESPACE = "http://web.resource.org/cc/"; |
| 38 | + const RDF_NAMESPACE = "http://web.resource.org/cc/"; |
39 | 39 | |
40 | 40 | public function getNS() { |
41 | | - return self::NAMESPACE; |
| 41 | + return self::RDF_NAMESPACE; |
42 | 42 | } |
43 | 43 | |
44 | 44 | // Terms |
Index: trunk/extensions/RdfRedland/Vocabularies/DCMiType.php |
— | — | @@ -26,10 +26,10 @@ |
27 | 27 | |
28 | 28 | class MwRdf_Vocabulary_DCMiType extends MwRdf_Vocabulary { |
29 | 29 | |
30 | | - const NAMESPACE = "http://purl.org/dc/dcmitype/"; |
| 30 | + const RDF_NAMESPACE = "http://purl.org/dc/dcmitype/"; |
31 | 31 | |
32 | 32 | public function getNS() { |
33 | | - return self::NAMESPACE; |
| 33 | + return self::RDF_NAMESPACE; |
34 | 34 | } |
35 | 35 | |
36 | 36 | public $Collection; |
Index: trunk/extensions/RdfRedland/Vocabularies/DCTerms.php |
— | — | @@ -26,8 +26,8 @@ |
27 | 27 | |
28 | 28 | class MwRdf_Vocabulary_DCTerms extends MwRdf_Vocabulary { |
29 | 29 | |
30 | | - const NAMESPACE = "http://purl.org/dc/terms/"; |
31 | | - public function getNS() { return self::NAMESPACE; } |
| 30 | + const RDF_NAMESPACE = "http://purl.org/dc/terms/"; |
| 31 | + public function getNS() { return self::RDF_NAMESPACE; } |
32 | 32 | |
33 | 33 | public $abstract; |
34 | 34 | public $accessRights; |
Index: trunk/extensions/RdfRedland/Vocabulary.php |
— | — | @@ -27,16 +27,16 @@ |
28 | 28 | /* |
29 | 29 | * A (mostly) abstract class which provides a little syntactic sugar |
30 | 30 | * for defining vocabularies. To define a vocabulary using this |
31 | | - * interface simply declare a base URI as the constant NAMESPACE, then |
| 31 | + * interface simply declare a base URI as the constant RDF_NAMESPACE, then |
32 | 32 | * add terms for each of the vocabulary's terms. Just make sure that |
33 | 33 | * the term name exactly matches the term text. |
34 | 34 | */ |
35 | 35 | abstract class MwRdf_Vocabulary { |
36 | 36 | |
37 | | - const NAMESPACE = ''; |
| 37 | + const RDF_NAMESPACE = ''; |
38 | 38 | |
39 | 39 | public function getNS() { |
40 | | - self::NAMESPACE; |
| 40 | + self::RDF_NAMESPACE; |
41 | 41 | } |
42 | 42 | |
43 | 43 | public function __construct() { |