Re: SPARQL-query to get data from wikidata not working

2020-01-28 Thread Lorenz B.
Comments and debugging notes inline On 1/28/20 9:58 AM, Andy Seaborne wrote: > > > On 28/01/2020 07:50, Lorenz Buehmann wrote: >> Yes, the intermediate result is large, I tried it on CLI: >> >> |bin/rsparql --service https://query.wikidata.org/sparql "select * >> {?wikidata_link

Re: Combining inferences from GRR and RDFS or OWL reasoner

2019-07-21 Thread Lorenz B.
Ehm, is this supposed to be SPAM? I remember that you also made this same weird suggestion in a previous thread without given any background why. And I still don't understand what Executable English is supposed to be ... I never heard about anybody using it nor do I think that any customer will

Re: How does one restore a TDB Back-up file created via Apache Jena Fuseki...

2019-07-17 Thread Lorenz B.
iirc, backups are compressed n-quads (.nq.gz) located in $FUSEKI_BASE/backups/ All you (should) have to do is, using tdbloader. > Hi guys! > How does one restore a TDB Back-up file created via Apache Jena Fuseki > utility screen? > > I created a TDB Back-up via: > Apache Jena Fuseki -- >

Re: issue installing jena 3 in windows 8

2019-07-15 Thread Lorenz B.
Hello, just as a general comment, Jena artifacts are published in the official Maven repo. No need to build from source or download them manually if your project uses Maven, Ivy or SBT. Can you please explain how you want to use Jena? - From Java? If so, is it a Maven project? - From CLI? If so,

Re: TDBTransactionException: Not in a transaction

2019-07-08 Thread Lorenz B.
Not that I could help here that much, but is there a reason for migrating from a and old version (2017-12) to a less old version (2018-09)? I mean, latest release is 3.12.0. Maybe this might already fix your problem? > Hi all, > > I am migrating my Apache Jena Fuseki from version 3.6.0 to

Re: UUID vs compact id

2019-07-03 Thread Lorenz B.
> On Tue, 2 Jul 2019 at 17.06, Siddhesh Rane wrote: > >> Just out of curiosity, RDF is mostly for semantic data that has some >> meaning. >> If you are quring using keys that are essentially random strings, >> would it not be more suitable to use a relational database? No or better said, not sure

Re: Jena Model is serializable in Java?

2019-07-03 Thread Lorenz B.
t;> parse individually, and finally union them all. >>> That sounds more like a stream usage. >>> >>> Jena's StreamRDF and collect to a set (model or graph don't sound like >>> they do anything for your application - sound like you are just using >>

Re: JENA Loader Benchmarks

2019-06-15 Thread Lorenz B.
Hi Marco, that reminds me of a previous discussions in Nov./Dec. 2017, one regarding general performance titled "tdb2.tdbloader performance" [1, 2] and then as followup, "Report on loading wikidata" [3]. Maybe you can also have a look at it, some people like Dick and Andy also did some kind of

Re: Jena Model is serializable in Java?

2019-06-06 Thread Lorenz B.
I don't see why one would want to share Model instances via Spark. I mean, it's possible via wrapping it inside an object which is serializable or some other wrapper method: object ModelWrapper extends Serializable { lazy val model = ... } rdd.map(s => ModelWrapper.model. ... ) This makes the

Re: application/sparql-results+json,*/* Accept header returns XML

2019-05-31 Thread Lorenz B.
Hello Mikael,  JSON Format is for SELECT and ASK. CONSTRUCT creates an RDF graph, the crrect format would be JSON-LD here. > > Here is the exact query > > curl -H "Accept: application/sparql-results+json, */*" >

Re: Documentation/tutorial on using dates in Jena rules with GenericRuleReasoner

