Re: Problems when querying the SPARQL with Jena

2024-03-12 Thread Steve Vestal
Which line of this code is raising the exception?  When I look at the ResultSetFormatter API online, I see 9 signatures for the out method, only 2 of which have three parameters, where the third parameter is a PrefixMapping or Prologue but not a Query.  The only one with a Query parameter is

Re: Problem running AtomGraph/fuseki-docker

2023-12-06 Thread Steve Vestal
lem. Martynas On Wed, 6 Dec 2023 at 21.05, Steve Vestal wrote: I am running a VM with Microsoft Windows Server 2019 (64-bit). When I try to stand up the docker server, I get $ docker run --rm -p 3030:3030 atomgraph/fuseki --mem /ds String '/C:/Program Files/Git/ds' not valid as 'service' Suggestions?

Problem running AtomGraph/fuseki-docker

2023-12-06 Thread Steve Vestal
I am running a VM with Microsoft Windows Server 2019 (64-bit). When I try to stand up the docker server, I get $ docker run --rm -p 3030:3030 atomgraph/fuseki --mem /ds String '/C:/Program Files/Git/ds' not valid as 'service' Suggestions?

Re: How to reconstruct a Literal from a SPARQL SELECT row element?

2023-10-26 Thread Steve Vestal
A toString() buried down in the code was it.  Simple to add the datatypeURI.  Thanks! On 10/26/2023 7:48 AM, Andy Seaborne wrote: On 26/10/2023 10:17, Steve Vestal wrote: What is the best way to reconstruct a typed Literal from a SPARQL SELECT result? I have a SPARQL SELECT query issued

Re: How to reconstruct a Literal from a SPARQL SELECT row element?

2023-10-26 Thread Steve Vestal
ote: You need Model::createTypedLiteral https://jena.apache.org/documentation/notes/typed-literals.html#basic-api-operations On Thu, 26 Oct 2023 at 12.24, Steve Vestal wrote: If I reconstruct using Literal dataLiteral = resultGraph.createLiteral(objectDataValue); it always says the typ

Re: How to reconstruct a Literal from a SPARQL SELECT row element?

2023-10-26 Thread Steve Vestal
If I reconstruct using      Literal dataLiteral = resultGraph.createLiteral(objectDataValue); it always says the type is string     1^^xsd:string     stringB^^ xsd:string     123.456^^xsd:string     2023-10-06T12:05:10Z^^xsd:string On 10/26/2023 4:17 AM, Steve Vestal wrote: What is the best

How to reconstruct a Literal from a SPARQL SELECT row element?

2023-10-26 Thread Steve Vestal
What is the best way to reconstruct a typed Literal from a SPARQL SELECT result? I have a SPARQL SELECT query issued against an OntModel in this way: QueryExecution structureRowsExec = QueryExecutionFactory.create(structureRowsQuery, owlOntModel); Here are some example triples in the

Re: General RDFDatatype factory?

2023-10-24 Thread Steve Vestal
Never mind, the doc simply high-lighted the class as a URL. Simple XSD is enough for now. On 10/24/2023 12:16 PM, Steve Vestal wrote: https://jena.apache.org/documentation/notes/typed-literals.html#xsd says "These are all available as static member variables

Re: General RDFDatatype factory?

2023-10-24 Thread Steve Vestal
; but that link is Not Found. On 10/24/2023 11:38 AM, Steve Vestal wrote: Is there a factory to create an RDFDatatype using a URL, e.g., http://www.w3.org/2001/XMLSchema#integer ? The closest I have found so far is javax.xml.datatype.DatatypeFactory, but that only supports a specific list.

General RDFDatatype factory?

2023-10-24 Thread Steve Vestal
Is there a factory to create an RDFDatatype using a URL, e.g., http://www.w3.org/2001/XMLSchema#integer ? The closest I have found so far is javax.xml.datatype.DatatypeFactory, but that only supports a specific list.

Re: In using RIOT I encounter the "64000" entity expansions error.

2023-10-12 Thread Steve Vestal
I couldn't resist trying https://purl.obolibrary.org/obo/foodon.owl as a stress test for what we are doing.  We're on Jena 4.5.0 and I'm getting Not in RDF/XML format due to exception org.apache.jena.riot.RiotException [line: 110334, col: 72] Invalid byte 2 of 2-byte UTF-8 sequence. Could

instanceof versus canAs

2023-08-25 Thread Steve Vestal
In some places I use e.g. (resource instanceof Individual) , but in others it seems I need resource.canAs(Individual.class).  If you have brief guidelines on when to use what, I would appreciate that.  A specific case is punning in an OntModel.  Is that a case where canAs(Individual.class) and

