Hi!

I need to get the values for an annotation on an article.

I´m doing this:

//get all annotations for an article
$result = smwfGetStore()->getProperties($article);

for ($i = 0; $i < $size; $i++){

           //for the actual property I ask for the value in article.
           $v = smwfGetStore()->getPropertyValues($article, $result[$i]);

           $dataItem = $v[0];
$type= $dataItem->getDIType();

if ($type == 9){
 $value= $dataItem->getTitle();
}elseif ($type == 6){
$value = $dataItem->getSerialization();
 }else{
$value= $dataItem->getLabel();
 }

I get all the annotations names but I can get the actual values of the
properties.
I have an error on the line $type= $dataItem->getDIType();

I´m working with SMW 1.7.1

Thanks!
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to