From: [[kgh]] <med...@kg...> - 2012-08-23 19:38:54
|
Heiya Kirk, there are protoinformation on smw.o [1] which have to be rewritten (see the talk page). The best we currently have on this is [2] [1] http://semantic-mediawiki.org/wiki/Help:Inverse_properties [2] http://wikimedia.7.n6.nabble.com/New-feature-inverse-properties-in-SMW-tp607323.html Cheers Karsten Am 23.08.2012 18:54, schrieb Kirk McDermid: > Can someone point me to any docs that describe the use of the minus sign > in queries to (I'm assuming) get results from pages that point to the > queried page (with a certain property)? I had no idea SMW had that > capability. (I'm a noob.) > > Thanks! > > Kirk > > On 8/23/2012 10:07 AM, Alex M. Hendler (public) wrote: >> Here are a few options: >> >> 1) The fastest way is probably something like this: >> >> {{#ask: [[{{PAGENAME}}]] >> |?friendOf=Outgoing Friends >> |?-friendOf=Incoming friends >> }} >> >> This would give you a sortable and discrete table of friends and let >> you (manually) see whether there is a mutual friendship. >> >> 2) If you use the SemanticCompoundQueries extension, you can get them >> all to appear in one list/column: >> >> {{#compound_query: [[friendOf::{{PAGENAME}}]] >> |[[-friendOf::{{PAGENAME}}]] >> }} >> >> but I think you would lose some important data there, e.g., whether >> there is a mutual relationship and the direction of the relationship. >> >> 3) If you want to infer a mutual relationship and get a lot more >> flexibility, you will need to pass the results of a query into an >> array (simplest is the #arraymap parser function from SemanticForms) >> and record the relationship there. I frequently use this strategy. If >> you do that, I would recommend recording an additional (and/or sub-) >> property with your inferred property so you can track the provenance >> of the relationships, e.g., >> [[friendOf::friendOf/Inferred::ArrayElement]]. >> >> The inference would look something like this: >> >> {{#arraymap: {{#ask: >> [[friendOf::{{PAGENAME}}]]|link=none|sep=SEPARATOR}}|SEPARATOR|IncomingFriend|[[friendOf::friendOf/Inferred::IncomingFriend| >> ]]}} >> >> This will hide the display of that relationship by default, but you >> can query on it after you save the page (or possibly in real-time if >> you put this into a template that you include on every relevant page, >> but that may depend on your system's caching setup). >> >> Hope this helps, >> >> Alex >> -- >> Alex M. Hendler >> ontolawgy™ LLC: connect . . . the . . . dots >> http://ontolawgy.com >> >> On Thu, Aug 23, 2012 at 3:17 PM, Ed Swing <Ed....@sa...> wrote: >>> Fellow SMWers, >>> I am trying to use a property that is Symmetric - let's call it friendOf. Pages in a particular category (Person) may have values assigned to the property, and I want to create a list of all friends on a person's page. But the property is symmetric, so I want to get all friends that are both referenced on the page AND those who are friends of the page. >>> >>> To put it more plainly, assume I have a page for John, which mentions [[friendOf:: Mary]]. I also have a page for Robert that mentions [[friendOf:: John]]. I know I can query with #ask to find Robert, but I want to have an integrated list containing both Robert and Mary on John's page. How would I do this? >>> >>> >>> Edward Swing >>> Applied Research Technologist >>> Vision Systems + Technology, Inc. >>> 6021 University Boulevard * Suite 360 * Ellicott City * Maryland * 21043 >>> Tel: 410.418.5555 Ext: 919 * Fax: 410.418.8580 >>> Email: Ed....@vs...<mailto:Ed....@vs...> >>> Web: http://www.vsticorp.com<http://www.vsticorp.com/> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Semediawiki-user mailing list >>> Sem...@li... >>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Semediawiki-user mailing list >> Sem...@li... >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |