MediaWiki
master
|
Helper class to produce RDF representation of categories. More...
Public Member Functions | |
__construct (RdfWriter $writer) | |
getDumpURI () | |
Get URI of the dump for this particular wiki. More... | |
labelToUrl ( $titleLabel) | |
Make URL from title label. More... | |
setupPrefixes () | |
Setup prefixes relevant for the dump. More... | |
writeCategoryData ( $categoryName, $isHidden, $pages, $subcategories) | |
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.1" |
Current version of the dump format. More... | |
const | OWL_URL = 'https://www.mediawiki.org/ontology/ontology.owl' |
OWL description of the ontology. More... | |
Helper class to produce RDF representation of categories.
Definition at line 28 of file CategoriesRdf.php.
MediaWiki\Category\CategoriesRdf::__construct | ( | RdfWriter | $writer | ) |
Definition at line 56 of file CategoriesRdf.php.
MediaWiki\Category\CategoriesRdf::getDumpURI | ( | ) |
Get URI of the dump for this particular wiki.
Definition at line 134 of file CategoriesRdf.php.
References MediaWiki\Title\Title\makeTitle(), and NS_MAIN.
MediaWiki\Category\CategoriesRdf::labelToUrl | ( | $titleLabel | ) |
Make URL from title label.
string | $titleLabel | Short label (without namespace) of the category |
Definition at line 117 of file CategoriesRdf.php.
References MediaWiki\Title\Title\makeTitle(), and NS_CATEGORY.
MediaWiki\Category\CategoriesRdf::setupPrefixes | ( | ) |
Setup prefixes relevant for the dump.
Definition at line 63 of file CategoriesRdf.php.
MediaWiki\Category\CategoriesRdf::writeCategoryData | ( | $categoryName, | |
$isHidden, | |||
$pages, | |||
$subcategories | |||
) |
Write out the data for single category.
string | $categoryName | |
bool | $isHidden | Hidden category? |
int | $pages | Page count (note this includes only Wiki articles, not subcats or files) |
int | $subcategories | Subcategory count |
Definition at line 91 of file CategoriesRdf.php.
References $title, MediaWiki\Title\Title\makeTitle(), and NS_CATEGORY.
MediaWiki\Category\CategoriesRdf::writeCategoryLinkData | ( | $fromName, | |
$toName | |||
) |
Write RDF data for link between categories.
string | $fromName | Child category name |
string | $toName | Parent category name |
Definition at line 76 of file CategoriesRdf.php.
References MediaWiki\Title\Title\makeTitle(), and NS_CATEGORY.
const MediaWiki\Category\CategoriesRdf::FORMAT_VERSION = "1.1" |
Current version of the dump format.
Definition at line 44 of file CategoriesRdf.php.
const MediaWiki\Category\CategoriesRdf::OWL_URL = 'https://www.mediawiki.org/ontology/ontology.owl' |
OWL description of the ontology.
Definition at line 40 of file CategoriesRdf.php.