Use a property bridge that creates rdf:type statements. Assigning an  
instance X to a class C in RDF is nothing more than creating a  
statement "X rdf:type C"!

So: Make a class map for the role table. It should have a uriPattern 
"http://xyz.com/role_@@ROLE.PERSON_ID@@ 
". It should have a property bridge which has d2rq:property rdf:type,  
and a uriPattern "http://xyz.com/@@LOOKUP.ROLE_NAME";. This property  
bridge also needs a d2rq:join "ROLE.ROLE_ID=LOOKUP.ROLE_ID" (or  
whatever the ID column is called in the LOOKUP table).

Best,
Richard


On 9 Nov 2010, at 10:22, rajashree deka wrote:

> Hello Richard,
>
> I have a particular situation and I can't seem to find a way of  
> implementing
> this in the mapping.
>
> I have a table ROLE in which each person is associated with a  
> particular
> ROLE_ID. This ROLE_ID is then linked to a ROLE_NAME field in another  
> table
> called LOOKUP table. In the existing ontology, each role represents  
> a class.
>
> For eg.
> For person A :
> person_id = 1
> role = STUDENT
> role_id= 100.
>
> For person B:
> person_id=2
> role = TEACHER
> role_id = 101
>
> The URI for the STUDENT role will be of the form http://xyz.com/STUDENT 
> .
> The URI for the TEACHER role will be of the form http://xyz.com/TEACHER 
> .
>
> Now, the URIs of the instances of each class is of the form:
> abc:STUDENT rdf:about="http://xyz.com/role_1";
> abc:TEACHER rdf:about="http://xyz.com/role_2";
>
> How can I implement this?
>
> Many thanks,
> Rajashree
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev_______________________________________________
> d2rq-map-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
d2rq-map-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

Reply via email to