2019-05-18 Thread Lorenz B.
; (?conference <http://test.org/status> <http://test.org/DeadlinePassed>)]";|| || ||    List rules = Rule.parseRules(rule);|| ||    Reasoner reasoner = new GenericRuleReasoner(rules);|| ||    Model infModel = ModelFactory.createInfModel(reasoner, m);|| ||    infModel.write(System.out, "N-Tr

Re: inferencing in arq

2019-05-10 Thread Lorenz B.
; I haven’t coded up the test in Java - was using ARQ to validate my > SPARQL understanding first. Is it not possible to apply different > reasoners through ARQ? If not, I can start coding up these tests in Java. > > Thanks, > > _howard  > > > On May 8, 2019 at 1

Re: pattern matching and extraction function on strings in syntaxARQ

2019-04-24 Thread Lorenz B.
Or maybe even more simple |BIND(REPLACE(STR(?url),".*/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/.*","$1") AS ?email)| >> BIND (REPLACE(STR(?s),"[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+","$0") AS ?email) > replaces the matching email address by the email address itself, so it's > the same as before. > > You need

Re: pattern matching and extraction function on strings in syntaxARQ

2019-04-24 Thread Lorenz B.
> BIND (REPLACE(STR(?s),"[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+","$0") AS ?email) replaces the matching email address by the email address itself, so it's the same as before. You need to replace everything else by the email address, replace is not an "extract" function, you can try BIND

Re: [GenericRuleReasoner] inner workings

2019-03-13 Thread Lorenz B.
I don't see how this link to some code example to some whatever online service answers his question...can you explain this please a bit more? I mean, if I understood correctly, Marco was asking for some rule engine that can be combined with Apache Jena. So, I'd expect something like Drools engine

Re: bottom-up semantics

2019-02-02 Thread Lorenz B.
> ?loc :workLocationVolume ?bvol .?loc :locatedInWork ex:Work1 ; >:startVolume ?startvol . > FILTER ((?bvol = ?volnum && NOT EXISTS {?loc :workLocationEndVolume > ?evol}) || (?bvol <= ?volnum && EXISTS {?loc :workLocationEndVolume > ?evol FILTER (?evol <= ?volnum)})) > > In terms of

Re: Text search from sparql

2019-01-22 Thread Lorenz B.
Can't reproduce this. With the config file I shared with you, it works for me as expected with Fuseki 3.10.0 Which config file do you use now? > > On 22/01/2019 16:17, vincent ventresque wrote: >> Hello >> >> If the configuration folder is empty, the run/config.ttl (default >> file) should be

Re: Text search from sparql

2019-01-22 Thread Lorenz B.
26606]: at > org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:104) > Jan 22 16:01:23 semantic-dev java[26606]: at > org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67) > Jan 22 16:01:48 semantic-dev sudo[26629]:   mikael : TTY=pts/0 ; > PWD=/home/t

Re: Text search from sparql

2019-01-21 Thread Lorenz B.
Hello Mikael, attachments to not work so I'll post a config that works for me at the end of the message. You have to adopt the path for tdb:location and text:directory And as said before, you have to create the text index once. Note, as I also said in my previous response, your query will

Re: Text search from sparql

2019-01-18 Thread Lorenz B.
Hello Mikael, the config file should define 1)  the TDB dataset 2) the Lucene dataset that wraps the TDB dataset 3) the service should point to the Lucene dataset In addition, you have to run the text indexer once to create the Lucene index. Once this is done, you have to check the Lucene

Re: AW: List inherited properties

2019-01-09 Thread Lorenz B.
ont2.addProperty(thisProperty.getPredicate(), > thisProperty.getObject()); > > } > > *** > https://jena.apache.org/documentation/io/rdfxml_howto.html > > > Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit

Re: List inherited properties

2019-01-07 Thread Lorenz B.
Good Morning. Next time it would be better to show the Java code instead of the pseudo code to better see which models you're using and which method exactly you're calling to get the properties. Therefore, I'm just making guesses now (if those are wrong, any help from my side might/will probably

Re: Altering ARQ query to accept non-executed pattern

2018-11-30 Thread Lorenz B.
Just use angle brackets around the prefixed function, i.e.   FILTER((?something, "word")) it should be processed correctly by Virtuoso. On 11/30/18 10:40 AM, Rob Vesse wrote: > Assuming you are accessing over HTTP you can create an instance of > QueryEngineHTTP directly passing in the query as

Re: Query VALUES Variable Names

2018-11-08 Thread Lorenz B.
Hello Greg, I can understand that this is a bit misleading, but the methods you used just work for VALUES clause "outside" of the query pattern: |String ||queryString ||= ||"PREFIX dc: ||\n||"||+ ||"PREFIX : ||\n||"||+

Re: Filed to create Parser

2018-09-25 Thread Lorenz B.
How do you use Jena? Via Maven dependency? Which Jena version? Which Java version? > I am trying to execute sparql query in android studio using the following > code: > > OntModel model =null; > model =ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_RULE_INF); > AssetManager mgr =

