MediaWiki
1.30.2
|
Helper class to produce RDF representation of categories. More...
Public Member Functions | |
__construct (RdfWriter $writer) | |
setupPrefixes () | |
Setup prefixes relevant for the dump. More... | |
writeCategoryData ( $categoryName) | |
Write out the data for single category. More... | |
writeCategoryLinkData ( $fromName, $toName) | |
Write RDF data for link between categories. More... | |
Public Attributes | |
const | FORMAT_VERSION = "1.0" |
Current version of the dump format. More... | |
const | ONTOLOGY_PREFIX = 'mediawiki' |
Prefix used for Mediawiki ontology in the dump. More... | |
const | ONTOLOGY_URL = 'https://www.mediawiki.org/ontology#' |
Base URL for Mediawiki ontology. More... | |
const | OWL_URL = 'https://www.mediawiki.org/ontology/ontology.owl' |
OWL description of the ontology. More... | |
Private Member Functions | |
titleToUrl (Title $title) | |
Convert Title to link to target page. More... | |
Private Attributes | |
RdfWriter | $rdfWriter |
Helper class to produce RDF representation of categories.
Definition at line 24 of file CategoriesRdf.php.
CategoriesRdf::__construct | ( | RdfWriter | $writer | ) |
Definition at line 46 of file CategoriesRdf.php.
CategoriesRdf::setupPrefixes | ( | ) |
Setup prefixes relevant for the dump.
Definition at line 53 of file CategoriesRdf.php.
|
private |
Convert Title to link to target page.
Title | $title |
Definition at line 92 of file CategoriesRdf.php.
References $title, and PROTO_CANONICAL.
Referenced by writeCategoryData(), and writeCategoryLinkData().
CategoriesRdf::writeCategoryData | ( | $categoryName | ) |
Write out the data for single category.
string | $categoryName | Category name |
Definition at line 78 of file CategoriesRdf.php.
References $title, Title\makeTitle(), NS_CATEGORY, and titleToUrl().
CategoriesRdf::writeCategoryLinkData | ( | $fromName, | |
$toName | |||
) |
Write RDF data for link between categories.
string | $fromName | Child category name |
string | $toName | Parent category name |
Definition at line 66 of file CategoriesRdf.php.
References Title\makeTitle(), NS_CATEGORY, and titleToUrl().
|
private |
Definition at line 44 of file CategoriesRdf.php.
const CategoriesRdf::FORMAT_VERSION = "1.0" |
Current version of the dump format.
Definition at line 40 of file CategoriesRdf.php.
Referenced by DumpCategoriesAsRdf\addDumpHeader().
const CategoriesRdf::ONTOLOGY_PREFIX = 'mediawiki' |
Prefix used for Mediawiki ontology in the dump.
Definition at line 28 of file CategoriesRdf.php.
const CategoriesRdf::ONTOLOGY_URL = 'https://www.mediawiki.org/ontology#' |
Base URL for Mediawiki ontology.
Definition at line 32 of file CategoriesRdf.php.
const CategoriesRdf::OWL_URL = 'https://www.mediawiki.org/ontology/ontology.owl' |
OWL description of the ontology.
Definition at line 36 of file CategoriesRdf.php.
Referenced by DumpCategoriesAsRdf\addDumpHeader().