James;  It may depend on how you've structured your rules.  Attached is a file that duplicates the model in the Help files and Holger's blog.  The diagram expands as I expect it, but if you have different expectations, let us know.

-- Scott

jlapalme wrote:
Hi,

I have tried this but the result is not the same.
The diagram shows that the input and output classes are DIRECTLY
related to the mapping.
When I use spin:rule, the outputs are NOT directly related, I have to
expand multiple relationship.

jl

On May 28, 11:16 am, Holger Knublauch <[email protected]> wrote:
  
Hi James,

in 3.0 please use the spin:rule property to define such mappings. The  
class diagram will then display them in the same way as the screenshot  
of the blog entry (when you expand the relationships). The entry below  
was using the sparql:query property that was used in 2.x versions of  
TBC.

Holger

On May 28, 2009, at 6:57 AM, jlapalme wrote:





    
In the following article, a view is presented that show a mapping
between classes :
      
http://composing-the-semantic-web.blogspot.com/2006/09/ontology-mappi...
      
How do we achieve the same view in TBC 3.0
      
Cheers,
      
James- Hide quoted text -
      
- Show quoted text -
    


  

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group.
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-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

# Saved by TopBraid on Thu Jun 04 09:40:14 CDT 2009
# baseURI: http://TQSupportQs.com/unnamed0
# imports: http://spinrdf.org/spin

@prefix sp:      <http://spinrdf.org/sp#> .
@prefix spin:    <http://spinrdf.org/spin#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix target:  <http://my.com/file2#> .
@prefix spl:     <http://spinrdf.org/spl#> .
@prefix source:  <http://my.com/file1#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix :        <http://TQSupportQs.com/unnamed0#> .

<http://TQSupportQs.com/unnamed0>
      a       owl:Ontology ;
      owl:imports <http://spinrdf.org/spin> ;
      owl:versionInfo "Created with TopBraid Composer"^^xsd:string .

:Person_1
      a       source:Person ;
      rdfs:label "Person_1"^^xsd:string ;
      source:car "maxzda"^^xsd:string ;
      source:name "pete"^^xsd:string .

:Person_2
      a       source:Person ;
      rdfs:label "Person_2"^^xsd:string ;
      source:car "toyota"^^xsd:string ;
      source:name "jpe"^^xsd:string .

source:Person
      a       owl:Class ;
      rdfs:label "Person"^^xsd:string ;
      rdfs:subClassOf owl:Thing ;
      spin:rule
              [ a       sp:Construct ;
                sp:templates ([ sp:object target:Person ;
                            sp:predicate rdf:type ;
                            sp:subject _:b1
                          ] [ sp:object _:b2 ;
                            sp:predicate rdfs:label ;
                            sp:subject _:b1
                          ] [ sp:object _:b2 ;
                            sp:predicate target:name ;
                            sp:subject _:b1
                          ] [ sp:object target:Car ;
                            sp:predicate rdf:type ;
                            sp:subject _:b3
                          ] [ sp:object _:b4 ;
                            sp:predicate rdfs:label ;
                            sp:subject _:b3
                          ] [ sp:object _:b3 ;
                            sp:predicate target:drives ;
                            sp:subject _:b1
                          ]) ;
                sp:where ([ sp:object source:Person ;
                            sp:predicate rdf:type ;
                            sp:subject _:b5
                          ] [ sp:object _:b2 ;
                            sp:predicate source:name ;
                            sp:subject _:b5
                          ] [ sp:object _:b4 ;
                            sp:predicate source:car ;
                            sp:subject _:b5
                          ])
              ] .

source:car
      a       owl:DatatypeProperty ;
      rdfs:domain source:Person ;
      rdfs:label "car"^^xsd:string .

source:name
      a       owl:DatatypeProperty ;
      rdfs:domain source:Person ;
      rdfs:label "name"^^xsd:string .

target:Car
      a       owl:Class ;
      rdfs:label "Car"^^xsd:string ;
      rdfs:subClassOf owl:Thing .

target:Person
      a       owl:Class ;
      rdfs:label "Person"^^xsd:string ;
      rdfs:subClassOf owl:Thing .

target:drives
      a       owl:ObjectProperty ;
      rdfs:domain target:Person ;
      rdfs:label "drives"^^xsd:string ;
      rdfs:range target:Car .

target:model
      a       owl:DatatypeProperty ;
      rdfs:domain target:Car ;
      rdfs:label "model"^^xsd:string .

target:name
      a       owl:DatatypeProperty ;
      rdfs:domain target:Person ;
      rdfs:label "name"^^xsd:string .

_:b4  sp:varName "carName"^^xsd:string .

_:b2  sp:varName "personName"^^xsd:string .

_:b5  sp:varName "person"^^xsd:string .

Reply via email to