Re: Problem with Tutorial11.java from "An Introduction to RDF and the Jena RDF API”

2018-09-24 Thread Lorenz B.
> // add the property > r.addProperty(RDFS.label, "11") > .addLiteral(RDFS.label, 11); I'm wondering whether the tutorial is correct here given the fact that the method addLiteral will handle argument 11 in the second call as a proper number and thus create a typed literal of type xsd:long, see

Re: Building a spatial index with jena/fuseki

2018-09-17 Thread Lorenz B.
> 1. I download the jena-spatial-3.8.0.jar and specify that in the classpath: > $ java -cp jena-spatial-3.8.0.jar jena.spatialindexer > --desc=../fuseki-server/run/configuration/mm.ttl > Error: Could not find or load main class jena.spatialindexer The documentation is a bit misleading I'd say.

Re: API in binary release?

2018-09-17 Thread Lorenz B.
Using Maven/Gradle would fetch sources and Javadoc automatically via IDEs like Eclipse, IntelliJ, etc. If you really want to import the JARs manually, you can get Javadoc from Maven repo [1]. Indeed, you have to do it for each module, e.g. "core", "arq", etc. in your classpath [1]

Re: android Jena

2018-09-15 Thread Lorenz B.
Did you really double-check the path to the file?! The exception > org.apache.jena.shared.NotFoundException: Not found: > file:///C:/Users/Toshiba/AndroidStudioProjects/MyApplication/app/sampledata/MallOntology.owl is clear enough. It might also be the case that once you run it as Android

Re: fuseki text:query : strange results + Lucene configuration

2018-09-12 Thread Lorenz B.
Hi "VV", well, for me it sounds more like you've found a bug and are now doing a workaround. Or at least something is strange and I'm just referring to "Order of triple patterns in a BGP" here. The order of triple patterns in a BGP shouldn't matter - as far as I know it's always a good old join

Re: Spatial Searches with SPARQL

2018-09-05 Thread Lorenz B.
Hello Kris, you're the one from the StackOverflow discussion [1] right? Good that you asked here for support. As I said, so far there is no GeoSPARQL support, but quite recently this was discussed with a possible future implementation from Greg Albiston here [2]. Cheers, Lorenz [1]

Re: Problem with MAX when no result expected

2017-10-08 Thread Lorenz B.
Hello George, right now it's really hard to help you. A complete query + sample data is missing to reproduce it. In addition, the second query seems to be an invalid SPARQL query - at least I don't see grouping by ?id and the other values are not aggregates. I don't think this is valid in

Re: SPARQL LOAD Error on Fuseki 3.4.0

2017-09-03 Thread Lorenz B.
That is exactly the issue with the Virtuoso serializer - Github tickets are still open. Now it means waiting or trying between the other serializers provided by Virtuoso. > Use the full URI. They aren't in the escapable set. > > Or the data needs to agree on %-encoding - which is not an escape >

Re: SPARQL vs Jena rules

2017-08-27 Thread Lorenz B.
Hello Baran, Kind regards, Lorenz > > I think statements like > > On Fri, 25 Aug 2017 11:52:46 +0200, Lorenz Buehmann > wrote: > >> Inferencing and querying are totally different >> things. So why are you thinking about refactoring the whole

Re: Data or Object properties as String value

2017-08-06 Thread Lorenz B.
hasPublications somepublication and then data property as string > publicationName "String value" > > On Sat, Aug 5, 2017 at 10:49 AM, Lorenz B. < > buehm...@informatik.uni-leipzig.de> wrote: > >> >>> For example, if we have to use filter keyword wi

Re: (Real) functions of construct query

2017-08-06 Thread Lorenz B.
What is the question now? A SPARQL CONSTRUCT query does graph pattern matching the the WHERE part similar to a SELECT query. The difference is that the result will be an RDF graph resp. a set of RDF triples. > Hello. > > I am not sure if the Sparql Construct query work works the same like we add

Re: Data or Object properties as String value

