Extension:SMW Ontologies

SMW Ontologies includes


 * (a-1) an "SMW Ontology" with concept/property definitions central to MediaWiki & SemanticMediaWiki
 * (a-2) definitions of commonly known ontologies from the ISO; W3C; United Nations; and others
 * (a-3) definitions of a comprehensive 'grammatical' ontology quite intuitive for general semantic relations markup


 * (b-1) syntax options for multilingual annotations and multilingual queries, involving new defined datatypes (I18N and IRI)
 * (b-2) syntax options for "query variables" and for "filtered inverse relations"


 * (c-1) Visual Editor input widgets and parser functions that convert Turtle-style expressions to semantic triples
 * (c-2) Visual Editor output templates and parser functions which display property values either retrieved or derived by calculation

Installation

 * Step 1: Download source material to extensions/SMWOntologies
 * Add this to your LocalSettings.php configuration file:

require_once( "{$IP}/extensions/SMWOntologies/SMWOntologies.php");
 * Step 2: Patch the SemanticMediaWiki and SemanticForms extensions.
 * Step 3: Load pre-built Concept, Property, Category and MediaWiki pages to your wiki.

Configuration
Add this to your LocalSettings.php configuration file: require_once( "{$IP}/extensions/SMWOntologies/SMWOntologies.php"); enableSMWOntologies( $nsType='Datatype', $lcProperty=true, $lcConcept=true ); where
 * $nsType: gives the canonical text name for the 'Type' namespace (default: 'Datatype')
 * $lcProperty: enables lower-case pagenames in the Property namespace (default: true)
 * $lcConcept: enables lower-case pagenames in the Concept namespace (default: true)

SMW Datatype definitions

 * Datatype:I18N (talk) : manages a single language-annotated text blob. The default, or the requested, language is parsed from the blob whenever necessary.


 * Datatype:IRI (talk) : manages an internationalized resource identifier similar to SMW's Datatype:URI.

SMW Parser functions

 * #smw:easyrdf (talk) : an implementation of the EasyRdf library for reading W3C Turtle notations from which SMW triples are created. This parser function creates a topic map structure of subobjects, each a self-contained "node graph" referenced by a page's "has:this" property.


 * #ask (talk) : handles new parameters for (a) localization specifications; (b) filtered inverse relations; (c) query variables.


 * #set (talk) : handles new parameters for (a) localization specifications.


 * #show (talk) : handles new parameters for (a) localization specifications.

SMW Ontology pages
The following ontologies can be loaded into a wiki; loaded ontologies are listed on the wiki's Special:version page.

SMW Maintenance scripts

 * /initPages.php (talk) : a PHP script that loads pages into the Category, Concept, Property & MediaWiki namespaces.


 * /easyrdf.php (talk) : a PHP script that creates multiple pages in a wiki from a Turtle-formatted stream.


 * /patchSMW.php (talk) : a PHP script that patches the SemanticMediaWiki extension.


 * /patchSF.php (talk) : a PHP script that patches the SemanticForms extension.