19 use Wikimedia\Purtle\RdfWriter;
36 const OWL_URL =
'https://www.mediawiki.org/ontology/ontology.owl';
53 $this->rdfWriter = $writer;
60 $this->rdfWriter->prefix( self::ONTOLOGY_PREFIX, self::ONTOLOGY_URL );
61 $this->rdfWriter->prefix(
'rdfs',
'http://www.w3.org/2000/01/rdf-schema#' );
62 $this->rdfWriter->prefix(
'owl',
'http://www.w3.org/2002/07/owl#' );
63 $this->rdfWriter->prefix(
'schema',
'http://schema.org/' );
64 $this->rdfWriter->prefix(
'cc',
'http://creativecommons.org/ns#' );
75 $this->rdfWriter->about( $this->
titleToUrl( $titleFrom ) )
76 ->say( self::ONTOLOGY_PREFIX,
'isInCategory' )
95 ->is( self::ONTOLOGY_PREFIX,
'Category' );
97 $this->rdfWriter->is( self::ONTOLOGY_PREFIX,
'HiddenCategory' );
99 $titletext =
$title->getText();
100 $this->rdfWriter->say(
'rdfs',
'label' )->value( $titletext );
101 $this->rdfWriter->say( self::ONTOLOGY_PREFIX,
'pages' )->value( $pages );
102 $this->rdfWriter->say( self::ONTOLOGY_PREFIX,
'subcategories' )->value( $subcategories );