|
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. | |
| labelToUrl ( $titleLabel) | |
| Make URL from title label. | |
| setupPrefixes () | |
| Setup prefixes relevant for the dump. | |
| writeCategoryData ( $categoryName, $isHidden, $pages, $subcategories) | |
| Write out the data for single category. | |
| writeCategoryLinkData ( $fromName, $toName) | |
| Write RDF data for link between categories. | |
Public Attributes | |
| const | FORMAT_VERSION = "1.1" |
| Current version of the dump format. | |
| const | OWL_URL = 'https://www.mediawiki.org/ontology/ontology.owl' |
| OWL description of the ontology. | |
Helper class to produce RDF representation of categories.
Definition at line 14 of file CategoriesRdf.php.
| MediaWiki\Category\CategoriesRdf::__construct | ( | RdfWriter | $writer | ) |
Definition at line 42 of file CategoriesRdf.php.
| MediaWiki\Category\CategoriesRdf::getDumpURI | ( | ) |
Get URI of the dump for this particular wiki.
Definition at line 120 of file CategoriesRdf.php.
References MediaWiki\Deferred\LinksUpdate\CategoryLinksTable\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 103 of file CategoriesRdf.php.
References MediaWiki\Deferred\LinksUpdate\CategoryLinksTable\makeTitle(), and NS_CATEGORY.
| MediaWiki\Category\CategoriesRdf::setupPrefixes | ( | ) |
Setup prefixes relevant for the dump.
Definition at line 49 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 77 of file CategoriesRdf.php.
References MediaWiki\Deferred\LinksUpdate\CategoryLinksTable\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 62 of file CategoriesRdf.php.
References MediaWiki\Deferred\LinksUpdate\CategoryLinksTable\makeTitle(), and NS_CATEGORY.
| const MediaWiki\Category\CategoriesRdf::FORMAT_VERSION = "1.1" |
Current version of the dump format.
Definition at line 30 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 26 of file CategoriesRdf.php.