Friedel Völker (Stadtwiki) wrote:
> is it possible to rename properties in use?
> I want to change "Ist ein" and "Ist eine" into "Ist" (is a, is an => is)
* Renaming a property doesn't change anything, since SMW annotations
come from subject articles.
* So eventually you'll need to edit all the articles with the annotation.
* A #REDIRECT to the new property name won't do much.
* The special property Subproperty_of might help during the transition.
* For "is a" relationships, consider MediaWiki Categories instead (note
much e-mail discussion of this topic ;-) )
The source document for every semantic annotation in SMW is the article
for its subject. *Nothing else* updates a semantic annotation.
When you make a normal semantic annotation, SMW updates either
smw_relation (for properties of Type:Page) or smw_attributes (for
properties with other values). These tables currently store the title
of the property, not an ID for the property.
So if as Wiki administrator you rename a property page, nothing changes
in those tables. If you update or refresh an article containing [[ist
ein::Landkreis]], the SMW tables will have the same annotation
afterwards until you change the page's wiki text.
So at some point, you MUST edit all the subject pages and change, e.g.
I'd do this rename by making an inline query for pages with the
property, paste the list of names into Special:Export to get an XML
file, use a text editor to make the change, then use Special:Import.
There probably are MediaWiki scripts and tools that assist in link renaming.
During the transition you might think that you can make the old property
page a #REDIRECT to the new property name. I believe that won't work.
Depending on your setting of $smwgQEqualitySupport, SMW will find
article pages that are redirects, but in queries SMW doesn't check for
*properties* that are redirects.
Until you perform this big rename, you should make ist_ein a subproperty
of ist ( [[Unterattribut von::ist]] ). When you query for "ist" SMW
will also query for "ist ein". There are some limitations, see
By the way, consider using MediaWiki categories for "is a"
relationships. There have been *many* discussions of the pros and cons
of this on the mailing list, including the recent thread "Classes vs.
Categories". You gain some display features (categories display
subcategories) and transitive semantic searches (queries return members
of subcategories). Depending on how you feel about ontological
confusion this may commit you to a particular interpretation of
categories in your wiki.