You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by kumar rohit <ku...@gmail.com> on 2016/06/17 12:44:29 UTC
Modularize Jena code
While building semantic web application, how can I organise my code? For
instance, I have OWL file in Protege and multiple (say 50 queries) .
In one class I imported/read the file but confuse then what to do next?
Will there be a separate method i-e ExecSparql1() for each sparql query or
there is something which is simple?
Thanks
Re: Modularize Jena code
Posted by Stian Soiland-Reyes <st...@apache.org>.
I guess what Kumar is asking for is a good strategy for how to bundle
say *.ttl and *.sparql files in a Java project.
I think the way Paul have done it is a sane approach. You should be
able to then do getClass().getResource() to get a java.net.URL to load
- or getResourceAsStream() (but then relative paths will be odd).
On 22 June 2016 at 18:17, Paul Houle <on...@gmail.com> wrote:
> Here is the strategy I am using to package Turtle files, SPARQL code and
> stuff like that with Java code:
>
> http://ontology2.com/the-book/including-foreign-source-in-java.html
>
> On Fri, Jun 17, 2016 at 8:44 AM, kumar rohit <ku...@gmail.com> wrote:
>
>> While building semantic web application, how can I organise my code? For
>> instance, I have OWL file in Protege and multiple (say 50 queries) .
>>
>> In one class I imported/read the file but confuse then what to do next?
>> Will there be a separate method i-e ExecSparql1() for each sparql query or
>> there is something which is simple?
>>
>> Thanks
>>
>
>
>
> --
> Paul Houle
>
> *Applying Schemas for Natural Language Processing, Distributed Systems,
> Classification and Text Mining and Data Lakes*
>
> (607) 539 6254 paul.houle on Skype ontology2@gmail.com
>
> :BaseKB -- Query Freebase Data With SPARQL
> http://basekb.com/gold/
>
> Legal Entity Identifier Lookup
> https://legalentityidentifier.info/lei/lookup/
> <http://legalentityidentifier.info/lei/lookup/>
>
> Join our Data Lakes group on LinkedIn
> https://www.linkedin.com/grp/home?gid=8267275
--
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons
http://orcid.org/0000-0001-9842-9718
Re: Modularize Jena code
Posted by Paul Houle <on...@gmail.com>.
Here is the strategy I am using to package Turtle files, SPARQL code and
stuff like that with Java code:
http://ontology2.com/the-book/including-foreign-source-in-java.html
On Fri, Jun 17, 2016 at 8:44 AM, kumar rohit <ku...@gmail.com> wrote:
> While building semantic web application, how can I organise my code? For
> instance, I have OWL file in Protege and multiple (say 50 queries) .
>
> In one class I imported/read the file but confuse then what to do next?
> Will there be a separate method i-e ExecSparql1() for each sparql query or
> there is something which is simple?
>
> Thanks
>
--
Paul Houle
*Applying Schemas for Natural Language Processing, Distributed Systems,
Classification and Text Mining and Data Lakes*
(607) 539 6254 paul.houle on Skype ontology2@gmail.com
:BaseKB -- Query Freebase Data With SPARQL
http://basekb.com/gold/
Legal Entity Identifier Lookup
https://legalentityidentifier.info/lei/lookup/
<http://legalentityidentifier.info/lei/lookup/>
Join our Data Lakes group on LinkedIn
https://www.linkedin.com/grp/home?gid=8267275
Re: Modularize Jena code
Posted by Rob Vesse <rv...@dotnetrdf.org>.
This question has nothing to do with Jena
You are asking about generic software engineering which would be better asked on a general programming forum like StackOverflow or learnt by reading a textbook
Rob
On 17/06/2016 13:44, "kumar rohit" <ku...@gmail.com> wrote:
While building semantic web application, how can I organise my code? For
instance, I have OWL file in Protege and multiple (say 50 queries) .
In one class I imported/read the file but confuse then what to do next?
Will there be a separate method i-e ExecSparql1() for each sparql query or
there is something which is simple?
Thanks