Holger,

            Thanks for that. I built a toy set of ontologies and the mapping
works just as it should. Now I think I'm hung up on a detail that I can't
find a fix for: As it turns out, the json:device_agent property of the
json:Device is populated with a collection containing a single instance
value (see the [] in the attachment), which I think is confusing the target
resource function. I need to somehow get something like an rdf:first invoked
to pull out the instance, but I don't see how to modify the target resource
function. Should I be making a subclass of the target resource function and
invoking that? (Sounds messy).

 

 

- Steve

 

Steven R. Ray, Ph.D.

Distinguished Research Fellow

Carnegie Mellon University

NASA Research Park

Building 23 (MS 23-11)

P.O. Box 1
Moffett Field, CA 94305-0001

Email:    [email protected]

Phone: (650) 587-3780

Cell:      (202) 316-6481

Skype: steverayconsulting

10yr-logo-sm

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Holger Knublauch
Sent: Wednesday, August 07, 2013 8:38 PM
To: [email protected]
Subject: Re: [topbraid-users] Problem using SPINMap

 

On 8/8/2013 8:01, Steve Ray (CMU) wrote:

Hi,

            I'm having trouble mapping two related classes in class A (in
this case "json") to two similarly related classes in class B (in this case
"cmusc"). I was planning to use the spinmap:targetResource function, but in
this case it doesn't seem to allow this function to cross to a second class
(see the red triangle in the attached .png).

            This must come up frequently, so I must be missing something,
yes?


The short answer is that you need a mapping context (e.g. buildURI) between
the two classes before you can add mappings.

A bit of background. If you define a mapping context between two classes,
then you tell the system how to translate the URI of a resource on the left
into URIs for the class on the right. These might be equal or URI derivation
functions such as buildURI. Then when you connect two properties, the engine
can use the context to figure out the source subject and the target subject
for the new triple, while the value itself will be computed using the
transformation function. This is how it works when you start a connection at
a *property* - the transformation will use the *value* of the given property
as its starting point.

Now, if you define a mapping starting with the upper right corner of a
class, then you tell the system to use the URI of the source instance itself
as input to the transformation function. Indeed this could be the
spinmap:targetResource function, or any other that takes a URI resource as
its first input argument. If the system would allow you to link the URI to a
property in any unrelated class on the right, then there would be no context
to figure out what the source and target subjects should be. To prevent
this, the UI disallows creating such links.

I am not exactly sure what you are trying to model, but I assume you want to
map all values from json:device_agent to cmusc:hasAgent. So just drag a line
between those. Then select spinmap:targetResource with the context from the
lower mapping so that SPINMap can turn the json:Device_Agent into the
corresponding smusc:DeviceAgent.

HTH
Holger

-- 
-- 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 Ensemble, 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/groups/opt_out.

-- 
-- 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 Ensemble, 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/groups/opt_out.


<<image001.jpg>>

<<attachment: ScreenClip.png>>

Reply via email to