Re: How to get line and column for a RiotException?

2023-06-27 Thread Steve Vestal
s easiest to reconstruct if you have a small example program to run on various versions or small example data to feed into "riot". This area may have changed a bit and its hard to remember all the details.     Andy On 27/06/2023 15:19, Steve Vestal wrote: I am getting an org.apache.

How to get line and column for a RiotException?

2023-06-27 Thread Steve Vestal
I am getting an org.apache.jena.riot.RiotException: Bad character in IRI (space): , but I can't figure out how to get the line and column. The above is the complete getMessage() string.  Looking at a stack dump, the ErrorHandling Factory code   

Performance of rebinds after multiple changes?

2023-06-14 Thread Steve Vestal
The help pages say a rebind will happen automatically when things are added or removed to an OntModel (except odd cases).  I'm curious about the performance impact when a sequence of multiple changes are made.  Is the rebind itself fast, so a sequence of changes and rebinds has no significant

Re: Inference reasoner

2023-02-16 Thread Steve Vestal
heck if it works - remove created dataset(s) @Steve I'm sure we can apply the inference model by customising via Java but unfortunately I don't code in Java... Le jeu., févr. 9 2023 at 05:11:15 -0600, Steve Vestal mailto:steve.ves...@galois.com>> a écrit : Are you trying to issue a SPARQL que

Re: Inference reasoner

2023-02-09 Thread Steve Vestal
Are you trying to issue a SPARQL query against a knowledge base that includes inferred as well as explicitly asserted information, such as an inverse of an asserted property?  You can do this by issuing a query to an OntModel using QueryExecution.create(String queryStr, Syntax lang, Model

Re: Training offer for SPARQL

2023-01-13 Thread Steve Vestal
There is a series of SPARQL tutorials on youtube done by Stardog, https://www.youtube.com/results?search_query=Stardog+sparql  I haven't watched these, but a couple of videos they did about structuring queries to improve performance (or avoid really bad performance) I thought were  well-done.

Re: How to list OntModel Individual OntProperty triples?

2023-01-01 Thread Steve Vestal
think this is not what you want, but I can't think of why you would need this? Cheers, Lorenz On 31.12.22 17:45, Steve Vestal wrote: I am using Individual#listProperties (inherited Resource#listProperties) to get the property instances (triples) for Individuals in an OntModel.  This method returns an it

Re: listIndividuals versus listInstances

2023-01-01 Thread Steve Vestal
direct ))     .filterKeep( new UniqueFilter()); On 31.12.22 21:07, Steve Vestal wrote: Given an OntModel myModel and an OntClass myClass contained in myModel, the call myModel.listIndividuals(myClass) provides the expected list of Individuals that are members of myClass; but the call myClass.listIns

listIndividuals versus listInstances

2022-12-31 Thread Steve Vestal
Given an OntModel myModel and an OntClass myClass contained in myModel, the call myModel.listIndividuals(myClass) provides the expected list of Individuals that are members of myClass; but the call myClass.listInstances() doesn't list anything.  I am curious what the difference is between the

How to list OntModel Individual OntProperty triples?

2022-12-31 Thread Steve Vestal
I am using Individual#listProperties (inherited Resource#listProperties) to get the property instances (triples) for Individuals in an OntModel.  This method returns an iterator of Statements.  The statement objects are returned as ResourceImpl java objects, and the predicates are returned as

Re: Question about RDF Frames

2022-12-30 Thread Steve Vestal
r the root class only. Cheers, Lorenz On 29.12.22 15:31, Steve Vestal wrote: Below is an example from https://jena.apache.org/documentation/notes/rdf-frames.html (rewritten in ofn due to minor syntax error in example and my greater familiarity with ofn), with one minor addition.  I declared an object

Question about RDF Frames

2022-12-29 Thread Steve Vestal
Below is an example from https://jena.apache.org/documentation/notes/rdf-frames.html (rewritten in ofn due to minor syntax error in example and my greater familiarity with ofn), with one minor addition.  I declared an object property that is not used anywhere else.

Re: Link to rdf-frames documentation?

2022-12-03 Thread Steve Vestal
, 3 Dec 2022 at 15:33, Steve Vestal wrote: The javadoc link https://jena.apache.org/documentation/javadoc/how-to/rdf-frames.html is "not found on this server." Can someone point me to the documentation that details the functionality of listDeclaringProperties and listDeclaringClasses?

Link to rdf-frames documentation?

2022-12-03 Thread Steve Vestal
The javadoc link https://jena.apache.org/documentation/javadoc/how-to/rdf-frames.html is "not found on this server."  Can someone point me to the documentation that details the functionality of listDeclaringProperties and listDeclaringClasses?

Model#remove statement not working for me

2022-10-28 Thread Steve Vestal
I make a call model.remove(statement) for a statement that is listed in that model, but that statement stays listed. The following example code is a bit lengthy due to setup and alternatives tried, but it is executable (with Jena imports added).  I think this is a simple misunderstanding of

Re: Comparing sparql queries

2022-09-08 Thread Steve Vestal
The general query containment and equivalence problem is undecidable.  There is some work on doing this when restrictions are placed on the queries.  Here is one paper on the subject: https://hal.inria.fr/file/index/docid/691610/filename/RR-7942.pdf On 9/8/2022 3:54 AM, Rushikesh Halle wrote:

Re: Jean and java JRE

2022-07-27 Thread Steve Vestal
If you install a recent version of Eclipse using Oomph (the default way now), it should give you an option to select a version of OpenJDK.  I think it puts it in the .p2 repository.  You may have to adjust some preferences and properties (I am not a Maven maven), but you can bypass the Oracle

Re: Questions about OntModel compound document structure

2022-07-14 Thread Steve Vestal
it doesn't save the model, but getSubGraph will return that original graph.   It appears getImportModel will also sometimes create a new OntModel object/wrapper.  I'm starting to get the feeling wrapping models and graphs is not uncommon inside compound document structures. On 7/12/2022 3:25

Questions about OntModel compound document structure

2022-07-12 Thread Steve Vestal
I have a few questions about how to assemble a compound document structure.  I will use as a notional example     OntModel ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_MICRO_RULE_INF); The reasoner package javadoc shows     ReasonerFactory rf =

Java versions?

2022-05-15 Thread Steve Vestal
The download page says Jena requires Java 11.  Openllet for Jena 2.6 also just says Java 11 required.  Does that mean Java 11 or greater?  Is anyone using the latest Jena and Openllet with Java 17?  The Eclipse installer defaults to Java 14 for 2022-03, with higher versions available.  Any

Re: Store data in text/owl-functional format

2022-04-05 Thread Steve Vestal
via the owlapi reasoner interface. On 4/5/2022 4:52 AM, Mikael Pesonen wrote: Owlapi will work, thanks! On 04/04/2022 18.17, Steve Vestal wrote: I have done this manually using Protege (convert ofn to RDF/XML). You could also look at https://github.com/owlcs/owlapi/ On 4/4/2022 8:53 AM

Re: Store data in text/owl-functional format

2022-04-04 Thread Steve Vestal
I have done this manually using Protege (convert ofn to RDF/XML).  You could also look at https://github.com/owlcs/owlapi/ On 4/4/2022 8:53 AM, Mikael Pesonen wrote: Is it possible to send OWL in functional syntax to Jena? Fuseki says Unknown content type for triples: [text/owl-functional]

Re: OWL inferences in Apache Jena (for e.g. owl:allValuesFrom)

2021-12-05 Thread Steve Vestal
Which reasoner are you using?  Have you tried openllet (Pellet for Jena) to see if you get the desired result? Out of curiosity, what notation (ontology syntax) are you using here? On 12/5/2021 8:38 AM, Jakub Jałowiec wrote: Hi, I have an OWL ontology

Re: abox, tbox for owl in jena

2021-11-04 Thread Steve Vestal
Look at https://jena.apache.org/documentation/inference/, the parts that talk about base and ontology/schema models.  This might do what you want. On 11/4/2021 4:34 AM, Luis Enrique Ramos García wrote: Dear All, I found this information regarding the use of the so called ABox and TBox with a

Re: Suggestions for OWL_MEM_MICRO_RULE_INF ConcurrentModificationException?

2021-11-04 Thread Steve Vestal
PM, Dave Reynolds wrote: On 01/11/2021 17:18, Steve Vestal wrote: Thanks, this started me down the path to a solution. For the record, I searched through my code, and I could not find multiple threads accessing the model.  This was occurring during a SPARQL query of an OntModel.  Is it possible

Re: Suggestions for OWL_MEM_MICRO_RULE_INF ConcurrentModificationException?

2021-11-01 Thread Steve Vestal
h what they are doing with the old setup while new requests get the new view. Teh garbage collector wil reclaim space sometime after all the outstanding old operatiosn have finished.     Andy On 28/10/2021 13:26, Steve Vestal wrote: Does anyone have any suggestions on things to try to

Suggestions for OWL_MEM_MICRO_RULE_INF ConcurrentModificationException?

2021-10-28 Thread Steve Vestal
Does anyone have any suggestions on things to try to avoid a ConcurrentModificationException when using OWLReasoner.OWL_MEM_MICRO_RULE_INF?  Or what the potential consequences of that are?  (The below stack dump only goes back to where my code made the call, the full one is fairly lengthy and

Re: How to pun a URI?

2021-10-25 Thread Steve Vestal
Oops, my mistake, I left it hard-coded rather than parameterizing it correctly.  This does work for me. On 10/25/2021 2:14 AM, Dave Reynolds wrote: On 24/10/2021 20:33, Steve Vestal wrote: I tried the following.  All get a ConversionException. //public static final OntModelSpec

Re: How to pun a URI?

2021-10-25 Thread Steve Vestal
WL 1 language specification.  It does raise the question of whether the createOntologyModel result (that avoids the exception) would be fully sufficient for openllet reasoning. On 10/25/2021 2:14 AM, Dave Reynolds wrote: On 24/10/2021 20:33, Steve Vestal wrote: I tried the following.  All get a Conversio

Re: How to pun a URI?

2021-10-24 Thread Steve Vestal
= OntModelSpec.OWL_MEM_MICRO_RULE_INF;     //public static final OntModelSpec INFERENCE_RULES = OntModelSpec.OWL_MEM_MINI_RULE_INF;     //public static final OntModelSpec INFERENCE_RULES = OntModelSpec.OWL_LITE_MEM; On 10/24/2021 1:28 PM, Dave Reynolds wrote: On 24/10/2021 12:42, Steve Vestal wrote: I omitted

Re: How to pun a URI?

2021-10-24 Thread Steve Vestal
or class).” https://www.w3.org/TR/owl-guide/ On Sun, 24 Oct 2021 at 13.43, Steve Vestal wrote: I omitted a detail that seems to be important.   //OntModel m = ModelFactory.createOntologyModel();   OntModel m = ModelFactory.createOntologyModel

Re: How to pun a URI?

2021-10-24 Thread Steve Vestal
I omitted a detail that seems to be important.                    //OntModel m = ModelFactory.createOntologyModel();                    OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);                    String uri = "http://ex.org/A;;                 

How to pun a URI?

2021-10-20 Thread Steve Vestal
I am creating an OntClass but also want to pun that IRI, so that I have an Individual with that same IRI that can be a member of a class.  Here is an example of doing that in OFN (a class that contains itself, sort of but not really as I understand it), which works in Protege.    

Questions about listing equivalent things

2021-10-02 Thread Steve Vestal
There is a method OntClass#listEquivalentClasses that returns an extended iterator.  There is no corresponding method for an Individual, e.g. no Individual#listEquivalentIndividuals.  There is a method OntResource#listSameAs. In a test (Jena 3.17), classes that had been declared equivalent

Re: How to find line and column causing RiotException?

2021-09-28 Thread Steve Vestal
an exception, maybe it's the base URI passed to the parser and not in the data itself.     Andy On 25/09/2021 11:40, Steve Vestal wrote: I am getting the following exception in a large file, XML/RDF format. Is there a way to find out line and column?  A way to configure Jena Riot so it will let

How to find line and column causing RiotException?

2021-09-25 Thread Steve Vestal
I am getting the following exception in a large file, XML/RDF format.  Is there a way to find out line and column?  A way to configure Jena Riot so it will let me be unwise (not preferred, but it has happened). org.apache.jena.riot.RiotException: Code: 4/UNWISE_CHARACTER in PATH: The

Re: Reading JSON-LD

2021-08-08 Thread Steve Vestal
Thanks, progress is made.  I am new to JSON-LD.  I get the following error.  Why does it need to load something using one of the IRIs found in the *.jsonld file?  Is this like an import that I can turn off? org.apache.jena.riot.RiotException: loading remote context failed:

Reading JSON-LD

2021-08-08 Thread Steve Vestal
I am reading a file using the following: myModel.read(myInputStream, "JSON-LD"); I get an exception: org.apache.jena.riot.RiotException: [line: 1, col: 1 ] Content is not allowed in prolog.     at

Re: Questions about structure of an OntModel

2021-06-23 Thread Steve Vestal
: On 21/06/2021 18:46, Steve Vestal wrote: I am trying to understand, for an OntModel, the differences between the base model, an imported model, a sub-model, and a bound schema.  My use case is that I have a number of "imports" (actually sub-models I add myself) to an OntModel, on

Questions about structure of an OntModel

2021-06-21 Thread Steve Vestal
I am trying to understand, for an OntModel, the differences between the base model, an imported model, a sub-model, and a bound schema.  My use case is that I have a number of "imports" (actually sub-models I add myself) to an OntModel, one of which might have its content changed during use. 

Questions about punning

2021-06-14 Thread Steve Vestal
I'm starting to use OWL 2 punning some.  The OWL 2 New Features standard doesn't say a whole lot.  I would appreciate a recommendation if anyone knows a good tutorial on punning (in either the domain of OWL or humor, bonus points for jokes that meta-pun the two domains).  Here is my initial

Re: Jena / Fuseki / SPARQL performance (new to the tech)

2021-05-20 Thread Steve Vestal
Andy pointed at sequential OPTIONALs.  One example I have seen had nested OPTIONAL clauses to address a performance issue.  Might that be helpful here? On 5/20/2021 5:43 AM, Andy Seaborne wrote: On 20/05/2021 09:36, Martin Van Aken wrote: Andy, A big thanks for this - it gives me some

Re: SPARQL lite?

2021-05-18 Thread Steve Vestal
:36 PM, Andy Seaborne wrote: On Tue, May 18, 2021 at 3:59 PM Steve Vestal wrote: PubChemRDF, OSLC, and probably others define their own light-weight query protocol, conceptually similar to the Jena Graph interface.  I was curious if there exists, or there are moves afoot to propose

SPARQL lite?

2021-05-18 Thread Steve Vestal
PubChemRDF, OSLC, and probably others define their own light-weight query protocol, conceptually similar to the Jena Graph interface.  I was curious if there exists, or there are moves afoot to propose, a standard "SPARQL lite" or BGP query protocol, closer to the Jena Graph or StageGenerator

Re: Jena / Fuseki / SPARQL performance (new to the tech)

2021-05-06 Thread Steve Vestal
I asked about this topic awhile ago and received some very helpful pointers from this forum (thanks again!).  Here is the list I collected during some explorations: http://www.lotico.com/index.php/SPARQL_Query_Optimization_with_Pavel_Klinov

Re: ARQ start-up overheads?

2021-04-10 Thread Steve Vestal
It occurred to me, I am issuing the queries to an OntModel that is using openllet.  Perhaps the reasoner is doing some start-up work. On 4/10/2021 10:47 AM, Steve Vestal wrote: When doing some bench-marking, I ran the same query twice back-to-back.  The first time took about 4000ms, the second

ARQ start-up overheads?

2021-04-10 Thread Steve Vestal
When doing some bench-marking, I ran the same query twice back-to-back.  The first time took about 4000ms, the second about 700ms.  The difference remained with optimizations on or off. This seems to happen only on the first query, successive pairs of identical queries don't show this effect. 

Re: Suggestions for learning more about SPARQL query performance?

2021-04-06 Thread Steve Vestal
One more question.  What is the default interface used to query an InfModel?  Is a tailored StageGenerator used or a straight-up Graph or InfGraph interface? On 4/5/2021 11:39 AM, Steve Vestal wrote: Thanks. Are the following impressions sort of correct? If I have a moderately sizeable RDF

Re: Suggestions for learning more about SPARQL query performance?

2021-04-05 Thread Steve Vestal
it is the ARQ API that has optimization configuration options.Some initial experiments with a couple of ARQ Context settings resulted in little impact on a test query issued to a series of increasingly larger in-memory models.When/where are indexes created and used? Thanks for any insight. On 3/18/

Re: Suggestions for learning more about SPARQL query performance?

2021-04-05 Thread Steve Vestal
options.Some initial experiments with a couple of ARQ Context settings resulted in little impact on a test query issued to a series of increasingly larger in-memory models.When/where are indexes created and used? Thanks for any insight. On 3/18/2021 9:45 AM, Steve Vestal wrote: Thanks. I'm looking

Re: Suggestions for learning more about SPARQL query performance?

2021-03-18 Thread Steve Vestal
t it also goes into more depth around some of the core low level implementation details of SPARQL engines e.g. join types Rob On 18/03/2021, 14:20, "Andy Seaborne" wrote: On 17/03/2021 22:45, Steve Vestal wrote: > I'd like to dig a bit deeper into S

Re: Suggestions for learning more about SPARQL query performance?

2021-03-18 Thread Steve Vestal
the need for query authors to frame their queries appropriately but it also goes into more depth around some of the core low level implementation details of SPARQL engines e.g. join types Rob On 18/03/2021, 14:20, "Andy Seaborne" wrote: On 17/03/2021 22:45, Steve Vestal wr

Re: Suggestions for learning more about SPARQL query performance?

2021-03-18 Thread Steve Vestal
that already, generating and post-processing queries are steps in the overall algorithm.) On 3/18/2021 9:19 AM, Andy Seaborne wrote: On 17/03/2021 22:45, Steve Vestal wrote: I'd like to dig a bit deeper into SPARQL query performance, better understand how different query formulations affect that, how

Suggestions for learning more about SPARQL query performance?

2021-03-17 Thread Steve Vestal
I'd like to dig a bit deeper into SPARQL query performance, better understand how different query formulations affect that, how ARQ configuration parameters might be used to tune that.  Can anyone recommend a place to start reading beyond the SPARQL book and language definition?

Re: Efficient SPARQL query for RDF collections

2021-01-13 Thread Steve Vestal
I'm going to generalize this request a bit.  I earlier reported restructuring a query to get from 25 minutes to 90 ms, where I found the "Learning SPARQL" book to be helpful.  Do you know of any more detailed tutorial or guidelines focusing on performance issues, something that goes into a bit

Re: Java 8 or 11?

2021-01-06 Thread Steve Vestal
dependent. Is that your code or some other dependency?     Andy On 06/01/2021 13:25, Steve Vestal wrote: The issue has something to do with class loading the context, which apparently is done differently in an osgi bundle.  See, e.g., http://www.descher.at/descher-vu/2019/01/java-11-jaxb-and-osgi

Re: Java 8 or 11?

2021-01-06 Thread Steve Vestal
The issue has something to do with class loading the context, which apparently is done differently in an osgi bundle.  See, e.g., http://www.descher.at/descher-vu/2019/01/java-11-jaxb-and-osgi/ On 1/6/2021 7:11 AM, Andy Seaborne wrote: On 05/01/2021 22:46, Steve Vestal wrote: Support

Re: Java 8 or 11?

2021-01-05 Thread Steve Vestal
Support for JAXB was removed from Java11.  For those using that and Jena in osgi bundles (e.g., Eclipse plugins), my impression from some initial experimenting and searching is that a bit of wizardry is needed to add that on the side and get it working.  I could not find a clean and simple

Re: How to getDerivation from Openllet?

2020-12-28 Thread Steve Vestal
= ((PelletInfGraph)g).entails(t); On 27.12.20 15:13, Steve Vestal wrote: When I create an OntModel using OntModelSpec.OWL_DL_MEM_RULE_INF, InfGraph#getDerivation returns a derivation.  When I switch to PelletReasonerFactory.THE_SPEC (the only choice), I get a null result.  I have tried setDerivationLogging

How to getDerivation from Openllet?

2020-12-27 Thread Steve Vestal
When I create an OntModel using OntModelSpec.OWL_DL_MEM_RULE_INF, InfGraph#getDerivation returns a derivation.  When I switch to PelletReasonerFactory.THE_SPEC (the only choice), I get a null result.  I have tried setDerivationLogging(true) on both the Reasoner and the InfGraph. 

Re: Curious about setProcessImports(false)

2020-12-24 Thread Steve Vestal
OK On 12/24/2020 11:59 AM, Andy Seaborne wrote: Steve - could you send this to the list please?  More OntModel experts there!     Andy On 24/12/2020 17:18, Steve Vestal wrote: What I did as part of exploring things was         Model baseModel = ModelFactory.createModelForGraph

Curious about setProcessImports(false)

2020-12-24 Thread Steve Vestal
I am doing my own import closure, and I saw some behaviors that I was a bit curious about.  For my own education, I'd appreciate any observations you might have. I call setProcessImports(false) when creating the document manager, but 1) my OntModel gets created as a UnionModel, and 2) a query

Re: Conversion exception, OntModel Individual is not an Individual or a Resource?

2020-12-20 Thread Steve Vestal
Jusevičius wrote: What are the properties of http://adventiumlabs.com/ontology/fhowl/structuresintwoclasses#memBusEquiv_si8 ? On Sun, 20 Dec 2020 at 19.11, Steve Vestal wrote: I am getting an exception that a Resource cannot convert to an Individual in a list of Individuals, even when I'm iterating over

Conversion exception, OntModel Individual is not an Individual or a Resource?

