Hi Richard,
thanks for your reply! Below my answer to your points.

On Mon, Mar 26, 2012 at 8:25 PM, Richard Cyganiak <[email protected]>wrote:

> Hi Luis,
>
> (I hope you don't mind me sharing this on the mailing list)
>
> On 26 Mar 2012, at 14:26, Luis Ignacio Larrateguy wrote:
> > some time ago I wrote an script and a Java class to generate a template
> mapping file based on an ontology. By reading the class definitions,
> properties, inverses, etc it created the template allowing the developer to
> just add the references to the tables in the database.
>
> Right -- so while generate-mapping starts with a database schema and
> creates a skeleton mapping file that references an ad-hoc vocabulary, your
> code starts with an ontology and creates a skeleton mapping file that
> references an ad-hoc database schema.
>

Exactly. The user then have to focus in applying the right conditions or
joins to achieve the mapping correctly. But has an starts given his
vocabulary.


> > I'd like you to take a look if you think it could be useful to reference
> in the D2RQ project.
>
> What kind of reference do you have in mind?
>
> > As it is, it helped me, but I'm open to suggestions to improve it.
>
> A couple of ideas for improvements:
>
> 1. It would help if everything was in English ;-)
>

Sure. No problem.


>
> 2. Most people still use Windows and can't run .sh files; that's why in
> D2RQ we do as much as possible in Java (including things like the help text)
>

Ok. Will try to achieve that with Java (creating a jar may be?) and
providing a bat file.


>
> 3. It would be nice if the code would retain the original prefix for the
> ontology, e.g,. if you import the FOAF namespace then use foaf: instead of
> vocab: (This can be done by checking the namespace that is defined in the
> FOAF ontology; that's better than asking the user for it IMO)
>

On this point, it sounds good. It can be the default, while allowing to
specify one (my use case).


>
> 4. Would be cool if you could make it work *just* with a single URL, so
> that if it's invoked as "generar_mapeo.sh http://xmlns.com/foaf/0.1/"; it
> will still work.
>

Ok.


>
> 5. Instead of calling the columns all "columnaWithDatatypeProperty", it
> should say something like "Person.name" based on the local names of domain
> and property
>

Sounds correct, as it's an example, this would be helpful.


>
> 6. Same for the d2rq:joins, it should be "Person.ID = Project.ID" or
> something like that, instead of always "tablaDomain.id = tablaRange.id"
>

Good point.


>
> 7. The d2rq:uriPattern should really be "Person.ID" instead of
> "tablaPerson.codigo"
>

Right, this was something that escaped from the domain I had, where
"codigo" (code) was the unique field that was identifying the instances too
with a friendly name. Now they are used in the description.


>
> 8. A good way of sharing this code (much better as an email attachment in
> the crappy SourceForge mailing list archive) would be to create a GitHub
> project for it: http://github.com/ You could even consider creating a
> fork of the D2RQ project http://github.com/d2rq/d2rq and add your code to
> the fork. This will give decent visibility because developers who check out
> the D2RQ code will often look around what's going on in the various forks.
> It also makes it much easier for others to take and copy and improve your
> code.
>

Sounds nice.


>
> Finally, have you seen R2RML? http://www.w3.org/TR/r2rml/ We are planning
> to add R2RML support later this year. The R2RML language differs a bit from
> the D2RQ language because each class map (called rr:TriplesMap in R2RML) is
> based on a single complete SQL query, rather than in D2RQ where we "cut up"
> the SQL query into many small parts (joins, conditions, sqlExpressions and
> so on). The R2RML approach should work well with your scenario, because you
> can create a skeleton TriplesMap that has all PredicateObjectMaps (R2RML's
> equivalent to our property bridges) already created, and the user only has
> to write a single SQL query that returns the correct data.
>

Yes, I've seen it. It's really nice, and I'd like to see some
implementations. Sounds promising as a conceptual mapping right now. I hope
I can do some testing with it after I complete my project.

Thanks for your advices on how to improve this script.

Regards
Luis


>
> All the best,
> Richard
>
>
> > The link to the message is below (although it shows as html attachment).
> I can provide more examples if needed.
> >
> > Thanks in advance!
> >
> > Luis Larrateguy
> >
> http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTimqPKMYsVvcVoYjSpf2hU5-dy-4fWvYK3M33xe0%40mail.gmail.com&forum_name=d2rq-map-devel
> >
> > On Sun, Mar 25, 2012 at 7:22 PM, Richard Cyganiak <[email protected]>
> wrote:
> > Hi Rabi,
> >
> > On 22 Mar 2012, at 20:51, Rabi Chandra Shah wrote:
> > >              Is it possible to use any custom ontology while mapping
> the Relational Database to RDF. We are thinking of using d2rq in our
> project for Medical Information System. So far, we have made our ontology,
> and we are not able to use this ontology. The only way that i can think of
> now is to create our own Customized Mapping file.
> >
> > Yes, you can use a custom ontology with D2RQ, and the way to do it is by
> creating a custom mapping file.
> >
> > The D2RQ mapping language is described here:
> > http://d2rq.org/d2rq-language
> >
> > >              I had a brief look into d2r where i came across java
> documentation of the classes provided by them. Can you please give me some
> more example on how to use those classes?
> >
> > Why do you want to look at Java documentation? You don't need to do
> anything with Java to customize a mapping file.
> >
> > I highly recommend working through the steps described here:
> > http://d2rq.org/getting-started
> >
> > Best,
> > Richard
> >
> >
> >
> > >
> > >  Thank You,
> > >
> > > Rabi C Shah
> > > IIIT-A , India
> > >
> ------------------------------------------------------------------------------
> > > This SF email is sponsosred by:
> > > Try Windows Azure free for 90 days Click Here
> > >
> http://p.sf.net/sfu/sfd2d-msazure_______________________________________________
> > > d2rq-map-devel mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel
> >
> >
> >
> ------------------------------------------------------------------------------
> > This SF email is sponsosred by:
> > Try Windows Azure free for 90 days Click Here
> > http://p.sf.net/sfu/sfd2d-msazure
> > _______________________________________________
> > d2rq-map-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel
> >
> >
> >
> > --
> > Luis Larrateguy
> > Blog: http://nacho.larrateguy.com.ar/
> > Web: http://larrateguy.com.ar/luisignacio
>
>


-- 
Luis Larrateguy
Blog: http://nacho.larrateguy.com.ar/
Web: http://larrateguy.com.ar/luisignacio
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
d2rq-map-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

Reply via email to