From: Gerard K. <Ger...@bi...> - 2013-03-02 02:13:03
|
OK, I will do that. Thanks! But then, it seems to be wise to repeat the mappings to be done in the 'otherwise' clause in the condition with the other criteria ('templateProperty = xtp4000'). Because, if fired, it will never arrive at the 'otherwise' anymore. Regards, Gerard ________________________________ Van: Gerard Kuys [Ger...@bi...] Verzonden: donderdag 28 februari 2013 22:40 To: Dimitris Kontokostas Cc: dbp...@li... Onderwerp: Re: [Dbpedia-dutch] Conditional mapping 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...<mailto: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...<mailto: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 |