MediaWiki master
MediaWiki\Category\CategoriesRdf Class Reference

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.
 

Detailed Description

Helper class to produce RDF representation of categories.

Definition at line 28 of file CategoriesRdf.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Category\CategoriesRdf::__construct ( RdfWriter $writer)

Definition at line 56 of file CategoriesRdf.php.

Member Function Documentation

◆ getDumpURI()

MediaWiki\Category\CategoriesRdf::getDumpURI ( )

Get URI of the dump for this particular wiki.

Returns
string

Definition at line 134 of file CategoriesRdf.php.

References NS_MAIN.

◆ labelToUrl()

MediaWiki\Category\CategoriesRdf::labelToUrl ( $titleLabel)

Make URL from title label.

Parameters
string$titleLabelShort label (without namespace) of the category
Returns
string URL for the category

Definition at line 117 of file CategoriesRdf.php.

References NS_CATEGORY.

◆ setupPrefixes()

MediaWiki\Category\CategoriesRdf::setupPrefixes ( )

Setup prefixes relevant for the dump.

Definition at line 63 of file CategoriesRdf.php.

◆ writeCategoryData()

MediaWiki\Category\CategoriesRdf::writeCategoryData ( $categoryName,
$isHidden,
$pages,
$subcategories )

Write out the data for single category.

Parameters
string$categoryName
bool$isHiddenHidden category?
int$pagesPage count (note this includes only Wiki articles, not subcats or files)
int$subcategoriesSubcategory count

Definition at line 91 of file CategoriesRdf.php.

References NS_CATEGORY.

◆ writeCategoryLinkData()

MediaWiki\Category\CategoriesRdf::writeCategoryLinkData ( $fromName,
$toName )

Write RDF data for link between categories.

Parameters
string$fromNameChild category name
string$toNameParent category name

Definition at line 76 of file CategoriesRdf.php.

References NS_CATEGORY.

Member Data Documentation

◆ FORMAT_VERSION

const MediaWiki\Category\CategoriesRdf::FORMAT_VERSION = "1.1"

Current version of the dump format.

Definition at line 44 of file CategoriesRdf.php.

◆ OWL_URL

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.


The documentation for this class was generated from the following file: