From: Yaron K. <ya...@gm...> - 2009-11-15 22:26:01
|
Unfortunately, you can't do that - you can't query on two types of object at the same time, in this case authors and publications. I think the best solution here is to split it up into multiple queries, one for each publication type; so for journals, you would have something like: '''Papers in journals:''' {{#ask: [[Has_Publication.Has_PublicationType::Journal]] | ?Author | ?University | ?Has_Publication | format=table | mainlabel=- |}} Note the new(-ish) format for sub-queries, which uses a "." instead of the old "<q>" tag. -Yaron On Fri, Nov 13, 2009 at 8:14 PM, Beebe, Mary J <Be...@ba...> wrote: > This is great. By looking at the database this is exactly what we were > looking for but now the query is giving me trouble. Sorry if this is easy I > have to been trying all kinds of different things. Here is what I have. > > On the publication page I have: > > [[Has_PublicationType::Journal]] > > {{#set_internal: Has_Publication | Author = Mary | University = Ohio State > }} > {{#set_internal: Has_Publication | Author = John | University = USC }} > {{#set_internal: Has_Publication | Author = Jane | University = Ohio State > }} > > > That created a virtual page for each line, with properties Has_Publication, > Author, University. > > My ask statement is: > > {{#ask: [[Author::+]] > [[Has_Publication::<q>[[Has_PublicationType::+]]</q>]] > | ?Author > | ?University > | ?Has_Publication > | ?Has_PublicationType > | format=table > | mainlabel=- > |}} > > The problem seems to be that cannot figure out how to get information from > 2 pages that are linked together to show up on one row. > > Similar to select table1.field1, table2.field2 from table1, table2 where > table1.id = table2.id in sql query. > > Mary Beebe > > > -----Original Message----- > From: Dan Bolser [mailto:dan...@gm...] > Sent: Friday, November 13, 2009 3:59 AM > To: Beebe, Mary J > Cc: Sem...@li... > Subject: Re: [Semediawiki-user] Nesting of Semantic Annotations > > 2009/11/12 Beebe, Mary J <Be...@ba...>: > > It seems to me that Semantic wiki annotations are dependent on individual > pages. > > > > However, we want to create something like this: > > > > One page about a Journal, which was written by 3 authors. > > > > [[Has_Author::Mary]] goes to [[University::Ohio State]] > > [[Has_Author::John]] goes to [[University::USC]] > > [[Has_Author::Jane]] goes to [[University::Ohio State]] > > > > Because of the paragraph that I found below, we do not think it is > possible to link the author to the university and the journal without > creating a separate page for the author; however, it is impossible to create > a separate page for each author for various reasons. > > Hi Mary, > > Your analysis is right, however there are a number of solutions. > > In addition to many-valued properties suggested by Gu, have a look at > the Semantic Internal Objects (SIO) extension: > > http://www.mediawiki.org/wiki/Extension:Semantic_Internal_Objects > > > {{#set_internal: Has_Author | Name = Mary | University = Ohio State }} > {{#set_internal: Has_Author | Name = John | University = USC }} > {{#set_internal: Has_Author | Name = Jane | University = Ohio State }} > > > This creates 'page-like' objects that correctly associate 'Names' with > 'Universities' and 'Has authors' with the calling page. > > Dan. > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |