On Montag, 21. Januar 2008, Petr Andreyev wrote:
> Hi Markus,
>
> During parsing, SMW will store all semantic data contained in an articles
>
> > text
> > (whether revision or current) within the SMWFactbox::$semdata which is =
an
> > object of class SMWSemanticData. You could access that object *after
> > parsing*
> > to extract data directly. I do not see another way of solving that. Some
> > problems may still occur, since SMW depends on non-local data (e.g.
> > datatypes
> > of properties) that will influence parsing, but that is not versioned. I
> > think MW has some similar issues with old revisions using current
> > versions of
> > templates.
>
> Thanks for the hint.
>
> It can solve the issue.
> But what I would expect from SMW (a kind of natural functionality) is bei=
ng
> able to work with semantic properties of any given article in PHP code.
> This would mean in particular (as a basic level) having access to the pro=
ps
> of the currently displayed article (any revision).
>
> Why I find this functionality natural? SMW extends articles with semantic
> properties. So, for an object representing article there should be methods
> available for dealing with its semantic properties. So, it's natural just
> from the point of view of OO.
>
> I think implementing this mechanism would open many new applications of
> SMW.
Yes, I understand. Basically the idea would be to have OO-based access to t=
he=20
semantic storage. I think the next step to a better interface is to=20
completely remove MW objects from the storage interface: we already use=20
SMWDataValue for all annotation objects (including pages), we now should al=
so=20
use it everywhere for subjects. Also, there should be a new container=20
(SMWDataValue?) for properties, so they are not represented by Titles.
But all this requires some time ... if you have some to spare, you can prop=
ose=20
interfaces for what you have in mind, but I will not have major coding time=
=20
within the next weeks (e.g. documentation is still missing).
Best regards,
Markus
=2D-=20
Markus Kr=F6tzsch
Institut AIFB, Universit=E4t Karlsruhe (TH), 76128 Karlsruhe
phone +49 (0)721 608 7362 fax +49 (0)721 608 5998
mak@... www http://korrekt.org
|