Re: addliteral() vs setpropertyvalue()

2016-10-17 Thread Lorenz B.
Hello Tina, > I want to sum 5 with the value already stored in a property. > > //Property "Hours" must be started from 1 and then sum 5 with it. > employee.getPropertyValue(No_of_Hours); > //Then perform calculations. > > The problem is that if I directly use employee.getPropertyValue(), it gi

completion with Lucene: desirable from SPARQL

2016-10-17 Thread Jean-Marc Vanel
Hi I'm implementing an equivalent of dbPedia lookup service [1] in semantic_forms, leveraging on Lucene integration in TDB, and dbPedia mirror with TDB [2] . The dbPedia lookup service is really nice but: - the hosted service is often down - completion is in english only A lookup service

Re: How to implement the enumerated restriction?

2016-10-17 Thread Darko Androcec
Yes, I need this type of restriction. Thanks, Darko On 16.10.2016. 20:09, Dave Reynolds wrote: However, perhaps you mean that you want a qualified cardinality restriction where testObjectProperty is restricted to at most one out of the set #male and #female? The RDF for that is quite differ

Re: How to implement the enumerated restriction?

2016-10-17 Thread Darko Androcec
Hi Lorenz, do you know which RDF triples I need to manually add to achieve manually the wanted format? Thanks, Darko On 16.10.2016. 20:18, Lorenz Buehmann wrote: @Dave: Yes, that's also what I understand: He wants to get a qualified cardinality restriction on an object property such that

Re: How to implement the enumerated restriction?

2016-10-17 Thread Lorenz B.
Hello Darko, from the W3C recommendation [1]: to generate a class expression for qualified max. cardinality restriction on object property OPE: _:x rdf:type owl:Restriction . _:x owl:onProperty T(OPE) . _:x owl:maxQualifiedCardinality "n"^^xsd:nonNegativeInteger . _:x owl:onClass T(CE) . And t

Avoid trivial inferred subclass statements in RDFS simple regime

2016-10-17 Thread Lorenz B.
Hi, I'm using Apache Jena 3.1.0 for materialization by applying a reasoner and working on an InfModel, i.e. Reasoner reasoner = ReasonerRegistry.getRDFSSimpleReasoner(); InfModel infModel = ModelFactory.createInfModel(reasoner, rawModel); For my use case, the RDFS simple ruleset is fine, but th

Re: How to implement the enumerated restriction?

2016-10-17 Thread Darko Androcec
Thanks Lorenz, that was helpful for me, I solved it using your advice with the following code: Individual male = model.createIndividual(baseURI + "male", OWL.Thing); Individual female = model.createIndividual(baseURI + "female", OWL.Thing); RDFList enums = model.createList(); enums = enums.con

Re: Avoid trivial inferred subclass statements in RDFS simple regime

2016-10-17 Thread Dave Reynolds
Hi Lorenz, On 17/10/16 10:48, Lorenz B. wrote: Hi, I'm using Apache Jena 3.1.0 for materialization by applying a reasoner and working on an InfModel, i.e. Reasoner reasoner = ReasonerRegistry.getRDFSSimpleReasoner(); InfModel infModel = ModelFactory.createInfModel(reasoner, rawModel); For my

Concurrent read with unmatched optional clause causes exception in Jena 3.1.

2016-10-17 Thread Dick Murray
Hi. I'm getting odd behaviour in Jena when I execute the same query concurrently. The query has an optional which is unmatched but which appears to cause a java.lang.String exception from the atlas code. This only happens if multiple queries are submitted concurrently and closely. On a "fast" ho

Re: Avoid trivial inferred subclass statements in RDFS simple regime

2016-10-17 Thread Lorenz B.
Hello Dave, I see. Ok, then I will go with the adapted ruleset. Thank you. Cheers, Lorenz > Hi Lorenz, > > On 17/10/16 10:48, Lorenz B. wrote: >> Hi, >> >> I'm using Apache Jena 3.1.0 for materialization by applying a reasoner >> and working on an InfModel, i.e. >> >> Reasoner reasoner = Reason

Fuseki Query Optimization

2016-10-17 Thread Bardo Nelgen
Hi all, I am running attached CONSTRUCT query on Fuseki 2.4.0on a littletest graph of about 2,200 triples. But it takes around 16s to process an get the (desired…) result. Is this caused by the query construct’s complexity or did I accidentally miss any unnecessary recursion or n-ary in that

Re: Fuseki Query Optimization

2016-10-17 Thread Bardo Nelgen
Clarified the example structure. On 17/10/2016 13.40 Uhr, Bardo Nelgen wrote: Hi all, I am running attached CONSTRUCT query on Fuseki 2.4.0on a littletest graph of about 2,200 triples. But it takes around 16s to process an get the (desired…) result. Is this caused by the query construct’

Re: addliteral() vs setpropertyvalue()

2016-10-17 Thread tina sani
Yes its true that it returns Null Pointer Exception. But what you people suggest I suppose to do? One thing in my mind is to include first: employee.addLiteral(Property, 1) Then employee.getPropertyValue() Then Perform calculation/addition And last, employee.setPropertyValue(Property, sum/calculat

Re: Concurrent read with unmatched optional clause causes exception in Jena 3.1.

2016-10-17 Thread Andy Seaborne
Are you running with debug tracing on? Andy On 17/10/16 11:30, Dick Murray wrote: Hi. I'm getting odd behaviour in Jena when I execute the same query concurrently. The query has an optional which is unmatched but which appears to cause a java.lang.String exception from the atlas code. Th

Re: Fuseki Query Optimization

2016-10-17 Thread Andy Seaborne
Try running the pattern with "SELECT *" not as a CONSTRUCT. Thiswil show how many rows go intot he contruct and that's an indication of any unconnected parts in the query pattern. "SELECT (count(*) as ?COUNT)" is also useful. Andy On 17/10/16 15:49, Bardo Nelgen wrote: Clarified the

Re: Fuseki Query Optimization

2016-10-17 Thread Bardo Nelgen
Thanks. :-) On 17/10/2016 19.20 Uhr, Andy Seaborne wrote: Try running the pattern with "SELECT *" not as a CONSTRUCT. Thiswil show how many rows go intot he contruct and that's an indication of any unconnected parts in the query pattern. "SELECT (count(*) as ?COUNT)" is also useful. An

