Code Monkey home page Code Monkey logo

Comments (3)

cygri avatar cygri commented on June 10, 2024

Not sure I understand. Can you give an example?

from d2rq.

MarcyRouge avatar MarcyRouge commented on June 10, 2024

Hello, thanks for your answer.

Let's say I have in my Database a table called "Conference" with three attributes : name, date, coordinator.
My ontology has instead a class called "Conference" and another called "Coordinator".

By following the exemple document, I can easily mapp the classmap conference to the ontology class.
map:Conference a d2rq:ClassMap;
d2rq:dataStorage map:database;
d2rq:class myOntology:Conference ;

and the propertybrides to map as properties would be name, date and coordinator.
map:name a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:Conference;
d2rq:property ....
map:date a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:Conference;
d2rq:property ....
map:coordinator a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:Conference;
d2rq:property ....

However, I don't want to map coordinator as a property but as a class instead. How can I do it, if coordinator does not exist as a table in my database?

I hope this exemple is clear. Otherwise I will try to reformulate it.

Thanks again

from d2rq.

cygri avatar cygri commented on June 10, 2024

Thanks for those details, I think I understand now.

Make a class map for your Coordinator class. Its URI pattern should be based on the Conference.coordinator column (with an encoding of your choice, see here). The property bridge for the coordinator property should then refer to the Coordinator class map. No join is needed because both class maps are based on the same table.

I'll close this issue but feel free to reopen if this doesn't solve your problem.

from d2rq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.