Hi Yaron,

I don't think that's my problem, I am using an older version of SMW 1.5.0 and 
MW 1.15.3.   I would like to update but won't be able to in near term.

Pete

From: yaro...@gmail.com [mailto:yaro...@gmail.com] On Behalf Of Yaron Koren
Sent: Tuesday, May 10, 2011 12:38 PM
To: Schott, Peter D (Pete)
Cc: semediawiki-devel@lists.sourceforge.net
Subject: Re: [SMW-devel] SMWQuery object failing using compound query

Hi,

My guess is that it's because you're using the latest version of SMW from SVN - 
it's still under development, and some of the other extensions aren't yet 
compatible with it. If that's the case, you should instead use this SVN URL:

http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticMediaWiki/REL_1_5_6/

-Yaron
On Tue, May 10, 2011 at 12:22 PM, Schott, Peter D (Pete) 
<pete.sch...@alcatel-lucent.com<mailto:pete.sch...@alcatel-lucent.com>> wrote:
I'm working on using the SMWquery object to do queries on properties.  The 
queries on single properties is working fine for the various property types.

Moving on to do queries on 2 properties doesn't seem to work as I expected.  
Using [0] and the Semantic MediaWiki API documentation [1] as a references, I 
am have the following PHP snippet:
====
$numberValue = new SMWNumberValue('number');
$numberValue->setUserValue('700');
$description = new SMWValueDescription($numberValue);
$property = SMWPropertyValue::makeProperty('EngageContainerType');
$containerDescription = new SMWSomeProperty($property, $description);

$wikiPage = SMWWikiPageValue::makePage('Engage_Thread', NS_MAIN);
$description2 = new SMWValueDescription($wikiPage);
$property2 = SMWPropertyValue::makeProperty('EngageObject');
$objectDescription = new SMWSomeProperty($property2, $description2);

$queryDescription = new SMWConjunction(array($containerDescription, 
$objectDescription));
$query = new SMWQuery($queryDescription);
$result = $this->store->getQueryResult($query);
$this->printResult($result->getResults());
====

that reports -> Fatal error: Call to a member function getQueryResult() on a 
non-object
on line -> $result = $this->store->getQueryResult($query);

If I code them up as separate queries they work just fine.  I am sure it's 
pilot error but reviewing [1] hasn't helped as of yet.  SMH...

[0] http://www.semantic-mediawiki.org/wiki/User:Ganqqwerty/programming_examples
[1] http://semantic-mediawiki.org/doc/

Any guidance or suggestions would be greatly appreciated.
cheers

Pete Schott
Research Engineer
Alcatel-Lucent Bell Laboratories
Application Research - Intuitive Collaboration Department

office:   908.582.8163<tel:908.582.8163>
mobile: 908.745.8230<tel:908.745.8230>


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net<mailto:Semediawiki-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel



--
WikiWorks * MediaWiki Consulting * http://wikiworks.com
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to