From: Harold S. <hso...@ap...> - 2007-09-11 17:02:36
|
Folks, =20 The "provides service" feature, in combination with a URL gives us a lot of power when it comes to referencing external resources. This allows us to change the nature of properties as the Wiki evolves. We can, for example, begin with a free text (or enumerated) list of country codes and, as some later date, change the "inCountry" property to be a URL with code substituted in the appropriate place. Something that would be really useful would be the ability to change the type to "Page" and, using a similar substitution mechanism, say something like "[[Country_$1]]". Other use cases may include assigning a namespace as well, such as "[[:Category:Country_$1]]" or a in interwiki reference - "[[mw:Country_$1]]". While we can simulate this with the URL mechanism, we lose all the advantages of the Semantic portion, as the referenced entity isn't aware that we are pointing at it. =20 If other folks thought that this was a reasonable idea, we would be happy to roll up our sleeves and attempt to "make it so", but we don't want to spend a lot of time on a feature that won't make it into the main development thread. =20 =20 Cheers, =20 Harold Solbrig Apelon, Inc. |
From: <zeh...@mo...> - 2008-07-16 16:39:13
|
Hi, I would like to be so bold and add two feature request suggestions for future releases. These suggestions are with the old storage engine in mind as I can't really say I have a clue yet how the new engine handles especially nary properties (and therefore how to 'translate' my suggestion according to the new storage) but I hope these additions would make it possible for me to use queries to the new storage engine without having to access the db directly. 1) An optional parameter 'nary' for the function getPropertyValues() If this parameter is set with a numerical value and the PropertyObjectTypeID of the specified property is '__nry' only values from the indicated nary position would be retrieved (adding the condition 'and nary_pos = nary parameter value' to the SQL query) instead of all values of the multivalue property. 2) Support of the SQL option DISTINCT for SMWRequestOptions objects One of the SQL options supported in MW's Database.php is DISTINCT, however, the SMWRequestOptions object in SMW doesn't have a variable for it. So if the object would get an additional 'distinct' variable besides 'limit' and 'offset', one could in function getSQLOptions($requestoptions, $valuecol = NULL) simply set the SQL option and the db select function could use it if ($requestoptions->distinct > 0) { $sql_options['DISTINCT'] = 1; } Thanks very much, Gu |
From: S P. <in...@sk...> - 2007-09-16 10:00:41
|
Harold Solbrig wrote: > The “provides service” feature, in combination with a URL gives us a lot > of power when it comes to referencing external resources. This allows > us to change the nature of properties as the Wiki evolves. We can, for > example, begin with a free text (or enumerated) list of country codes > and, as some later date, change the “inCountry” property to be a URL > with code substituted in the appropriate place. Something that would be > really useful would be the ability to change the type to “Page” and, > using a similar substitution mechanism, say something like > “[[Country_$1]]”. Other use cases may include assigning a namespace as > well, such as “[[:Category:Country_$1]]” or a in interwiki reference – > “[[mw:Country_$1]]”. While we can simulate this with the URL > mechanism, we lose all the advantages of the Semantic portion, as the > referenced entity isn’t aware that we are pointing at it. I'm not quite sure what you're looking for. You want to change inCountry from Type:String to be (in SMW 1.0pre-alpha3) Type:Page, i.e. turn it into a relation, but you want to use “provides service” to turn the link into [[Country_$1]]? I'm not familiar with the provides service code, but I suspect it runs in the factbox after the semantic markup has been parsed, so that it can't easily inject new semantic properties into the page. The way people typically make link rewriting permanently is to run a batch script on the Wiki. The way people typically make link rewriting continuously is to use a template. For example, you write the developers come from {{inCountry|Germany}} and the template produces the developers come from [[inCountry::Country_Germany|Germany]] [[Category:Country_Germany]] If you later change what Template:inCountry does, you can just purge the wiki pages, using a maintenance script. But I think I'm missing something, again. A demo page is worth 500 words. Can you make a Category:Testpage on ontoworld.org that shows how you're using service links with URLs and what you want to achieve with page links? > If other folks thought that this was a reasonable idea, we would be > happy to roll up our sleeves and attempt to “make it so”, but we don’t > want to spend a lot of time on a feature that won’t make it into the > main development thread. File an enhancement bug, supply code that addresses the bug, and maybe someone with SVN rights will pick it up and check it in. Even if not, you can keep a local copy with your changes and regularly update it to latest SVN and if there are no conflicts it's not too hard to maintain. Regards, -- =S Page |