marklogic-jena 1.0.2 and 3.0.2 released

2016-10-17 Thread Charles Greer
Hi Jena enthusiasts, I'd like to let you all know that new versions of marklogic-jena are available. The 1.0.2 and 3.0.2 releases are much improved with regard to graph modification (adding and removing triples from graphs). Thanks to Andy for helping me understand the internals of GraphView.

Re: Selectbuilder

2016-10-17 Thread Todd Detwiler
Thank you very much Claude. I see the ticket says that it has been fixed. I will grab the latest and give it a test. Cheers, Todd Landon Todd Detwiler Structural Informatics Group (SIG) University of Washington phone: 206-351-7721 On 10/15/16 2:33 AM, Claude Warren wrote: Opened defect https

Read-only (Ont)Model

2016-10-17 Thread Martynas Jusevičius
Hey, I am looking for a way to either a) clone an OntModel in a performant way b) make OntModel instance in OntDocumentManager read-only The use case goes like this: JAX-RS retrieves an OntModel instance from OntModel manager per each request, adds to it or changes it, and discards it after the r

Re: Read-only (Ont)Model

2016-10-17 Thread Martynas Jusevičius
This is Jena 3.0.1 by the way. On Mon, Oct 17, 2016 at 9:36 PM, Martynas Jusevičius wrote: > Hey, > > I am looking for a way to either > a) clone an OntModel in a performant way > b) make OntModel instance in OntDocumentManager read-only > > The use case goes like this: JAX-RS retrieves an OntMod

Re: Concurrent read with unmatched optional clause causes exception in Jena 3.1.

2016-10-17 Thread Dick Murray
Hi. On 17 Oct 2016 18:16, "Andy Seaborne" wrote: > > Are you running with debug tracing on? No, should I and what should I look for..? > > Andy > > > On 17/10/16 11:30, Dick Murray wrote: >> >> Hi. >> >> I'm getting odd behaviour in Jena when I execute the same query >> concurrently. >> >>

Re: Read-only (Ont)Model

2016-10-17 Thread Claude Warren
You could look at the jena permissinos layer. Using that you can make the underlying Model read only. If you want to make the OntModel read only I think you could create the OntDocumentManager and get the Model and wrap it with the permissions layer and then put it back in the OntDocumentManager.

Re: Selectbuilder

2016-10-17 Thread Claude Warren
You should be able to grab 3.1.1-SNAPSHOT and use that with 3.1.0 On Mon, Oct 17, 2016 at 7:54 PM, Todd Detwiler wrote: > Thank you very much Claude. I see the ticket says that it has been fixed. > I will grab the latest and give it a test. > Cheers, > Todd > > Landon Todd Detwiler > Structural

Re: Concurrent read with unmatched optional clause causes exception in Jena 3.1.

2016-10-17 Thread Andy Seaborne
On 17/10/16 21:13, Dick Murray wrote: Hi. On 17 Oct 2016 18:16, "Andy Seaborne" wrote: Are you running with debug tracing on? No, should I and what should I look for..? I asked because that point in the code ... >>> [java] org.apache.jena.atlas.iterator.Iter.asString(Iter.java:47

Re: Concurrent read with unmatched optional clause causes exception in Jena 3.1.

2016-10-17 Thread Dick Murray
On 17 Oct 2016 21:33, "Andy Seaborne" wrote: > > > > On 17/10/16 21:13, Dick Murray wrote: >> >> Hi. >> >> On 17 Oct 2016 18:16, "Andy Seaborne" wrote: >>> >>> >>> Are you running with debug tracing on? >> >> >> No, should I and what should I look for..? > > > I asked because that point in the co

Re: Read-only (Ont)Model

2016-10-17 Thread Dave Reynolds
If you are using rules then they are likely to be a significant part of the overhead of accessing the cloned model. In which case it would make sense to materialize your OntModel as a no-inference OntModel and then copy that whenever you need to. That will mean that if you update your cloned c

Re: Read-only (Ont)Model

2016-10-17 Thread Martynas Jusevičius
Dave, I realized I mis-used "read-only" in b). I want to make changes, but only in the throw-away per-request Model. I am currently testing such version: return ModelFactory.createOntologyModel(ontModelSpec, ModelFactory.createUnion(ModelFactory.createDefaultModel(), ontModel.getBas

Re: Concurrent read with unmatched optional clause causes exception in Jena 3.1.

2016-10-17 Thread Dick Murray
On 17 Oct 2016 21:33, "Andy Seaborne" wrote: > > > > On 17/10/16 21:13, Dick Murray wrote: >> >> Hi. >> >> On 17 Oct 2016 18:16, "Andy Seaborne" wrote: >>> >>> >>> Are you running with debug tracing on? >> >> >> No, should I and what should I look for..? > > > I asked because that point in the co

Re: Read-only (Ont)Model

2016-10-17 Thread Dave Reynolds
Hi Martynas, On 17/10/16 21:51, Martynas Jusevičius wrote: Dave, I realized I mis-used "read-only" in b). I want to make changes, but only in the throw-away per-request Model. I am currently testing such version: return ModelFactory.createOntologyModel(ontModelSpec, ModelFactory.