[Please keep discussions on the devel list for future reference.]
[Summary for the list: this discussion covers recent changes in ]
[the subobject management of SMW 1.6, which also affect SIO.    ]

On 08/07/11 03:41, Yaron Koren wrote:
> Hi,
>
> I think I just fixed this in the SVN version of SIO. I don't know if
> it's the ideal fix, though - for that, I would have to know what the new
> "subobject" field is, and whether SIO needs to worry about it.

I was not aware that any external code depends on the id management that 
is internal to SMWSQLStore2! These methods should not even be public (at 
least not the make...ID methods; getting and caching are needed in other 
classes).

However, SMW 1.6 now has a better method for managing subobjects. The 
SMWDIWikiPage class now stores a subobjectName as an additional 
parameter. An empty subobjectName is used for the actual pages. A 
nonempty name indicates a subobject that is "owned" by its main page. 
Subobject names should not be longer than 32 characters. Currently 
subobjects are displayed to the user like their managing page. Later it 
might be desirable to display some subobject names to the user. To 
support this, all subobject names that are not user-readable should 
start with "_".

All data of a subobject *and* the subobject itself will be deleted when 
the page is deleted or updated. This is the same as before but it means 
that the subobject data must be re-created whenever a page is stored. 
This also means that the subobjectName is not essential and does not 
need to be the same in multiple runs of the code (but it must be 
different from other subobjects, of course).

This subobject system is understood and honoured by all stores 
(including RDF), so is superior to using internal methods of the 
SMWSQLStore2. However, currently subobjects are only meant to be used a 
"structural" objects for storing compound data. Due to the way they are 
managed, they must only be used with two types of property annotations:

(1) annotations that assign a property value to the subobjects;
(2) annotations that use the subobject as property value *that are 
assigned to the page to which the subobject belongs*.

In other words, subobjects must not be used as property values for 
annotations on pages other than their owner page.

Subobjects (i.e. DIWikiPages with non-empty subobjectName) can also be 
used like wiki pags in all storage interface methods. So one could 
easily augment the current UIs to show properties of subobjects etc. 
However, the parser of SMWPageValue will turn all user inputs into wiki 
pages with empty subobjectName. This is important to avoid that the 
above restrictions on annotations are violated (if users could write a 
page name that refers to a subobject, then they could use them as 
property values anywhere). Also, the current subobjectNames are 32 
character hash codes that are not really user-writable. But one could 
accept this subobjectName as a GET parameter when calling special pages 
like Special:Browse, and these pages would then be able to display 
information about any subobject just as they work for pages now. Maybe 
linking to such a special page could be the future way to display 
subobject to users (currently they just link to their owner page).

Markus


> On Thu, Jul 7, 2011 at 9:57 PM, Yaron Koren <yaro...@gmail.com
> <mailto:yaro...@gmail.com>> wrote:
>
>     Hi James,
>
>     Indeed, you found a problem in SIO - it doesn't yet support changes
>     made to SMW a few days ago:
>
>     
> http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php?r1=91269&r2=91449
>     
> <http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php?r1=91269&r2=91449>
>
>     Thanks for letting me know about that.
>
>     -Yaron
>
>
>     On Thu, Jul 7, 2011 at 7:46 PM, James Hong Kong
>     <jamesin.hongkon...@gmail.com <mailto:jamesin.hongkon...@gmail.com>>
>     wrote:
>
>         Hi Yaron, Stephan,
>
>         With the latest change from Markus SMW 1.6 r91542, things got
>         again a
>         bit bumpy, I have the feeling we still do alpha testing ... anyway
>         here my findings in regards to
>
>         SIO, Semantic Internal Objects (Version 0.6.4)  (r91693)
>
>         [Fri Jul 08 08:04:26 2011] [error] [client 192.168.1.101] PHP
>         Warning:
>           Missing argument 4 for SMWSQLStore2::makeSMWPageID(), called in
>         
> D:\\xampp\\htdocs\\lab\\t1170\\extensions\\SemanticInternalObjects\\SemanticInternalObjects_body.php
>         on line 155 and defined in
>         
> D:\\xampp\\htdocs\\lab\\t1170\\extensions\\SemanticMediaWiki\\includes\\storage\\SMW_SQLStore2.php
>         on line 1999, referer:
>         
> http://192.168.1.100:8080/lab/t1170/index.php?title=BEM:949d1612-5ffb-4483-b916-5b59cfa5cd95&action=formedit
>         
> <http://192.168.1.100:8080/lab/t1170/index.php?title=BEM:949d1612-5ffb-4483-b916-5b59cfa5cd95&action=formedit>
>         [Fri Jul 08 08:04:26 2011] [error] [client 192.168.1.101] PHP
>         Notice:
>         Undefined variable: subobjectName in
>         
> D:\\xampp\\htdocs\\lab\\t1170\\extensions\\SemanticMediaWiki\\includes\\storage\\SMW_SQLStore2.php
>         on line 2006, referer:
>         
> http://192.168.1.100:8080/lab/t1170/index.php?title=BEM:949d1612-5ffb-4483-b916-5b59cfa5cd95&action=formedit
>         
> <http://192.168.1.100:8080/lab/t1170/index.php?title=BEM:949d1612-5ffb-4483-b916-5b59cfa5cd95&action=formedit>
>         [Fri Jul 08 08:04:26 2011] [error] [client 192.168.1.101] PHP
>         Notice:
>         Undefined variable: subobjectName in
>         
> D:\\xampp\\htdocs\\lab\\t1170\\extensions\\SemanticMediaWiki\\includes\\storage\\SMW_SQLStore2.php
>         on line 2020, referer:
>         
> http://192.168.1.100:8080/lab/t1170/index.php?title=BEM:949d1612-5ffb-4483-b916-5b59cfa5cd95&action=formedit
>         
> <http://192.168.1.100:8080/lab/t1170/index.php?title=BEM:949d1612-5ffb-4483-b916-5b59cfa5cd95&action=formedit>
>
>         Semantic Glossary (Version 0.1 alpha)   (r91693) + Lingo
>
>         Stephan somehow the Glossary stopped working after updating to
>         all new
>         SMW, SF ,SRF SVN versions, maybe if you have time you might verify
>         that everything is still working, I don't hope that the last SMW
>         changes caused to influence the SG functionality.
>
>         In our case the properties for the SG are defined and can be
>         displayed
>         in Special:Browse but highlighting and display on the page itself
>         stopped working and suddenly for some of the terms that worked
>         before
>         now Special:Browse shows "Has improper value for
>           Glossary-Term" (Those
>         terms did not change from the last testing, those were just fine and
>         working.)
>
>         MediaWiki       1.17.0
>         PHP     5.3.5 (apache2handler)
>         MySQL   5.5.8
>
>         PS: I don't wanne open another bugzilla, I have still some with
>         status
>         open and I don't want them to fall through the roaster, so hope you
>         don't mind ...
>
>         Cheers,
>
>         MWJames
>
>
>
>
>     --
>     WikiWorks · MediaWiki Consulting · http://wikiworks.com
>
>
>
>
> --
> WikiWorks · MediaWiki Consulting · http://wikiworks.com


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to