2017-08-05 Thread Lorenz B.
> For example, if we have to use filter keyword with a java variable (filter > ?var='javaVariable) in our semantic web application, is it mandatory to use > it as "data property" in our ontology and use it as String type? Obviously, but it depends on the content of javaVariable ... you can also

Re: Generic Rule Reasoning over Data using Jena Framework 3.1

2017-07-29 Thread Lorenz B.
ase such an example > would be data with a single individual (ideally expressed in turtle) > since the class and property declarations are irrelevant to this rule, > plus a simplified version of rule4 that still doesn't match but you > think it should. > > Dave > > >> Best

Re: Generic Rule Reasoning over Data using Jena Framework 3.1

2017-07-22 Thread Lorenz B.
Dave is absolutely right! According to the grammar of the Jena rules [1], which among others define nodes as /node/:= /uri-ref/// e.g. http://foo.com/eg or prefix:localname // e.g. rdf:type or // e.g. or ?/varname /// variable or 'a literal' // a plain string literal or 'lex'^^typeURI // a

Re: Construct query

2017-06-25 Thread Lorenz B.
As always, read the SPARQL 1.1 documentation [1] And to answer it, it generates exactly the data that you define in the first part of the CONSTRUCT query such that if there are variables those are bound in the WHERE part. [1] https://www.w3.org/TR/sparql11-query/#construct > Hi > > How a SPARQL

Re: Sparql Update: Insert a property whose value is a calculated average

2017-06-11 Thread Lorenz B.
t; > > PrintStream p= new PrintStream("yarab.owl"); > ontologyModel.writeAll(p, "RDF/XML", null); > p.close(); > > > > > > On Sat, Jun 10, 2017 at 8:32 AM, Lorenz B. < > buehm...@informatik.uni-leipzig.de> wrote: > >> That can't be.

Re: Sparql Update: Insert a property whose value is a calculated average

2017-06-10 Thread Lorenz B.
That can't be. I tried your example b.java with my query PREFIX rdf: PREFIX cv: INSERT { ?ass cv:recorded_speed ?avg . } WHERE { SELECT ?ass (AVG(?speed) AS ?avg)

Re: Web 3 vs Web 2

2017-06-05 Thread Lorenz B.
Wrong mailing list. And, from my point of view, you're more or less comparing apples with oranges ... > Greetings > > I want to ask how Semantic Web provides meaning to our data? How it differs > from the current web. > I will appreciate if some one provide with a simple examples: If we write >

Re: displaying of SPARQL Query results

2017-06-03 Thread Lorenz B.
ONAL {?subject ?prop ?object } > { ?property rdf:type owl:ObjectProperty } > {?prop rdf:type owl:ObjectProperty } > > } > My data doesn't have rdfs:label values. Is this the right way to extract > from the URIs? > > >

Re: displaying of SPARQL Query results

2017-06-02 Thread Lorenz B.
e URIs > The image I have attached is the result of my php code. Is there > anything that can be done in the query to just display the words > without the IRIs? > > On Fri, Jun 2, 2017 at 1:27 PM, Lorenz B. > <buehm...@informatik.uni-leipzig.de > <mailto:buehm...@infor

Re: displaying of SPARQL Query results

2017-06-02 Thread Lorenz B.
Not clear what you want, provide an example please. I don't want to run your PHP code...and I don't have your Fuseki server + your data. Note, RDF resources are identified by URIs, if you want something different, it's your task to do it in the SPARQL query. Either, a) select something like the

Re: Error when compiling Jena

2017-05-25 Thread Lorenz B.
[INFO] Total time: 03:54 min > [INFO] Finished at: 2017-05-25T11:45:33+01:00 > [INFO] Final Memory: 77M/831M > > > Laura's error could be down to maven : v3.0.5 is pretty old and there > have been various problems with 3.0.x for early x. I have 3.3.9. > >

Re: OWL2 Support in Jena

2017-05-25 Thread Lorenz B.
> Thanks Lorenz > > > What does it mean that "OWL2 support in Jena will be added in due course"? I don't know, probably it was planned to add full support but nobody did it until now. I guess this will never happen because for OWL there is already the OWL API which works perfectly on the OWL

Re: Error when compiling Jena

2017-05-25 Thread Lorenz B.
Interesting. I tried to reproduce this with the latest build [1] and my build even failed before the SPARQL Text Search ES module: [INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ jena-base --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 156 source files

Re: At which point should I consider using text-query indexes?

2017-05-23 Thread Lorenz B.
Without a fulltext index SPARQL string matching/containment operations might need a full scan of the data compared to the efficiency of datastructures like inverse lists etc. that are used in a fulltext index. > Yes I understand this, my problem is that I don't understand why/when would I > want

Re: At which point should I consider using text-query indexes?

2017-05-23 Thread Lorenz B.
The fullext index via Lucene is only used if you use the corresponding special predicate (which is non-standard SPARQL syntax) in your query: text:query e.g. in a query like (taken form the documentation): PREFIX text: PREFIX rdfs:

Re: Access Freebase resources

2017-05-16 Thread Lorenz B.
ike: > dbpedia.org/resource/calgary, can we use it for Freebase data source? > > On Tue, May 16, 2017 at 8:52 AM, Lorenz B. < > buehm...@informatik.uni-leipzig.de> wrote: > >> I do not understand, sorry. Can you clarify what data you have? And >> also, what you're trying to ach

Re: SPARQL to check if a specific URI exists

2017-05-15 Thread Lorenz B.
It depends on the definition of "existence" in an RDF graph. What if the URI resp. resource only occurs in the object position of a triple? Then you'd need something like this: ASK WHERE { { ?p ?o . } UNION {?s ?p . } } > Hello, > > I want to write a SPARQL query to attest the existence

Re: Access Freebase resources

2017-05-15 Thread Lorenz B.
I do not understand, sorry. Can you clarify what data you have? And also, what you're trying to achieve in general. > Hi Lorenz, I have just given links/URI to the DBpedia resource inside > Protege. > > On Mon, May 15, 2017 at 12:12 PM, Lorenz B. < > buehm...@informatik.uni

Re: Sparquling an entire collection (rdf:List)

2017-05-15 Thread Lorenz B.
As far as I remember, Jena has some custom built-ins to handle lists in RDF very easy [1] PREFIX list: SELECT ?member { ?x :p ?list . # Some way to find the list ?list list:member ?member . } The magic predicate is list:member [1]

Re: Access Freebase resources

2017-05-15 Thread Lorenz B.
Annotate what? And how do you use DBpedia in Protege? It's an in-memory ontology editor. > load the dataset and work on that > > Lorenz, can we annotate it inside Protege like we do DBpedia and then use > it in Jena? > > On Mon, May 15, 2017 at 11:34 AM, Lorenz B. < >

Re: Semantic web meta data

2017-05-07 Thread Lorenz B.
Or simply read the Wikipedia article ... > You might want to ask this question on a mailing list that is > dedicated to general discussion of such questions, like > semantic-...@w3.org. > > --- > A. Soroka > > Sidra shah wrote on 5/7/17 6:42 AM: >> Hi >> >> I do not know if it is relevant

Re: How to put one model in another

2017-05-02 Thread Lorenz B.
the model into > another model or something like this? > > On Mon, May 1, 2017 at 10:47 AM, Lorenz B. < > buehm...@informatik.uni-leipzig.de> wrote: > >>> Hi Dave, if we have a rule like >>> >>> if Person publications less than 10, Pers

Re: Would it make sense to use GraphQL with Fuseki as a backend?

2017-05-01 Thread Lorenz B.
Do you have any implementation for GraphQL on Jena? > Would it make sense to use GraphQL with Fuseki as a backend? > -- Lorenz Bühmann AKSW group, University of Leipzig Group: http://aksw.org - semantic web research center

Re: How to put one model in another

2017-05-01 Thread Lorenz B.
> Hi Dave, if we have a rule like > > if Person publications less than 10, Person is JuniorResearcher > if Person publications greater than 10, Person is SeniorResearcher > > If person publication is first less than 10, rules will assign him to > JuniorResearcher class but when it exceeds 10,

Re: Materialize query

2017-04-25 Thread Lorenz B.
Please understand that the term "materialised SPARQL queries" is not a common one, thus, probably nobody will be able to answer your question. So let me ask you, WHAT is a materialised SPARQL query and WHERE have you see this expression? > Hello > > What is materialized SPARQL queries and how it

Re: How to make complex SPARQL queries reusable?

2017-04-24 Thread Lorenz B.
I don't think that this is possible with the current implementation since a Function is supposed to return a single value and you'd need something that returns a set of values resp. bindings. Have you checked SPARQL SPIN [1]? Maybe this is something you could use. [1] http://spinrdf.org/ >

Re: Fuzzy Protege and Jena

2017-04-22 Thread Lorenz B.
f any plugin? > > > > On Sat, Apr 22, 2017 at 1:19 PM, Lorenz B. < > buehm...@informatik.uni-leipzig.de> wrote: > >> The ontologies created by the fuzzy OWL plugin in Protege are still OWL >> ontologies - they just add the fuzzy values to OWL annotation properties. &

Re: Fuzzy Protege and Jena

2017-04-22 Thread Lorenz B.
The ontologies created by the fuzzy OWL plugin in Protege are still OWL ontologies - they just add the fuzzy values to OWL annotation properties. > I am not sure if Jena classes/API supports Fuzzy ontologies in Protege? > Like we read an ontology in our application and query it using Jena syntax,

Re: SELECTing s properties in the same query

2017-04-15 Thread Lorenz B.
Blank node closure is non-trivial and not part of the SPARQL specs. That means, you either a) have to do some pre-processing of the data b) use some extensions, e.g. in Jena you can use a DESCRIBE query which supports blank nodes closure, see [1] (Note, that DESCRIBE returns an RDF graph instead

Re: Predicates with no vocabulary

2017-04-12 Thread Lorenz B.
The question is a bit unclear. If there is no existing vocabulary that you can resp. want to reuse, then you have to use your own vocabulary which basically just means to use your own URIs for the predicates. > I'd like to write some nquads using predicates that are not defined in any >

Re: Why we need Fuseki

2017-04-04 Thread Lorenz B.
Oh sorry. Well, I asked this question to Javed - I know why I'd need Fuseki such that I can query/update the RDF dataset by using SPARQL via the HTTP protocol. I only wanted to show him how much more things he need from his local Jena application to an remote SPARQL endpoint. But thank you anyway

Re: Jena + HDT

2017-04-04 Thread Lorenz B.
Well, I'm not that familiar with HDT, thus, I'm probably wrong. And I saw right now that they also provide some kind of indexing concept. Let's wait for response from Andy and/or Rob. (In the meantime, I'll play around with HDT and Jena today to get some more insights. ) >> Jena HDT is