2020-12-20 Thread Steve Vestal
I am getting an exception that a Resource cannot convert to an Individual in a list of Individuals, even when I'm iterating over it as a list of Resources. Here is the code, where ontModel is an OntModel and resourceClass is an OntClass.         ExtendedIterator resourceIterator =

Re: Dynamic FROM models?

2020-12-05 Thread Steve Vestal
essentially the same? Which is preferred from a scalability perspective, TDB or TDB2? I expect to primarily be doing queries, with few if any updates. On 12/5/2020 1:06 PM, Andy Seaborne wrote: Hi Steve, On 04/12/2020 16:09, Steve Vestal wrote: I'm wondering how to best issue SPARQL queries

Pellet reasoner?

2020-11-24 Thread Steve Vestal
A search turns up several pages on using Pellet with Jena, some appearing fairly out-of-date.  What is the current recommended approach?  https://github.com/Galigator/openllet? Also, eventually I will want to try this on a model backed by a TDB2 data set.  Is the performance reasonable even for

How to wrap external data source as an OntModel?

2020-10-12 Thread Steve Vestal
I would like to make an external non-RDF data source visible as an OntModel (read-only for me).  The page https://jena.apache.org/documentation/rdf/ mentions doing such things, but I haven't found anything more specific about how to do it.  The RDF tutorial mentions that the Model method

Literal, variable, resource in one object?

2020-06-09 Thread Steve Vestal
I'm curious if there is an elegant, Jena-style way to do the following (which can be done pragmatically in many ways). I'd like to have a single object that can be any of a literal, a variable, or a resource in a specific model. RDFNode can be either a literal or a resource in a specific model.

Re: Question about OPTIONAL, FILTER, nesting, and ordering

2020-05-14 Thread Steve Vestal
a row? On 5/13/2020 3:44 AM, Richard Cyganiak wrote: > Hi Steve, > >> On 12 May 2020, at 22:19, Steve Vestal >> wrote: >> >> DuCharme's book says that the order of OPTIONALs matters, in the sense >> that if bindings have been done by an OPTIONAL, then later OPT

Question about OPTIONAL, FILTER, nesting, and ordering

2020-05-12 Thread Steve Vestal
DuCharme's book says that the order of OPTIONALs matters, in the sense that if bindings have been done by an OPTIONAL, then later OPTIONALs will have no effect if any variables they might bind have already been bound (so order of OPTIONALs can affect query results).  What prompted this query (no

Re: OWL.Thing as an OntClass?

2020-05-01 Thread Steve Vestal
ntModel m = ... > OntClass owlThing = m.createClass(OWL.Thing.getURI()); > > or > > OntClass owlThing = (OntClass) m.createOntResource( OntClass.class, > null, OWL.Thing.getURI()); > > On 29.04.20 01:30, Steve Vestal wrote: >> OWL.Thing is a Resource.  The OWL standard

OWL.Thing as an OntClass?

2020-04-28 Thread Steve Vestal
OWL.Thing is a Resource.  The OWL standard says "Declaration( Class( owl:Thing ) ) " is a declaration of this built-in entity, but a class cast (OntClass) OWL.Thing fails.  The following also fails. Resource owlThing = OWL.Thing; OntClass classThing = owlThing.as(OntClass.class); Is there a way

Advice on RDFS versus OWL DL, OntModel Profiles?

2020-04-19 Thread Steve Vestal
I have some owl:Ontology documents from different sources.  One uses rdfs:Class and the other owl:Class.  When I glance at the standards, it says these are equivalent in OWL Full but not in OWL DL.  There is a discussion about this in the section "Ontology languages and the Jena Ontology API" in

Questions about blank nodes in SPARQL queries

2020-03-01 Thread Steve Vestal
I am using the results of one SPARQL query against an OntModel to construct follow-on SPARQL queries.  The OntModel contains blank nodes to denote some classes and individuals.  QueryResult gives me RDFNodes, and I am using methods such as RDFNode#as(Class) to obtain more specific classifications

Re: SPARQL performance question

