Hi Michel, attached is a solution to your scenario, see screenshot:
Use spinmapl:constantResource to set this, and do this for all subclasses of a:Car.
A cleaner general solution would be to attach some mapping information to the a: classes using a new property that links those classes with a color from b:. This info could then be used for both directions.
Holger On 4/8/2014 17:43, Bohms, H.M. (Michel) wrote:
Hi Scot, Sorry, I’ll be more precise… Its actually a very simple example Ontology1: Class RedCar Individual RedCar_1 Ontology2 (say some more normalized common ontology…): Class Car DatatypeProperty colour (enumeration type Red, Blue , Green)I now want to define a mapping rule not only mapping RedCar to Car (via simple “self”) but at the same time having the colour “Red”Next question would be the other way round, mapping ont2 to 1: Car_1 being blue > BlueCar_1 in ont1. Thx! Michel*From:*[email protected] [mailto:[email protected]] *On Behalf Of *Scott Henninger*Sent:* maandag 7 april 2014 17:49 *To:* [email protected] *Subject:* Re: [topbraid-users] spinmap questionMichel; You may need to be a bit more specific. Do you mean to the property x:RedX to the property y:X and add a second property to y: for "Red"?-- Scott On 4/7/2014, 10:43 AM, Bohms, H.M. (Michel) wrote: When I want to map x:RedX to y:X, with colour “Red”…how would I specify this? Thx Michel Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. TNO aanvaardt geen aansprakelijkheid voor de inhoud van deze e-mail, de wijze waarop u deze gebruikt en voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten. This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.-- -- You received this message because you are subscribed to the GoogleGroup "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN. To post to this group, send email to [email protected] <mailto:[email protected]> To unsubscribe from this group, send email to [email protected] <mailto:[email protected]> For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en --- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. For more options, visit https://groups.google.com/d/optout. -- -- You received this message because you are subscribed to the GoogleGroup "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.To post to this group, send email to [email protected] <mailto:[email protected]> To unsubscribe from this group, send email to[email protected] <mailto:[email protected]>For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en ---You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.For more options, visit https://groups.google.com/d/optout. -- -- You received this message because you are subscribed to the GoogleGroup "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en ---You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.For more options, visit https://groups.google.com/d/optout.
-- -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en--- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
<<inline: aebifacg.png>>
# baseURI: http://example.org/redCarSPINMap # imports: http://spinrdf.org/spin # imports: http://topbraid.org/spin/spinmapl @prefix a: <http://example.org/file1#> . @prefix b: <http://example.org/file2#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix redCarSPINMap: <http://example.org/redCarSPINMap#> . @prefix sp: <http://spinrdf.org/sp#> . @prefix spin: <http://spinrdf.org/spin#> . @prefix spinmap: <http://spinrdf.org/spinmap#> . @prefix spinmapl: <http://topbraid.org/spin/spinmapl#> . @prefix spl: <http://spinrdf.org/spl#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . a:Car rdf:type owl:Class ; rdfs:label "Car"^^xsd:string ; rdfs:subClassOf owl:Thing ; . a:RedCar rdf:type owl:Class ; spinmap:rule [ rdf:type spinmap:Mapping-0-1 ; spinmap:context redCarSPINMap:RedCar-Car ; spinmap:expression b:Car ; spinmap:targetPredicate1 rdf:type ; ] ; spinmap:rule [ rdf:type spinmap:Mapping-0-1 ; spinmap:context redCarSPINMap:RedCar-Car ; spinmap:expression [ rdf:type spinmapl:constantResource ; sp:arg1 spin:_arg1 ; spinmapl:result b:red ; ] ; spinmap:targetPredicate1 b:color ; ] ; rdfs:label "Red car"^^xsd:string ; rdfs:subClassOf a:Car ; . a:RedCar_1 rdf:type a:RedCar ; rdfs:label "Red car 1"^^xsd:string ; . b:Car rdf:type owl:Class ; rdfs:label "Car"^^xsd:string ; rdfs:subClassOf owl:Thing ; . b:Color rdf:type owl:Class ; rdfs:label "Color"^^xsd:string ; rdfs:subClassOf owl:Thing ; . b:color rdf:type owl:ObjectProperty ; rdfs:domain b:Car ; rdfs:label "color"^^xsd:string ; . b:red rdf:type b:Color ; rdfs:label "red"^^xsd:string ; . <http://example.org/redCarSPINMap> rdf:type owl:Ontology ; owl:imports <http://spinrdf.org/spin> ; owl:imports <http://topbraid.org/spin/spinmapl> ; owl:versionInfo "Created with TopBraid Composer"^^xsd:string ; . redCarSPINMap:RedCar-Car rdf:type spinmap:Context ; spinmap:sourceClass a:RedCar ; spinmap:target [ rdf:type spinmapl:self ; spinmap:source spinmap:_source ; ] ; spinmap:targetClass b:Car ; .