Re: Jena + HDT

2017-04-03 Thread Lorenz B.
Jena HDT is in-memory, right? So at first you would need enough memory to load the data. I think this would also mean that there are no indexes create, thus, the query optimizer works different. For sure Andy S. and I guess also Rob V. (as far as I know he worked with HDT) can probably say more.

Re: Why we need Fuseki

2017-04-03 Thread Lorenz B.
Then let me ask you a question: Ok, so you said you have Jena and maybe loaded some data. How would you allow users on the web to access this data? How would you implement this? > Thank you Lorenz, I have read that website but unfortunately did not get > the concept. Let me try to read it again.

Re: Ontology Imports

2017-04-02 Thread Lorenz B.
Good catch! As Adam pointed out, you're using the read() method with a wrong second argument, i.e. when you use model.read(String url, String base) the second argument is the base IRI. What you probably want is to use the read() method with three arguments having the signature

Re: Jena Rules

2017-03-30 Thread Lorenz B.
ething like: > if (price>value) then create inst2 of type class2 and add text value to inst2 > Thanks > Abdul > > > > > From: Lorenz B. <buehm...@informatik.uni-leipzig.de> > To: users@jena.apache.org > Sent: Thursday, March 30, 2017 7:43 AM > Sub

Re: SPARQL Tutorial - Querying Datasets. Error : Unrecognized option: --graph

2017-03-27 Thread Lorenz B.
what do you set as classpath? It should link to the Jena libs, i.e. the *.jar files. > Hello, > > I am following the documentation on using sparql ... I am trying to learn > how to query datasets as per this link > http://jena.apache.org/tutorials/sparql_datasets.html > > under the title Example

Re: How to select an entity which has a property with a certain value?

2017-03-27 Thread Lorenz B.
4 is a shortcut for "4"^^ Does this literal really match your data? The property is correct? How to you process the resultset returned by the query? There might be several solutions depending on your dataset, thus, you have to iterate over the resultset.

Re: Limited HTTP API

2017-03-26 Thread Lorenz B.
I'm not aware of any option/flag in Jena that restricts the expressiveness of the SPARQL language such that a query will be rejected if it's beyond the configured SPARQL features. Probably Andy Seaborne knows more > This seems to be about securing data, or part of a graph. My data is actually >

