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
Add this to your LocalSettings.php configuration file: require_once( "{$IP}/extensions/SMWOntologies/SMWOntologies.php");
 * Step 1: Download source material to extensions/SMWOntologies
 * Step 2: Patch the SemanticMediaWiki and SemanticForms extensions
 * Step 3: Load pre-built Concepts, Properties and Categories to your wiki

SMW Installation scripts
/maintenance/patchSMW.php is a PHP script that patches the SemanticMediaWiki extension.

cmdline> /maintenance/patchSMW.php

/maintenance/patchSF.php is a PHP script that patches the SemanticForms extension.

cmdline> /maintenance/patchSF.php

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: give the text name for the 'Type' namespace (default: 'Datatype')
 * $lcProperty: enable lower-case pagenames in the Property namespace (default: true)
 * $lcConcept: enable lower-case pagenames in the Concept namespace (default: true)

SMW Datatype definitions

 * Datatype:I18n : manages a single language-annotated text blob. The default, or requested, language is parsed from the blob whenever necessary.
 * Datatype:IRI : manages an internationalized resource identifier as a subtype of SMW's Datatype:URI.

SMW Parser functions
#smw:easyrdf is an implementation of the EasyRdf library for reading W3C Turtle notations from which SMW triples are created.
 * Various enhancements and restrictions have been implemented, however. See below.

#smw:easyrdf creates a topic map structure of subobjects, each a self-contained "node graph" referenced by a page's "has:this" property.
 * The subobject to which this property references is named "#Topic map: mapname".

SMW Maintenance Scripts
/maintenance/smw-easyrdf.php is a PHP script that creates multiple pages in a wiki from a Turtle-formatted stream.

cmdline> /maintenance/smw-easyrdf.php --conf filename <filename.ttl