JENA code or SPARQL

2015-08-20 Thread kumar rohit
What is the best way to query a model in Jena? Through classes and methods of Jena like below ResIterator itr = model.listSubjectsWithProperty(studies); Or through SPARQL inside jena code.? and how one is best than the other?

RDF or OWL

2015-08-20 Thread kumar rohit
Suppose a Protege file which is saved as "module.owl" in Rdf/xml serialized form and we want to import it in Jena, what classes will we use? I mean RDF classes like Model model = ModelFactory.createDefaultModel(); OR Ontmodel classes and methods like OntModel m = ModelFactory.createOntologyModel

Re: RDF or OWL

2015-08-20 Thread Rob Walpole
You will need use an OntModel if you want to instantiate your OWL classes. I assume your vocabulary is actually based on OWL, i.e. all your classes are subclasses of owl:Thing - so if you want to use these in your Java code - perhaps to write queries - you will need to instantiate them something li

Re: JENA code or SPARQL

2015-08-20 Thread Rob Walpole
You probably want to do both. Write your SPARQL queries - either in Jena ARQ or in text files which you post to Jena Fuseki (depending on your set up) - and then load the results into a Model to extract the bits of information you need. Rob Rob Walpole Email robkwalp...@gmail.com Tel. +44 (0)7969

Re: JENA code or SPARQL

2015-08-20 Thread Martynas Jusevičius
Kumar, >From my experience, if you only have a single triple patter like ?s ?o or ?s , then the Model API might be more convenient. But when you start combining them, and especially having optional patterns, it's a good sign that it's time to move on to SPARQL. Martynas graphityhq.com On Thu,

Re: Fuseki over HTTPS?

2015-08-20 Thread Andy Seaborne
The Jetty documentation is the best place to go for details of setting up Jetty. Here's one in the examples/ area but as far as I can tell it's more int he category of "should work" (it is from Fuseki1 and that was a different version of Jetty) rather than tested. https://github.com/apache/j

Re: RDF or OWL

2015-08-20 Thread kumar rohit
Thank you but what about RDF models and classes? Is it replaced by OWL ? On Thu, Aug 20, 2015 at 11:52 AM, Rob Walpole wrote: > You will need use an OntModel if you want to instantiate your OWL classes. > I assume your vocabulary is actually based on OWL, i.e. all your classes > are subclasses o

Re: JENA code or SPARQL

2015-08-20 Thread kumar rohit
Thank you Martynas, it means SPARQL may be used as most of the queries multi-pattern and complex. On Thu, Aug 20, 2015 at 12:10 PM, Martynas Jusevičius wrote: > Kumar, > > From my experience, if you only have a single triple patter like ?s > ?o or ?s , then the Model API might be more > conven

Re: RDF or OWL

2015-08-20 Thread Rob Walpole
It's all RDF. OWL is expressed as RDF. I think perhaps you mean RDFS? If you have an OWL ontology then all of your classes are (at the deepest level) subclasses of owl:Thing. If you have created an RDFS vocabulary then all of your classes are subclasses of rdfs:Class. I'm guessing that you have cre

Re: RDF or OWL

2015-08-20 Thread Rob Walpole
Just a heads up that for more general Semantic Web question you should probably go somewhere like http://answers.semanticweb.com/ as this mailing list is Jena specific :) Rob Rob Walpole Email robkwalp...@gmail.com Tel. +44 (0)7969 869881http://www.linkedin.com/in/robwalpole On Thu, Aug 20, 201

Re: EmbeddedFusekiServer in Fuseki 2

2015-08-20 Thread Andy Seaborne
On 19/08/15 15:20, aj...@virginia.edu wrote: I don't know what you need an embedded server for, but if, by chance, it was for use supporting SPARQL endpoints in integration tests and you are using Maven, you can take a look here https://github.com/ocymum/trippi-sparql-update/blob/master/pom.xm

Typo in example

2015-08-20 Thread Martynas Jusevičius
https://jena.apache.org/documentation/notes/typed-literals.html#user-defined-non-xsd-data-types Public Boolean isEqual(LiteralLabel value1, LiteralLabel value2) { should be public boolean isEqual(LiteralLabel value1, LiteralLabel value2) { (notice the uppercase keywords)

What is the error in code

2015-08-20 Thread kumar rohit
import java.io.InputStream; import com.hp.hpl.jena.ontology.OntDocumentManager; import com.hp.hpl.jena.ontology.OntModel; import com.hp.hpl.jena.ontology.OntModelSpec; import com.hp.hpl.jena.query.Query; import com.hp.hpl.jena.query.QueryExecution; import com.hp.hpl.jena.query.QueryExecutionFactor

Re: What is the error in code

2015-08-20 Thread aj...@virginia.edu
This may or may not be the entire problem, but in the line: > String querystring="PREFIX ss: "WHERE {" + "?x ss:hasson ss:zia" + "}"; you opened the angle-brackets around your namespace without closing them. --- A. Soroka The University of Virginia

Re: Fuseki over HTTPS?

2015-08-20 Thread Jason Levitt
Which version of Jetty does Fuseki 2.30 (the latest version) use? J On Thu, Aug 20, 2015 at 6:14 AM, Andy Seaborne wrote: > The Jetty documentation is the best place to go for details of setting up > Jetty. > > Here's one in the examples/ area but as far as I can tell it's more int he > category

Re: Fuseki over HTTPS?

2015-08-20 Thread Andy Seaborne
On 20/08/15 21:24, Jason Levitt wrote: Which version of Jetty does Fuseki 2.30 (the latest version) use? J http://central.maven.org/maven2/org/apache/jena/jena-fuseki/2.3.0/jena-fuseki-2.3.0.pom ==> Jetty 9.1.1.v20140108 Andy On Thu, Aug 20, 2015 at 6:14 AM, Andy Seaborne wrote:

Re: What is the error in code

2015-08-20 Thread Andy Seaborne
On 20/08/15 21:19, aj...@virginia.edu wrote: This may or may not be the entire problem, but in the line: String querystring="PREFIX ss:

Re: Fuseki over HTTPS?

2015-08-20 Thread Jason Levitt
Thanks. So I can still use the "--jetty-config" option with Fuseki v2.30 ? J On Thu, Aug 20, 2015 at 3:46 PM, Andy Seaborne wrote: > On 20/08/15 21:24, Jason Levitt wrote: >> >> Which version of Jetty does Fuseki 2.30 (the latest version) use? >> >> J > > > http://central.maven.org/maven2/org/ap