thanks to Yury’s guidance and review of the referenced document draft, I am successfully using the SMWQuery object for finding pages with specific property values.  Keypoint, type your properities!

 

Moving forward, I will need to do queries on ‘Semantic Internal Object’ properties, is there any guidance/warnings/hints on searching for these?

 

cheers
Pete

 

From: ganqturgon@gmail.com [mailto:ganqturgon@gmail.com] On Behalf Of Yury Katkov
Sent: Monday, May 02, 2011 10:44 AM
To: Schott, Peter D (Pete)
Cc: semediawiki-devel@lists.sourceforge.net
Subject: Re: [SMW-devel] How to programatically search on properties?

 

Hi!
You can do that with SMWQuery object. I'm working at the documentation on this and related classes, many a draft of doc will be useful [1]
[1] http://www.semantic-mediawiki.org/wiki/User:Ganqqwerty/programming_examples

On Mon, May 2, 2011 at 6:16 PM, Schott, Peter D (Pete) <pete.schott@alcatel-lucent.com> wrote:

Hi,

As a relative newbie to coding PHP scripts that interact with SMW instance, I have run into a situation that I hope someone can providence guidance or pointers on.

 

I am trying to search for pages in our SMW instance that contain a match for a specific property value, e.g. [[threadNotInDCB::true]] and haven’t been able to discover how to do this programmatically.  Are the SMW APIs or classes I should be using/looking at?  A pointer to an example would be greatly appreciated.  This is an initial pattern we plan to use and will be looking to create content programmatically in the future so understanding the SMW programming model is a key for us.   I have been reviewing the ‘Programmer’s guide to SMW’ and its references but that has been slow going.

 

As a temporary  workaround I am putting the ASK queries on pages that use #urlget to get the property value for the query when visited.   I wrote a  PHP script that uses cURL to visit the page and then parse the results to get the page names that the script then reads the contents via the MW API.   I have to believe there is a much more effective method to do this. 

 

thanks in advance for any guidance or assistance provided.

 

Pete Schott

Research Engineer

Alcatel-Lucent Bell Laboratories

Application Research - Intuitive Collaboration Department


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today.  Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel




--

Yury V. Katkov
Laboratory of intelligent systems
of the Saint-Petersburg National University of Information Technologies, Mechanics and Optics, Russia
http://ailab.ifmo.ru