Re: How to read a list?

2017-03-25 Thread Lorenz B.
@Andy As far as I understand the code, what you mentioned is just the first step to get some subject resource. And the findStatement() method is supposed to return the list, but it's not clear what he's doing in this method: val prop = findStatement(Bp2BatchCompanyIds, rec as Resource) > Hi -

Re: How to read a list?

2017-03-25 Thread Lorenz B.
According to your data it is in fact stored as RDFList. You could try to call obj.as( RDFList.class ) since RDFList is a subinterface of Resource. But I can't tell anymore without seeing method findStatement() > Hello! > > I have a Jena-based database with an individual batch in it. A batch

Re: Wikidata vs DBpedia

2017-03-20 Thread Lorenz B.
That question could be applied to any other thing in the world where two possible options exists... "why should I use A if I can do what I want already with B?" I'd suggest read more about Wikidata in your case, then it should be clear that Wikidata provides a totally different concept how the

Re: [MASSMAIL]Re: about TDB JENA

2017-03-20 Thread Lorenz B.
It totally depends on the reasoning that you want to apply. OWL 2 DL is not possible via simple rules, but for instance RDFS/OLW Horst and OWL RL can be doen via rule-based materialization. > I keep going into details, thank you for responding. > > Of the 13 million property assertions, almost

Re: about TDB JENA

2017-03-19 Thread Lorenz B.
> Is it possible to use some reasoner with RDF data, managed from TDB? Yes, see [1] > > Is it possible to manage an ontology in OWL2 from TDB? What means "manage"? In general you can load and query any RDF data into TDB. The serialization of an OWL ontology can be any RDF format. Obviously,

Re: How to remove an element from a list?

2017-03-16 Thread Lorenz B.
uld be impossible here. > It does compile, but I haven't tested it manually yet. > > Could you point me to an analog of > org.apache.jena.rdf.model.Statement#changeLiteralObject(...) for lists? > > Dmitri > > > > 16.03.2017, 12:18, "Lorenz B." <buehm...@

Re: How to remove an element from a list?

2017-03-16 Thread Lorenz B.
Ah sorry, I was wrong. You call remove on the RDFList object. According to the implementation, it should modify the current list object. Have you tried it out? Does it not work? >> Hello! >> >> I have an application, which creates an individual called batch. A batch has >> a list of company IDs

Re: How to remove an element from a list?

2017-03-16 Thread Lorenz B.
> Hello! > > I have an application, which creates an individual called batch. A batch has > a list of company IDs (strings). Add the property like this: > > open fun addCompanyIdsList( > batch: Resource, > companyIds: List, > model: Model) { > val

Re: Complex SPARQL Query

2017-03-15 Thread Lorenz B.
t:A_Swale "7"^^xsd:integer > > Any idea how to get the above output? > > Many thanks for your time, help and patience. > > Best regards, > > Izhar > > From: Lorenz B. [buehm...@informatik.uni-leipzig.de] > Sent: 14 March 2017

Re: OntoWiki with Jena

2017-03-14 Thread Lorenz B.
Shouldn't you ask this the OntoWiki developers? > > Hi, > > looks like OntoWiki supports MySQL and Virtuoso by default. Any change > getting it use Jena as db? > > Br, > Mikael > -- Lorenz Bühmann AKSW group, University of Leipzig Group: http://aksw.org - semantic web research center

Re: Complex SPARQL Query

2017-03-14 Thread Lorenz B.
KT ?gwkt. > > FILTER (geof:sfIntersects(?gwkt, "LINESTRING(-3.780833 53.203055, > -3.78 53.202777, -3.780833 53.20)"^^geosparql:wktLiteral)) >} > } > > } > > If you make two of the sub-queries comments then it retr

Re: Complex SPARQL Query

2017-03-09 Thread Lorenz B.
It's almost unreadable in the current formatting... At first, it would be good to see 1. the current SPARQL query 2. minimal sample data 3. the data that you expect to be returned I guess, the pseudo query is (please correct me if I'm wrong) "Which geographic feature contains the maximum

Re: Complex SPARQL Query

2017-03-09 Thread Lorenz B.
Attachments do not work on this mailing list. Please use HTML formatting or link to something like Pastebin or Gist if you're not able do make it readable here > My apologies... Please see attached the same question I sent in my last email > because the format of the tables in my last email was

