On 17/03/11 10:12, Veliqi wrote:
>     Hi,
>
>     I am developing an extension for SMW and I need to know how to get
>     (with which method) the attribute called 'm_values' in the
>     SMWNAry-Class?

Hi Veliqi,

the current version of SMW does not have a class called SMWNAry. This 
code has been replaced by a new implementation called SMWRecordValue. It 
provides access to the stored data via the method getDVs() that provides 
you with an array of datavalue objects. Records are one (currently the 
only) special case of Container values in SMW. The general interface of 
such containers is the method getData() which gives you an 
SMWSemanticData object (using auxiliary properties to address the 
positions of the value list in a record). Future SMW versions may 
provide more types of container values.

- Markus

>
>     I have annotations like these:
>     [[ImageAnnotation::File:Obama_Merkel.jpg;rect 175 0 131 56]]
>
>     When I call the getShortWikiText()-mehotd on a SMWNAry-object i get
>     the following:
>     Bild:Obama Merkel.jpg; circle 175 0 131 56
>
>     But i need to get the two information seperated from each other
>     (i.e. "Bild:Obama Merkel.jpg" and "circle 175 0 131 56").
>     When I call print_r() on the SWMNAry-Object I see that there is an
>     attribute calles m_values, which seems to be an array:
>     - The first element from that array is an SMWWikiPageValue-object
>     and which includes the first info in the attribute called
>     'm_strubvalues'
>
>         [m_stubvalues:protected] => Array
>         (
>     [0] => Obama_Merkel.jpg
>         ...
>
>     - The second element ist an SMWStringValue-object and has the same
>     variable with the second info i need:
>
>         [m_stubvalues:protected] => Array
>          (
>     [0] => rect 175 0 131 56
>          ....
>
>
>     So i need to know how to get these two objects and then these two
>     infos in them?
>     I tried many (all?) methods from the SMWNAry-Class like
>     getValueList(), etc. but they either give nothing back or all infos
>     as a concatinated string like getShortWikiText() (see above)...
>
>
>     Thanks a lot for any help!
>
>
>
>
>
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
>
>
>
> _______________________________________________
> Semediawiki-devel mailing list
> Semediawiki-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to