From: Dimitris K. <kon...@in...> - 2013-03-01 19:20:28
|
Hi Gerard, Unfortunately the condition template is very simple and you cannot add logical expressions (at least for now). The problem you refer to, that xtp4000 property will supersede the otherwise rule, is very template specific and, if you place that rule then I guess you want it to execute it if it succeeds and so you shouldn't care what check comes next. If you want something different, then maybe you could share the high level condition condition you want to achieve and the template / mapping you refer to. Best, Dimitris On Fri, Mar 1, 2013 at 11:10 AM, Gerard Kuys <Ger...@bi...>wrote: > Hi Dimitris, > > Or, as a variety of the two-condition-list option: > > {{Condition > | (templateProperty = type > | operator = equals > | value = River) && > | (templateProperty = name > | operator = contains > | value = "River") > | mapping = > {{TemplateMapping > | mapToClass = River > }} > }} > > Would this &&-approach work? (never mind the soundness of the example) > > Regards, > > Gerard > > > ------------------------------ > *Van:* Dimitris Kontokostas [kon...@in...] > > *Verzonden:* vrijdag 1 maart 2013 8:37 > *To:* Gerard Kuys > *Cc:* dbp...@li... > *Onderwerp:* Re: [Dbpedia-dutch] Conditional mapping > > Although it will not throw an error I don't think it will work as > expected because otherwise will supersede your last statement. > Try to place the last condition just before the otherwise and it should be > fine > > Best, > Dimitris > > > On Thu, Feb 28, 2013 at 11:40 PM, Gerard Kuys <Ger...@bi...>wrote: > >> Thank you, Dimitris, this documentation really is enlightening. One >> last question, however. In the example I include below, there is a >> condition statement with a 'case' clause. As is natural, this ends with an >> 'otherwise' clause. Will the program when having processed this 'otherwise' >> clause leave the entire condition section, or can I add another condition, >> one that is not dependent on the condition (as below: 'templateProperty = >> tpx10') to be fulfilled for the case...otherwise series? >> >> I mean this: >> >> {{ConditionalMapping >> | cases = >> {{Condition >> | templateProperty = tpx10 >> | operator = contains >> | value = 'ABC' >> | mapping = {{TemplateMapping >> | mapToClass = Class1 >> }} >> }} >> >> {{Condition >> | templateProperty = tpx10 >> | operator = contains >> | value = 'DEF' >> | mapping = {{TemplateMapping >> | mapToClass = Class2 >> }} >> }} >> >> {{Condition >> | operator = otherwise >> | mapping = {{TemplateMapping >> | mapToClass =Class3 >> }} >> }} >> >> {{Condition >> | templateProperty = xtp4000 >> | operator = isSet >> | mapping = {{ConstantMapping >> | ontologyProperty = opx300 | value = 'GHI' >> }} >> }} >> >> Would this work? >> >> Regards, >> >> Gerard >> ------------------------------ >> *Van:* Dimitris Kontokostas [kon...@in...] >> *Verzonden:* donderdag 28 februari 2013 21:48 >> *To:* Gerard Kuys >> *Cc:* dbp...@li... >> *Onderwerp:* Re: [Dbpedia-dutch] Conditional mapping >> >> Hi Gerard, >> >> Although so-and-so is kind of ambiguous, for field existence you can use >> the '*isSet' operator >> >> Complete documentation can be found here >> http://mappings.dbpedia.org/index.php/Template:Condition >> http://mappings.dbpedia.org/index.php/Template:ConditionalMapping >> >> and examples here: >> >> http://mappings.dbpedia.org/index.php?title=Special%3ASearch&search=isset&go=Go >> >> http://mappings.dbpedia.org/index.php/Special:WhatLinksHere/Template:Condition >> >> * >> *Best, >> Dimitris >> * >> * >> >> * >> >> >> On Thu, Feb 28, 2013 at 9:38 AM, Gerard Kuys <Ger...@bi...>wrote: >> >>> Hi all, >>> >>> I looked in the document on the DBpedia mapping language, but didn't >>> find what I looked for: >>> >>> How can I, in a conditional mapping, express that the condition only >>> fires if for field so-and-so there is a (or no) value? >>> >>> Thank you for answering! >>> >>> Regards, >>> >>> Gerard Kuys >>> >>> >>> ------------------------------------------------------------------------------ >>> Everyone hates slow websites. So do we. >>> Make your web apps faster with AppDynamics >>> Download AppDynamics Lite for free today: >>> http://p.sf.net/sfu/appdyn_d2d_feb >>> _______________________________________________ >>> Dbpedia-dutch mailing list >>> Dbp...@li... >>> https://lists.sourceforge.net/lists/listinfo/dbpedia-dutch >>> >>> >> >> >> -- >> Dimitris Kontokostas >> Department of Computer Science, University of Leipzig >> Research Group: http://aksw.org >> Homepage:http://aksw.org/DimitrisKontokostas >> > > > > -- > Dimitris Kontokostas > Department of Computer Science, University of Leipzig > Research Group: http://aksw.org > Homepage:http://aksw.org/DimitrisKontokostas > -- Dimitris Kontokostas Department of Computer Science, University of Leipzig Research Group: http://aksw.org Homepage:http://aksw.org/DimitrisKontokostas |