Re: Error in rdfs rule

2017-03-09 Thread Lorenz B.
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> >> http://www.semanticweb.org/t/ontologies#Student >> <http://www.semanticweb.org/t/ontologies#Student> )] * >> >> On Thu, Mar 9, 2017 at 1:54 PM, Lorenz B. <buehm...@informatik.uni- >> leipzig.

Re: Error in rdfs rule

2017-03-09 Thread Lorenz B.
erStudent http://www.w3.org/2000/01/rdf-schema#subClassOf > #Student )" > > > + " -> (?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type > #Student )]"; > > On Thu, Mar 9, 2017 at 11:46 AM, Lorenz B. < > buehm...@informatik.uni-leipzig.de> wro

Re: Error in rdfs rule

2017-03-09 Thread Lorenz B.
ite these rules and > it will be inferred automatically? How it will be executed,? I have default > model with no parameters and then the inferred model. > Should I pass the "OntModelSpec.OWL_MEM_MICRO_RULE_INF " to the default > model? > > On Thu, Mar 9, 2017 at 10:14 AM, Lorenz

Re: Error in rdfs rule

2017-03-08 Thread Lorenz B.
1. That rule is unreadable again - at least for me. See how it is shown to the mailing list: http://jena.markmail.org/thread/akjkia6mysqhsq2i 2. Don't show the Java concatenated string but the rule as it's printed to the command line/console. Especially hereby one can see trivial syntax errors 3.

Re: Converting a class into an individual or an individual into a class

2017-03-06 Thread Lorenz B.
As long as there are only declaration of individuals and classes it's more or less simply removing the old triple and add the new one. But, once those entities are used in other OWL axioms, it's not that simple and depends on the ontology. For example 1. How to convert subClassOf relationships

Re: Wiki data

2017-03-02 Thread Lorenz B.
The question is strange. Wikidata provides RDF data, also accessible via SPARQL. DBpedia provides RDF data, also accessible via SPARQL. In addition, both provide schema information via OWL/RDFS axioms, e.g. domain , range, subclass hierarchy etc. Protege can load any such data. The rest should

Re: Get value from Annotation tab

2017-02-26 Thread Lorenz B.
Annotation of what? OWL axioms? Or do you mean something like the label of an OWL individual? For the latter, it is the same method. And please, first try it by yourself. This is much faster. Protege -> OWL based -> RDF representation of OWL axioms by a set of triples Jena API -> RDF -> direct

Re: schemagen hangs

2017-02-23 Thread Lorenz B.
Any reason for using such an old version of Jena? Latest version is 3.1.0 for schemagen. > Hi! > > I am trying to use schemagen (jena 2.12.1) on three ontologies found > here: http://ontology.tno.nl/ > namely > a) http://ontology.tno.nl/logico.ttl, > b) http://ontology.tno.nl/logiserv.ttl > c)

Re: How to get complete info on all subclass assertions for a given class?

2017-02-23 Thread Lorenz B.
Jena is primarily an RDF library, thus, it's working on the concept of nodes and triples. The RDF-based notation of OWL axioms and also OWL class expressions can be found here [1] . You can see that n triples encode on OWL construct, thus, blank nodes are used as you already discovered. For

Re: request for help with FROM keyword in ARQ

2017-02-20 Thread Lorenz B.
just for my understanding, FROM denotes a graph, right? and does the graph with the relative URI exist in your data? > Andy, thank you so much for the quick response. I tried 3.0.1, 2.13.0, and > 2.10.0 versions and none works with the FROM keyword. Actually, the current > version 3.2.0 returns

Re: LocalName

2017-02-16 Thread Lorenz B.
1. you could use REGEX 2. I really suggest to use the rdfs:label (or something similar) if exists for the human readable name of a URI > Hi, > > I have a question about striving the local name out of the URI. > > SO for example, > > the URI I print it out looks like the following: >

Re: Remove class

2017-02-16 Thread Lorenz B.
Put the inferred model in a default model > *materialize the model M1 to M2 > > Lorenz, I do not understand it. How to materialize model 1 to 2.? > > On Wed, Feb 15, 2017 at 6:08 PM, Lorenz Buehmann < > buehm...@informatik.uni-leipzig.de> wrote: > >> As I said, materialize the model M1 to M2 and

  1   2   3   >