Last modified: 2009-12-23 17:41:50 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T23108, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21108 - introduce sub-category-of property for subclassing
introduce sub-category-of property for subclassing
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks: 20039
  Show dependency treegraph
 
Reported: 2009-10-12 09:00 UTC by Philipp
Modified: 2009-12-23 17:41 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Philipp 2009-10-12 09:00:25 UTC
In SMW the annotation for assigning a category to a super-category is the same as for assigning an instance to a category.

E.g. on the page Category:User you write [[Category:Person]] for making 'User' a sub-category of 'Person'. Likewise, if you have a page 'Denny' you write [[Category:Person]] in order to assert 'Denny' to the category 'Person'.

This annotation style has however the sideeffect, that when you query
{{#ask: [[Category:Person]] }} you get instances (e.g. 'Denny') as well as sub-categories (e.g. 'User') of the category 'Person'.

I would therefore recommend to implement and use a distinct annotation for sub-categories, e.g. [[subcategory of::Category:Person]]. This would be consistent with the annotation for sub-properties (e.g. [[subproperty of::SomeProperty]]) as well as with the OWL/RDF annotation owl:subClassOf.

However, one have to think about downward compatibility with existing annotations...
Comment 1 Markus Krötzsch 2009-12-23 17:41:50 UTC
A "subcategory of" property has now been introduced, and configuration options have been added to decide whether or not category statements should lead to subcategory or instance of relationships (or to both or to neither), see Bug 20039. To completely separate subcategory and instance of relations, one would thus need to set both $smwgCategoriesAsInstances = false and $smwgUseCategoryHierarchy = false.

In inline queries, [[Category:Foo]] statements always refer to instance of relationships, and only the setting $smwgCategoriesAsInstances determines which results will be included in this case. Querying for the new property subcategory_of also works now, but existing installations must run setup (update) again and refresh all data (e.g. via the Special:SMWAdmin page) since the DB layout has changed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links