Discussion:
Modularize Jena code
kumar rohit
2016-06-17 12:44:29 UTC
Permalink
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
Rob Vesse
2016-06-17 14:39:53 UTC
Permalink
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" <***@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
2016-06-22 17:17:17 UTC
Permalink
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
Post by kumar rohit
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 ***@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
2016-06-23 15:17:35 UTC
Permalink
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).
Post by Paul Houle
Here is the strategy I am using to package Turtle files, SPARQL code and
http://ontology2.com/the-book/including-foreign-source-in-java.html
Post by kumar rohit
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*
: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
Loading...