On 25/01/2011 00:14, Hull, Ryan E wrote:
> I am doing some work that requires me to get all distinct values for a
> given property across all wiki pages. I see in the API that we have
> access to SMWSQLStore2::getPropertyValues but this only returns unique
> property values. If a property is listed with a given value more than
> once, I want to know that.
> The only method we’ve found to do something like this is to use
> getAllPropertySubjects() to find the wiki pages that use a given
> property, then iterate over the text of each wiki page to find each
> property value. I don’t like this solution. Is there anything cleaner
> that we’ve missed?

The storage function getPropertyValues(), called with null subject, 
should directly return what you are looking for. The other parameters of 
the function can be used for paged retrieval (the overall set of values 
could be large). See also:

http://semantic-mediawiki.org/doc/classSMWStore.html#a5fb4545805998ceb887c270b835847e

Regards,

Markus

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to