There’s an interesting idea. Set autoReloadMapping and dynamically generate the 
mapping file. You could even generate the mapping file from a SPARQL construct 
query.

Would D2RQ reload a file based on http cache control settings? I’m not sure 
what this would be good for but it would be interesting to see what you could 
do with it.

From: Diogo FC Patrao [mailto:[email protected]]
Sent: Saturday, June 11, 2011 2:12 PM
To: Whitley, Zachary C.
Cc: [email protected]
Subject: Re: [d2rq-dev] @prefix and uriPattern

Hello

Luis, I'm using 4 different namespaces on my mapping, that's why I need 
substitution.

Zachary, in the end of the day, that's what I did: search and replace. However, 
that's not too convenient.

I thought about using PHP to substitute variables on my mapping, like

d2rq:uriPattern "<?=$bec_uri?>#@@PEP.RGH@@";

or maybe running sed in a makefile.

--
diogo patrão




On Sat, Jun 11, 2011 at 2:10 PM, Whitley, Zachary C. 
<[email protected]<mailto:[email protected]>> wrote:
I don’t believe that D2RQ supports that but you might be able to get something 
similar by writing the mapping file in rdf/xml and using a named entity. I’m 
guessing that D2RQ would support having the config file in RDF/XML as long as 
you updated the web .xml file to point to it but I haven’t checked to see if 
that would work.

<!ENTITY bec http://blablabla.com/ontologies/bec.owl#>

<d2rq:uriPattern>
                &bec;Paciente@@PEP.RGH@@
</d2rq:uriPattern>

But working in rdf/xml defeats the purpose of saving keystrokes. If you’re 
looking to save keystrokes you can try writing

map:Paciente a d2rq:ClassMap;
    d2rq:dataStorage map:database;
    d2rq:uriPattern “&bec;@@PEP.RGH@@";
    d2rq:class bec:Paciente

and doing a search and replace (&bec; => 
http://blablabla.com/ontologies/bec.owl#<http://blablabla.com/ontologies/bec.owl>)
 when you’re done.


From: Luis Ignacio Larrateguy 
[mailto:[email protected]<mailto:[email protected]>]
Sent: Saturday, June 11, 2011 10:39 AM
To: Diogo FC Patrao
Cc: 
[email protected]<mailto:[email protected]>
Subject: Re: [d2rq-dev] @prefix and uriPattern

Hello Diogo,
the only way I found to do something similar to what you want to do is by 
serving D2RQ in a Joseki (or using D2RServer).
By starting the D2RServer with the option -b servername, you'll your ontology 
under that namespace. Of course that will be only be useful if you like your 
servername as your namespace.
I'm looking for the same stuff, if I accomplish something will let you know.

Regards

Luis Larrateguy
On Thu, May 26, 2011 at 10:45 AM, Diogo FC Patrao 
<[email protected]<mailto:[email protected]>> wrote:
Hello,

I'm working on a mapping file that create instances for an existing ontology. I 
plan to dump the rdf data and import it into the ontology.

I defined the base uri for my ontology on a @prefix tag, e.g.

@prefix bec: 
<http://blablabla.com/ontologies/bec.owl#<http://blablabla.com/ontologies/bec.owl>>


I would like to use this prefix as the base for instance URI, but I have to 
write:

map:Paciente a d2rq:ClassMap;
    d2rq:dataStorage map:database;
    d2rq:uriPattern 
"http://blablabla.com/ontologies/bec.owl#Paciente@@PEP.RGH@@";;
    d2rq:class bec:Paciente
.

Is there any way I can use the bec: prefix, like

d2rq:uriPattern "bec:@@PEP.RGH@@";

so I can save a few keystrokes?



--
diogo patrão




------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
d2rq-map-devel mailing list
[email protected]<mailto:[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

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
d2rq-map-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
d2rq-map-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

Reply via email to