2020-02-27 Thread Steve Vestal
ILTER(!sameTerm(?rightA,?connectionBB) && !sameTerm(?rightB,?connectionBB) && !sameTerm(?leftB,?connectionBB) && !sameTerm(?leftA,?connectionBB) && !sameTerm(?connectionBA,?connectionBB) && !sameTerm(?connectionAA,?connectionBB) && !sameTerm(?connectionAB,?con

Re: SPARQL performance question

2020-02-26 Thread Steve Vestal
ain for everyone's help. On 2/25/2020 12:33 PM, Andy Seaborne wrote: > Current is 3.14.0. > > On 25/02/2020 17:38, Steve Vestal wrote: >> I'm currently using 3.8.0 jars. >> >> On 2/25/2020 11:30 AM, Andy Seaborne wrote: >>> >>> >>> On 25/02/2020

Re: SPARQL performance question

2020-02-25 Thread Steve Vestal
I'm currently using 3.8.0 jars. On 2/25/2020 11:30 AM, Andy Seaborne wrote: > > > On 25/02/2020 16:25, Steve Vestal wrote: >> I read that chapter in DuCharme's book and have some things to try, such >> as moving the rdf:type triples around and fragmenting that single

Re: SPARQL performance question

2020-02-25 Thread Steve Vestal
capable of delivering the results but doesn't actually >> evaluate the query and produce any results until you call >> hasNext()/next().  When you call either of these methods then ARQ >> does the minimum amount of work to return the next result (or batch >> of results) depending

Re: SPARQL performance question

2020-02-24 Thread Steve Vestal
Responses and questions inserted... On 2/24/2020 3:02 AM, Dave Reynolds wrote: > On 23/02/2020 23:11, Steve Vestal wrote: >> If I comment out the FILTER clause that prevents variable aliasing, the >> query is processed almost immediately.  The number of rows goes from 192 >>

Re: SPARQL performance question

2020-02-23 Thread Steve Vestal
leHardware     && ?leftB!=?rightA && ?leftB!=?rightB && ?leftB!=?singleHardware     && ?rightA!=?rightB && ?rightA!=?singleHardware     && ?rightB!=?singleHardware) } On 2/23/2020 1:54 PM, Marco Neumann wrote: > a copy o

SPARQL performance question

2020-02-23 Thread Steve Vestal
I'm looking for suggestions on a SPARQL performance issue.  My test model has ~800 sentences, and processing of one select query takes about 25 minutes.  The query is a basic graph pattern with 9 variables and 20 triples, plus a filter that forces distinct variables to have distinct solutions

Re: How to iterate over SELECT solutions?

2020-02-03 Thread Steve Vestal
I correct myself, a stupid rather than a beginner's question. On 2/3/2020 10:29 AM, Martynas Jusevičius wrote: > Use > > while (selectResult.hasNext()) > > instead? > > On Mon, Feb 3, 2020 at 5:25 PM Steve Vestal > wrote: >> A beginner's question. I

How to iterate over SELECT solutions?

2020-02-03 Thread Steve Vestal
A beginner's question.  I would like to iterate over all the solutions from a select query.  If I execute         QueryExecution qexec = QueryExecutionFactory.create(mySelectQuery, myModel);         ResultSet selectResult = qexec.execSelect();         String results =

Re: How to enter OWL cardinality restrictions?

2020-01-18 Thread Steve Vestal
isn't available via Ontology API. >> >> >> [1] >> https://github.com/apache/jena/blob/master/jena-core/src/main/java/org/apache/jena/ontology/impl/OWLProfile.java#L166-L172 >> >> >> [2] >> https://jena.apache.org/documentation/ontology/#

Re: Question about multiple OntModel reads

2019-12-08 Thread Steve Vestal
Never mind, I think using OntDocumentManager#addModel(docURI, model) together with other import machinery does what I wanted. On 12/6/2019 7:56 AM, Steve Vestal wrote: > Thanks, Dave.  Here are a few more questions. > > I'm looking at > https://jena.apache.org/documentation/ontolo

Re: Question about multiple OntModel reads

2019-12-06 Thread Steve Vestal
reasoners?  Or is this just asking for trouble? (Calling them OntModels without reasoners captures the intent better.) On 10/23/2019 2:42 AM, Dave Reynolds wrote: > On 23/10/2019 03:16, Steve Vestal wrote: >> The description at https://jena.apache.org/documentation/ontology/ talks >>

Question about adding sub-models

2019-11-24 Thread Steve Vestal
If I had three OntModels, each with their own OntDocumentManager, FileManager, and choice of reasoner,         OntModel ontoA         OntModel ontoB         OntModel ontoCommon and I then do the following         ontoA.addSubModel(ontoCommon)         ontoB.addSubModel(ontoCommon) how is

Question about multiple OntModel reads

2019-10-22 Thread Steve Vestal
The description at https://jena.apache.org/documentation/ontology/ talks about reading an ontology in as the base graph.  Import closure puts each imported ontology into its own graph to produce a "compound document."  What happens if I read more than one ontology into the same OntModel?  Are they

  1   2   >