Re: Setting error handler for WriterGraph/DatasetRIOT

2016-07-26 Thread Martynas Jusevičius
On 3.0.1 RDFWriter w = model.getWriter("RDF/XML"); w.setProperty("allowBadURIs", true); does not work -- calls RDFWriterRIOT.setProperty() instead of BaseXMLWriter.setProperty(), so "allowBadURIs" has no effect. Any workaround ideas? On Tue, Jul 26, 2016 at

Re: Setting error handler for WriterGraph/DatasetRIOT

2016-07-26 Thread Martynas Jusevičius
/07/16 16:14, Martynas Jusevičius wrote: > > But the assumption obviously doesn't hold? Illegal Models exist > > because they can be parsed. > > No - because someone turned the checking off or created them them with > code, not a parser. > > > Wouldn't it make sen

Re: Setting error handler for WriterGraph/DatasetRIOT

2016-07-26 Thread Martynas Jusevičius
wrote: > On 26/07/16 10:23, Martynas Jusevičius wrote: >> >> Andy, >> >> "allowBadURIs" was my next move, I will try that later today and report >> back. >> >> Any reason why this cannot be exposed uniformly on the WriterRIOT >> level? Like i

Re: Setting error handler for WriterGraph/DatasetRIOT

2016-07-26 Thread Martynas Jusevičius
t 11:32 AM, Andy Seaborne <a...@apache.org> wrote: > On 26/07/16 10:23, Martynas Jusevičius wrote: >> >> Andy, >> >> "allowBadURIs" was my next move, I will try that later today and report >> back. >> >> Any reason why this cannot be

Re: Setting error handler for WriterGraph/DatasetRIOT

2016-07-26 Thread Martynas Jusevičius
axes print bad URIs. > > For RDF/XML, does setting "allowBadURIs" work? > > https://jena.apache.org/documentation/io/rdfxml_howto.html#advanced-rdfxml-output > > Andy > > > On 26/07/16 09:34, Martynas Jusevičius wrote: >> >> RDF/XML (plain)

Re: Setting error handler for WriterGraph/DatasetRIOT

2016-07-26 Thread Martynas Jusevičius
It seems like this is just a problem waiting to happen > > On 26/07/2016 09:34, "Martynas Jusevičius" <marty...@graphity.org> wrote: > > RDF/XML (plain) in this case. I would of course prefer a > format-agnostic solution. > > On Tue, Jul 26, 201

Re: Setting error handler for WriterGraph/DatasetRIOT

2016-07-26 Thread Martynas Jusevičius
RDF/XML (plain) in this case. I would of course prefer a format-agnostic solution. On Tue, Jul 26, 2016 at 10:21 AM, Andy Seaborne <a...@apache.org> wrote: > Which serialization format are you working with? > > Andy > > > On 25/07/16 22:44, Martynas Jusevičius w

Setting error handler for WriterGraph/DatasetRIOT

2016-07-25 Thread Martynas Jusevičius
Hey, I was planning to set an ErrorHandler on WriterGraphRIOT instance, but it turns such setter does not exist. My ErrorHandler allows invalid URIs to be read without throwing exceptions. However model.write() throws BadURIException when writing them. So round-tripping such Model currently does

Re: Setting (strict) error handler before before reading Model (Jena 2.11.0)

2016-07-25 Thread Martynas Jusevičius
OK nevermind, that was a bad idea. Throwing an exception (after the parse errors are collected) solves this. On Mon, Jul 25, 2016 at 7:43 PM, Martynas Jusevičius <marty...@graphity.org> wrote: > Isn't there a way to do this uniformly, for any Reader? That would be > much preferred. &

Re: Setting (strict) error handler before before reading Model (Jena 2.11.0)

2016-07-25 Thread Martynas Jusevičius
I/resolveIRI as well (used in prefix handling). > > For RDF/XML see LangRDFXML.HandlerSink > > For JSON-LD is is hard to get the line/colun because the parser does all > JSON parsing, forms an intermediate form then hands it over to RIOT. > > Andy > >

Re: Concurrent access to a shared (Ont)Model

2016-07-25 Thread Martynas Jusevičius
licit OntModelSpec" part was a bit unclear. On Sat, Jul 23, 2016 at 12:55 PM, Dave Reynolds <dave.e.reyno...@gmail.com> wrote: > On 22/07/16 21:42, Martynas Jusevičius wrote: >> >> Is clonedModel.add(ontModel) the best way to clone a model though? >

Re: Incompatibility of TriX format

2016-07-24 Thread Martynas Jusevičius
I know I promised a PR, but I see you already committed one. Sorry about that, I'm only now coming back home from vacation. On Tue, Jul 19, 2016 at 12:37 PM, Andy Seaborne <a...@apache.org> wrote: > On 15/07/16 21:01, Martynas Jusevičius wrote: >> >> Created an issue: http

Re: Setting (strict) error handler before before reading Model (Jena 2.11.0)

2016-07-24 Thread Martynas Jusevičius
Let me put it that way: can I successfully parse a Model with invalid URI values and also get a report saying which values were invalid and why? So that it could be presented to the user as error messages. On Sat, 23 Jul 2016 at 01:37, Martynas Jusevičius <marty...@graphity.org>

Re: Setting (strict) error handler before before reading Model (Jena 2.11.0)

2016-07-22 Thread Martynas Jusevičius
eptions or execute side-effects as >> desired. >> >> --- >> A. Soroka >> The University of Virginia Library >> >>> On Jul 8, 2016, at 1:46 PM, Martynas Jusevičius <marty...@graphity.org> >>> wrote: >>> >>> Hey, >>> >>> I have

Re: Concurrent access to a shared (Ont)Model

2016-07-22 Thread Martynas Jusevičius
Is clonedModel.add(ontModel) the best way to clone a model though? Because after that ontModel.size() and clonedModel.size() seem to differ sometimes, e.g. 4723 vs 4729. On Fri, Jul 22, 2016 at 9:24 AM, Dave Reynolds <dave.e.reyno...@gmail.com> wrote: > On 21/07/16 22:26, Martynas J

Re: OntModel imports not loaded (2.11.0 behavior broken in 3.0.1)

2016-07-22 Thread Martynas Jusevičius
alled which is not > related to location mapping. > > Andy > > > On 22/07/16 21:10, Martynas Jusevičius wrote: >> >> No this is about getOntology() not calling loadImports() in 3.0.1, >> which I now need to call myself. And OntModel is retrieved multiple >&g

Re: OntModel imports not loaded (2.11.0 behavior broken in 3.0.1)

2016-07-22 Thread Martynas Jusevičius
means it does not > get done so soon. > > Andy > > > > On 22/07/16 18:07, Martynas Jusevičius wrote: >> >> These are 2 ontologies that import each other (gps: imports gp:): >> >> https://github.com/AtomGraph/Processor/blob/master/src/main/resources

Re: OntModel imports not loaded (2.11.0 behavior broken in 3.0.1)

2016-07-22 Thread Martynas Jusevičius
Is there a way to check whether imports already have been load for an OntModel? As to call loadImports() only once and avoid calling it with each OntModel access. On Thu, Jul 14, 2016 at 2:48 PM, Andy Seaborne <a...@apache.org> wrote: > On 13/07/16 22:33, Martynas Jusevičius wrote:

Re: OntModel imports not loaded (2.11.0 behavior broken in 3.0.1)

2016-07-22 Thread Martynas Jusevičius
16 20:30, Martynas Jusevičius wrote: >> >> Created an issue: https://issues.apache.org/jira/browse/JENA-1210 >> >> On Fri, Jul 15, 2016 at 5:48 PM, Andy Seaborne <a...@apache.org> wrote: >>> >>> On 15/07/16 15:15, Martynas Jusevičius wrote: >>>>

Re: Default RDF/XML writer changed between 2.11.0 and 3.0.1?

2016-07-22 Thread Martynas Jusevičius
not going straight to 3.1.0 which is > from May 2016? > > Rob > > On 22/07/2016 10:27, "Martynas Jusevičius" <marty...@graphity.org> wrote: > > RDFWriterRegistry.register(Lang.RDFXML, RDFFormat.RDFXML_PLAIN) did > the trick. > > Why was the default

Re: Default RDF/XML writer changed between 2.11.0 and 3.0.1?

2016-07-22 Thread Martynas Jusevičius
<a...@apache.org> wrote: > On 21/07/16 23:44, Martynas Jusevičius wrote: >> >> Hey, >> >> I noticed that after upgrade from 2.11.0 to 3.0.1 the RDF/XML output >> changed: element name is used instead of rdf:Description + rdf:type, >> rdf:nodeID attribute is gone e

Default RDF/XML writer changed between 2.11.0 and 3.0.1?

2016-07-21 Thread Martynas Jusevičius
Hey, I noticed that after upgrade from 2.11.0 to 3.0.1 the RDF/XML output changed: element name is used instead of rdf:Description + rdf:type, rdf:nodeID attribute is gone etc (output below). The model is written the same way, like this: model.write(baos, RDFLanguages.RDFXML.getName(), null);

Re: Concurrent access to a shared (Ont)Model

2016-07-21 Thread Martynas Jusevičius
hich case you need to lock the OntModel. > > Dave > > > On 19/07/16 17:04, Martynas Jusevičius wrote: >> >> Hey Andy, >> >> I am not sure yet what is it that I need to lock - is it the OntModel, or >> the OntDocumentManager instance,

Re: Concurrent access to a shared (Ont)Model

2016-07-19 Thread Martynas Jusevičius
(ModelCom.java:340) com.hp.hpl.jena.ontology.impl.OntModelImpl.writeAll(OntModelImpl.java:2650) On Tue, 19 Jul 2016 at 14:04, Andy Seaborne <a...@apache.org> wrote: > On 17/07/16 13:54, Martynas Jusevičius wrote: > > But then again, I cannot lock what I don't have: locks work on mode

Re: Concurrent access to a shared (Ont)Model

2016-07-17 Thread Martynas Jusevičius
But then again, I cannot lock what I don't have: locks work on models, and I only get OntModel instance when getOntology() is called. Maybe synchronized is the solution here? On Sun, 17 Jul 2016 at 15:32, Martynas Jusevičius <marty...@graphity.org> wrote: > Thanks Andy. > >

Re: Concurrent access to a shared (Ont)Model

2016-07-17 Thread Martynas Jusevičius
uld make things a lot easier later. > > Andy > > On 16/07/16 16:03, Martynas Jusevičius wrote: > > On a second thought, since our code is only reading from the models, it > is > > probably easier and safer just to clone the shared model into a > per-request > > co

Re: Concurrent access to a shared (Ont)Model

2016-07-16 Thread Martynas Jusevičius
= OntDocumentManager.getInstance().getOntology(ontologyURI, ontModelSpec); OntModel clonedModel = ModelFactory.createOntologyModel(ontModelSpec); clonedModel.add(ontModel); On Sat, Jul 16, 2016 at 3:47 PM, Martynas Jusevičius <marty...@graphity.org> wrote: > Hey, > > in our webapp, all obje

Re: Incompatibility of TriX format

2016-07-15 Thread Martynas Jusevičius
Created an issue: https://issues.apache.org/jira/browse/JENA-1211 On Thu, Jul 14, 2016 at 2:06 PM, Andy Seaborne <a...@apache.org> wrote: > On 14/07/16 11:38, Andy Seaborne wrote: >> >> On 14/07/16 10:10, Martynas Jusevičius wrote: >>> >>> Hey, >>>

Re: OntModel imports not loaded (2.11.0 behavior broken in 3.0.1)

2016-07-15 Thread Martynas Jusevičius
irst place? On Fri, 15 Jul 2016 at 12:40, Andy Seaborne <a...@apache.org> wrote: > On 14/07/16 15:17, Martynas Jusevičius wrote: > > Should I open a Jira for this as well? Seems like a bug to me. > > Yes. > > And a fix? > > Andy > >

Re: OntModel imports not loaded (2.11.0 behavior broken in 3.0.1)

2016-07-14 Thread Martynas Jusevičius
Should I open a Jira for this as well? Seems like a bug to me. On Thu, 14 Jul 2016 at 15:48, Andy Seaborne <a...@apache.org> wrote: > On 13/07/16 22:33, Martynas Jusevičius wrote: > > Hey, > > > > I upgraded Jena from 2.11.0 to 3.0.1 and OntModel imports stopped &

Incompatibility of TriX format

2016-07-14 Thread Martynas Jusevičius
Hey, Jena seems to use another DTD than the one hosted by W3C: https://www.w3.org/2004/03/trix/trix-1/trix-1.0.dtd vs. https://github.com/apache/jena/blob/master/jena-arq/src/main/java/org/apache/jena/riot/lang/TriX.java >From the first glance, at least the root element differs: vs. . The TriX

OntModel imports not loaded (2.11.0 behavior broken in 3.0.1)

2016-07-13 Thread Martynas Jusevičius
Hey, I upgraded Jena from 2.11.0 to 3.0.1 and OntModel imports stopped working when getOntology() is called. I traced the problem to AdapterFileManager.readModelWorker(Model model, String filenameOrURI, String baseURI, String syntax), where model.read(in, baseURI, syntax) was at some point

Re: SPARQL 1.1 Update

2016-07-08 Thread Martynas Jusevičius
I don't think there is an rdf:id property? You haven't provided the namespace for it, but you shouldn't be introducing your own terms in the RDF namespace. On Fri, Jul 8, 2016 at 9:20 PM, Sorin Gheorghiu wrote: > Hi Andy, > > Following your answer, I succeeded to

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-23 Thread Martynas Jusevičius
Maybe I should evaluate, if I need an InfModel there in the first place... On Thu, Jun 23, 2016 at 10:38 PM, Martynas Jusevičius <marty...@graphity.org> wrote: > Hey again, > > I have profiled the CPU time, and it seems that a lot of it (93.5% > after some 22500 HTTP

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-23 Thread Martynas Jusevičius
/org/graphity/processor/filter/response/HypermediaFilter.java#L107 I would appreciate suggestions on how to improve performance. Martynas On Tue, Jun 21, 2016 at 10:28 AM, Dave Reynolds <dave.e.reyno...@gmail.com> wrote: > Hi Martynas, > > On 20/06/16 22:18, Martynas Jusevičius w

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-21 Thread Martynas Jusevičius
y memory leaks but might mitigate them. > > There are two FIXME in the PR which could do with looking at. > > Andy > > > On 21/06/16 09:28, Dave Reynolds wrote: >> >> Hi Martynas, >> >> On 20/06/16 22:18, Martynas Jusevičius wrote: >>> >

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-20 Thread Martynas Jusevičius
What is the status of JENA-650 by the way? https://issues.apache.org/jira/browse/JENA-650 On Mon, Jun 20, 2016 at 11:18 PM, Martynas Jusevičius <marty...@graphity.org> wrote: > Hey, > > after using GenericRuleReasoner and InfModel more extensively, we > started experie

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-20 Thread Martynas Jusevičius
What is the status of JENA-650 by the way? https://issues.apache.org/jira/browse/JENA-650 On Mon, Jun 20, 2016 at 11:18 PM, Martynas Jusevičius <marty...@graphity.org> wrote: > Hey, > > after using GenericRuleReasoner and InfModel more extensively, we > started experie

Forward/backward rules (and reasoner memory leaks)

2016-06-20 Thread Martynas Jusevičius
Hey, after using GenericRuleReasoner and InfModel more extensively, we started experiencing memory leaks that eventually kill our webapp because it runs out of heap space. Jena version is 2.11.0. After some profiling, it seems that RETEEngine.clauseIndex and/or RETEEngine.infGraph are retaining

Re: Customizing RDF/XML writer for quads

2016-06-09 Thread Martynas Jusevičius
I found the "abandoned" discussion on RDF 1.1 WG wiki: https://www.w3.org/2011/rdf-wg/wiki/TF-RDF-XML#Change_8:_named_graph_support_in_RDF-XML On Thu, Jun 9, 2016 at 5:26 PM, Martynas Jusevičius <marty...@atomgraph.com> wrote: > It seems that someone has thought about t

Re: Customizing RDF/XML writer for quads

2016-06-09 Thread Martynas Jusevičius
It seems that someone has thought about this before: https://www.w3.org/Submission/rdfsource/ TriX is just not a natural structure for XSLT transformations. On Thu, Jun 9, 2016 at 4:34 PM, Andy Seaborne <a...@apache.org> wrote: > > > On 09/06/16 14:47, Martynas Jusevičius wr

Re: Customizing RDF/XML writer for quads

2016-06-09 Thread Martynas Jusevičius
Good points. Yes TriG-like structure makes more sense -- but then it is clearly non-standard. Isn't this a gap in RDF standardization -- an XML format for quads? On Thu, Jun 9, 2016 at 1:51 PM, Andy Seaborne <a...@apache.org> wrote: > On 08/06/16 15:22, Martynas Jusevičius wrote:

Re: Customizing RDF/XML writer for quads

2016-06-08 Thread Martynas Jusevičius
in a file-per-graph using XSLT's document() function. > > --- > A. Soroka > The University of Virginia Library > >> On Jun 8, 2016, at 10:22 AM, Martynas Jusevičius <marty...@graphity.org> >> wrote: >> >> Hey, >> >> would it be possible

Customizing RDF/XML writer for quads

2016-06-08 Thread Martynas Jusevičius
Hey, would it be possible to adopt RDF/XML writer for quads (Dataset)? What would that take? I know it would involve a non-standard syntax, but if we used namespaced attributes, XML-compatible tools shouldn't break. I am thinking it should be possible to add an attribute (e.g. rdfx:graph) with

SPARQL algebra operators ResultSets

2016-05-26 Thread Martynas Jusevičius
Hey, is there some code in Jena that implements SPARQL algebra operations as functions on ResultSets? Something like: ResultSet match(Graph graph, Node subject, Node property, Node object) ResultSet join(ResultSetRewindable left, ResultSetRewindable right) ResultSet leftJoin(ResultSetRewindable

Creating XSDDatatype from URI

2016-05-21 Thread Martynas Jusevičius
Hey, If I have URI such as xsd:long for example, how do I get an instance of XSDDatatype.XSDlong from it? I was looking for a factory method like XSDDatatype.createDatatype() or a public constructor XSDDatatype(), but couldn't find either. I'm using Jena 2.11.0 still. Martynas atomgraph.com

Re: Sqllie database

2016-05-18 Thread Martynas Jusevičius
Not directly. You need an RDF wrapper - take a look at these: http://ontop.inf.unibz.it/ http://d2rq.org/ On Wed, May 18, 2016 at 5:15 PM, mehmet mehmet wrote: > Is Jena support Sqlite database? If we have some data from database in > sqlite like user login etc, can we use

Re: INSERT resource CBDs into separate graphs

2016-05-12 Thread Martynas Jusevičius
, 2016 at 1:48 PM, Andy Seaborne <a...@apache.org> wrote: > On 10/05/16 23:27, Martynas Jusevičius wrote: >> >> Hey, >> >> I know this is a SPARQL question not specific to Jena, but I couldn't >> get an answer on public-sparql-dev, so I'll try my luck here: >

INSERT resource CBDs into separate graphs

2016-05-10 Thread Martynas Jusevičius
Hey, I know this is a SPARQL question not specific to Jena, but I couldn't get an answer on public-sparql-dev, so I'll try my luck here: https://lists.w3.org/Archives/Public/public-sparql-dev/2016AprJun/0010.html This is a real problem we have, triples end up in wrong graphs when we split one

Re: Query display nothing

2016-04-27 Thread Martynas Jusevičius
I think you need to provide more information, before anyone can answer your questions. What is the actual endpoint or dataset you are executing on? What is the code executing the query? On Wed, Apr 27, 2016 at 5:12 PM, mehmet mehmet wrote: > String queryString ="PREFIX

Re: resource rdfs label

2016-04-25 Thread Martynas Jusevičius
You should not be looking at the URI as a label. How did you try rdfs:label? Something like this should work: SELECT * WHERE { ?x tre:has_boss tre:Good ; rdfs:label ?label . } Needs tre: and rdfs: PREFIXes of course. On Mon, Apr 25, 2016 at 5:33 PM, mehmet mehmet

Re: Fuseki2 Client Access from Java

2016-04-19 Thread Martynas Jusevičius
Not sure if this what you're looking for, but these are JAX-RS based SPARQL and Graph Store Protocol clients: https://github.com/Graphity/graphity-core/blob/master/src/main/java/org/graphity/core/client/SPARQLClient.java

Re: Fuseki content negotiation: HTML content type

2016-04-15 Thread Martynas Jusevičius
You might find these XSLT stylesheets for RDF/XML useful: https://github.com/Graphity/graphity-client/blob/master/src/main/webapp/static/org/graphity/client/xsl/bootstrap/2.3.2/layout.xsl On Fri, 15 Apr 2016 at 21:27, Frans Knibbe wrote: > Hello A. Soroka, > > Thank you

Re: Problem with simple query

2016-04-14 Thread Martynas Jusevičius
My guess would be that because of SPARQL bottom-up semantics, ?prefLabel is undefined at the point where you are applying it. Try moving it out of OPTIONAL. On Thu, Apr 14, 2016 at 11:11 AM, Mikael Pesonen wrote: > > Hi, > > im matching strings in different graphs and

Re: Controlling JSON-LD output

2016-04-10 Thread Martynas Jusevičius
As a workaround, you can try XSLT which transforms RDF/XML to JSON-LD: https://github.com/Graphity/graphity-client/blob/master/src/main/webapp/static/org/graphity/client/xsl/rdfxml2json-ld.xsl On Sun, Apr 10, 2016 at 4:43 PM, François-Paul Servant wrote: > Hi, > >

StackOverflowError when writing N-Quads (Jena 2.11.0)

2016-04-09 Thread Martynas Jusevičius
Hey, I'm trying to write an in-memory Dataset (guesstimate: a few hundred thousand quads) like this: RDFDataMgr.write(entityStream, dataset, lang); What I get is: java.lang.StackOverflowError at org.apache.jena.atlas.iterator.IteratorCons.hasNext(IteratorCons.java:70) at

Re: Jena remote dataset and prefix mapping

2016-03-03 Thread Martynas Jusevičius
As far as I understand, prefix mapping is only available after parsing, as it's a purely syntactic thing. Some syntaxes have prefixes (Turtle or RDF/XML, for example), some don't (N-Triples). So in general you cannot retrieve them, as there is no such thing in the RDF data model. I might be wrong

Re: Jena remote dataset and prefix mapping

2016-03-03 Thread Martynas Jusevičius
I think DatasetAccessor is for the Graph Store Protocol. On Thu, Mar 3, 2016 at 11:12 PM, A. Soroka wrote: > If you are talking about a graph accessed via SPARQL, it’s not clear (to me) > what you mean by “prefix mapping”. A SPARQL dataset doesn’t have a prefix > mapping

Re: Quad put and post with DatasetGraphAccessorHTTP

2016-02-20 Thread Martynas Jusevičius
<a...@apache.org> wrote: > On 19/02/16 17:39, Martynas Jusevičius wrote: >> >> I had proposed an alternative JAX-RS based approach for HTTP I/O, for >> which adding a new reader/writer (e.g. for Dataset) would be trivial, >> but nobody followed up on that: >> >> h

Re: Quad put and post with DatasetGraphAccessorHTTP

2016-02-19 Thread Martynas Jusevičius
I had proposed an alternative JAX-RS based approach for HTTP I/O, for which adding a new reader/writer (e.g. for Dataset) would be trivial, but nobody followed up on that:

Re: Web portal that natively supports Jena TDB and Fuseki

2016-02-10 Thread Martynas Jusevičius
Darko, we have developed a Linked Data platform that supports any SPARQL 1.1 triplestore: http://graphityhq.com Martynas On Wed, Feb 10, 2016 at 2:59 PM, Darko Androcec wrote: > Hi all, > > I am looking whether some web portal exists that natively supports Jena TDB

Re: How to remove consistently a triple pattern given a SPARQL query?

2016-02-01 Thread Martynas Jusevičius
This thread got me thinking -- couldn't we have reusable, dereferenceable SPARQL optimizations/rewrites as SPARQL CONSTRUCTs over SPIN RDF? Which would be mappings between the original syntax tree and the optimized syntax tree. On Mon, Feb 1, 2016 at 8:55 PM, Carlo.Allocca

Re: How to remove consistently a triple pattern given a SPARQL query?

2016-01-28 Thread Martynas Jusevičius
You could do it using SPIN API as well: http://spinrdf.org/sp.html On Thu, Jan 28, 2016 at 7:39 PM, Carlo.Allocca wrote: > Dear Andy, > > Thank you very much for your promtly reply. > > I need a little bit of exploring and thinking to apply what you suggested. > Indeed,

Re: Status of Jena on Android

2016-01-11 Thread Martynas Jusevičius
Good news? Android to switch to OpenJDK: http://arstechnica.com/tech-policy/2016/01/android-n-switches-to-openjdk-google-tells-oracle-it-is-protected-by-the-gpl/ On Tue, Dec 8, 2015 at 3:28 PM, Andy Seaborne <a...@apache.org> wrote: > On 08/12/15 11:26, Martynas Jusevičius wrote: >

Re: CONSTRUCT + Blank nodes

2016-01-08 Thread Martynas Jusevičius
Blank nodes are local to the graph. Why don't you relabel them as URIs and the problem should go away? (if I understood your use case correctly) On Wed, Jan 6, 2016 at 5:50 PM, Paul Houle wrote: > This is a simple scenario, I can accomplish the specific thing I am trying >

Re: Order of rdfs:label properties in OWL

2016-01-04 Thread Martynas Jusevičius
RDF does not specify ordering, and you're reading RDF/OWL. On Mon, Jan 4, 2016 at 8:46 AM, Marko Asplund wrote: > Hi, > > I'm using Jena RDF API (v2.13.0) for reading OWL documents and I read class > axiom labels using OntClass.listLabels. > The labels aren't returned in

Re: Checking whether Reader/Writer exists for Lang

2015-12-24 Thread Martynas Jusevičius
Holger, my Christmas wish: could you put SPIN API on GitHub so we could have SNAPSHOT builds, pull requests, issue tracker etc? Happy holidays :) On Tue, Dec 22, 2015 at 2:55 PM, Holger Knublauch <hol...@knublauch.com> wrote: > On 22/12/2015 1:46 PM, Martynas Jusevičius wrote: >&g

Re: Checking whether Reader/Writer exists for Lang

2015-12-22 Thread Martynas Jusevičius
in order to avoid this situation. On Tue, Dec 22, 2015 at 1:55 PM, Andy Seaborne <a...@apache.org> wrote: > On 22/12/15 12:46, Martynas Jusevičius wrote: >> >> I'm stuck with this version because the latest SPIN API (1.4.0) is >> using it and last I heard Holger said h

Checking whether Reader/Writer exists for Lang

2015-12-21 Thread Martynas Jusevičius
Hey, I have a situation where I register a new Lang (JSON-LD) in Jena 2.11.0 but I only have a Writer for it, not a Reader. How can I check whether Reader exists for a certain Lang before doing the actual read? Right now I get an exception: com.hp.hpl.jena.shared.NoReaderForLangException:

Jersey Client for HTTP I/O

2015-12-15 Thread Martynas Jusevičius
Hey all, I refactored HTTP I/O code which previously combined Jena's DataManager, DatasetGraphAccessorHTTP, and QueryEngineHTTP using Jersey Client 1.x API. I think the code became much more higher-level, flexible and consistent. ClientResponse provides a rich interface with full metadata about

Status of Jena on Android

2015-12-08 Thread Martynas Jusevičius
Hey all, I know this topic was discussed back in april: https://mail-archives.apache.org/mod_mbox/jena-users/201504.mbox/browser Is this the latest/only project? https://github.com/seus-inf/jena-android What are the limitations/drawbacks of Jena Android? We don't need persistence, for now we're

Re: BIND in CONSTRUCT query with sub-SELECT (SPARQL)

2015-11-24 Thread Martynas Jusevičius
The BIND could also be within the sub-SELECT, depends on the use case. On Tue, Nov 24, 2015 at 11:35 AM, Wetz Peter wrote: > To answer my own question, I think this is the correct solution: > > PREFIX > CONSTRUCT { ... } > WHERE { > BIND () { >

Re: BIND in CONSTRUCT query with sub-SELECT (SPARQL)

2015-11-24 Thread Martynas Jusevičius
üngliche Nachricht----- >> Von: Martynas Jusevičius [mailto:marty...@graphity.org] >> Gesendet: Dienstag, 24. November 2015 11:38 >> An: users@jena.apache.org >> Betreff: Re: BIND in CONSTRUCT query with sub-SELECT (SPARQL) >> >> The BIND could also be within t

Re: JSON-LD serialization: performances?

2015-11-22 Thread Martynas Jusevičius
François-Paul, just to let you know, there's an alternative route: RDF/XML transformation to JSON-LD using XSLT: https://github.com/Graphity/graphity-client/blob/master/src/main/webapp/static/org/graphity/client/xsl/rdfxml2json-ld.xsl But I doubt it will be faster. On Sun, Nov 22, 2015 at 3:17

Re: total triples

2015-11-09 Thread Martynas Jusevičius
That would only count triples in the default graph and omit triples in named graphs. To account for them, you would need something like SELECT (COUNT(*) AS ?no) { { ?s ?p ?o } UNION { GRAPH ?g { ?s ?p ?o } } } On Mon, Nov 9, 2015 at 3:47 PM, Zen 98052 wrote: > What is the

Re: use aggregates in CONSTRUCT query

2015-11-02 Thread Martynas Jusevičius
You can, but they need to go in the WHERE part, not CONSTRUCT. And you need to GROUP BY first: http://rdf.myexperiment.org/howtosparql?page=GROUP%20BY On Mon, Nov 2, 2015 at 12:20 PM, Wetz Peter wrote: > This is more of a SPARQL question, so sorry, if it not perfectly

ResourceFactory.createTypedLiteral(Object value, RDFDatatype dtype) missing?

2015-10-01 Thread Martynas Jusevičius
Hey, when I compare Model with ResourceFactory, Model has the following methods createTypedLiteral(Object value) createTypedLiteral(Object value, RDFDatatype dtype) createTypedLiteral(String lex, RDFDatatype dtype) while ResourceFactory only has createTypedLiteral(Object value)

Re: question on LIMIT

2015-09-22 Thread Martynas Jusevičius
Please post your query first. On Tue, Sep 22, 2015 at 4:25 PM, Zen 98052 wrote: > For example, the query result set (with ORDER clause) is [ a, b, c, d, e, f, > g, h, i, j ] > > When I put OFFSET 4 and LIMIT 3 in the query, I got back [ d, e ] as the > result. > > It should

Re: Bug in PrintUtil or Node prevents roundtripping Rules

2015-09-18 Thread Martynas Jusevičius
wrote: > Hi Martynas, > > On 17/09/15 23:37, Martynas Jusevičius wrote: > > Hit send too soon! > > > > When the list is serialized back to String again, I get > > > > [[ inheritance: (?template rdf:type http://graphity.org/gp#Template) > > (?templ

Re: Bug in PrintUtil or Node prevents roundtripping Rules

2015-09-18 Thread Martynas Jusevičius
Should we create a ticket for this at least? Let me know if you want me to do it. On Fri, Sep 18, 2015 at 10:55 AM, Dave Reynolds <dave.e.reyno...@gmail.com> wrote: > Hi Martynas, > > On 18/09/15 09:25, Martynas Jusevičius wrote: >> >> I'm on SPIN API 1.3.1 = Jena 2.

Bug in PrintUtil or Node prevents roundtripping Rules

2015-09-17 Thread Martynas Jusevičius
Hey, I have a List created using Rule.parseRules from a String: [inheritance: (?template rdf:type ), (?template ?p ?o), (?p rdf:type owl:AnnotationProperty), (?p rdfs:isDefinedBy ), (?subClass rdfs:subClassOf ?template), noValue(?subClass

Re: Bug in PrintUtil or Node prevents roundtripping Rules

2015-09-17 Thread Martynas Jusevičius
?subClass ?p ?o ) ] ] ' Can you confirm this is a bug? I need to roundtrip Rules from Strings to objects and back. Martynas graphityhq.com On Fri, Sep 18, 2015 at 12:34 AM, Martynas Jusevičius <marty...@graphity.org> wrote: > Hey, > > I have a List created using Ru

Re: Materializing custom rules on OntModel

2015-09-03 Thread Martynas Jusevičius
Thanks, that worked. On Thu, Sep 3, 2015 at 2:23 PM, Dave Reynolds <dave.e.reyno...@gmail.com> wrote: > On 03/09/15 11:46, Martynas Jusevičius wrote: >> >> Hey list, >> >> I was implementing a OO-like inheritance for annotation properties >> when I reali

Materializing custom rules on OntModel

2015-09-03 Thread Martynas Jusevičius
Hey list, I was implementing a OO-like inheritance for annotation properties when I realized I can probably express it as custom Jena rules. I want to push the properties down the subclass chains and preferably materialize them. Currently my code looks like this: String rules =

Re: Semantic Website

2015-08-28 Thread Martynas Jusevičius
Kumar, please take a look at Graphity Linked Data platform: http://graphityhq.com http://graphity.org Best, Martynas On Fri 28 Aug 2015 at 19:09 kumar rohit kumar.en...@gmail.com wrote: yes like dbpedia. Actually I am new to semantic web and need to learn tools which I will also use in

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)

Re: Quad store HTTP semantics

2015-08-18 Thread Martynas Jusevičius
above. best regards, from berlin, On Tue, Aug 18, 2015 at 8:57 AM, Andy Seaborne a...@apache.org wrote: On 17/08/15 22:40, Martynas Jusevičius wrote: So what are the semantics of POSTing quads and PUTing quads? Append and replace as per HTTP. RFC 7231: 4.3.3. POST

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-17 Thread Martynas Jusevičius
So what are the semantics of POSTing quads and PUTing quads? On Mon, Aug 17, 2015 at 11:32 PM, Andy Seaborne a...@apache.org wrote: On 17/08/15 22:21, Martynas Jusevičius wrote: Is that an oversight in the GSP spec? Not really - the GET/POST/PUT on the dataset itself is just normal use

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-17 Thread Martynas Jusevičius
Andy, I have a related question. What if I have a Dataset at hand, not a Model - how do I send it to a remote Graph Store? Martynas On Mon, Aug 17, 2015 at 9:19 PM, Andy Seaborne a...@apache.org wrote: DatasetAccessor This is the API to the SPARQL Graph Store Protocol. Model model = ...

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-17 Thread Martynas Jusevičius
:26, Martynas Jusevičius wrote: Andy, I have a related question. What if I have a Dataset at hand, not a Model - how do I send it to a remote Graph Store? The SPARQL Graph Store Protocol does not mention this. Fuseki supports REST-ish PUT/POST/GET on the dataset URL. Currently, you need

Re: Reading particular RDFS tags through the Jena API

2015-07-30 Thread Martynas Jusevičius
Umar, could it be owl:equivalentClass? http://www.w3.org/TR/owl-ref/#equivalentClass-def SKOS vocabulary can also be useful: http://www.w3.org/TR/skos-primer/ Martynas graphityhq.com On Thu, Jul 30, 2015 at 11:45 PM, Umar Minhas ufmin...@gmail.com wrote: That worked like a charm. Thank you

Re: Apache Jena TDB

2015-07-29 Thread Martynas Jusevičius
TDB gives you persistence. It's a proper database that stores data on disk. With ARQ you can only query in-memory Models. On Wed, Jul 29, 2015 at 11:05 AM, Roshan Bharath Das roshanbharath...@gmail.com wrote: Hello, I have a very basic question about the use of Jena TDB. As far as I see, TDB

Re: Federated query result format

2015-07-28 Thread Martynas Jusevičius
Roshan, try ResultSetFormatter.outputAsJSON() https://jena.apache.org/documentation/javadoc/arq/com/hp/hpl/jena/query/ResultSetFormatter.html#outputAsJSON(com.hp.hpl.jena.query.ResultSet) On Tue, Jul 28, 2015 at 9:18 PM, Roshan Bharath Das roshanbharath...@gmail.com wrote: Hello, How can I

Re: Error reading in Jena's own JSON-LD

2015-07-23 Thread Martynas Jusevičius
Andy, why not just remove RDF/JSON? Is anyone using it? It sure has confused quite a few people. On Thu, Jul 23, 2015 at 5:23 PM, Andy Seaborne a...@apache.org wrote: On 23/07/15 15:58, Erich Bremer wrote: Hi, I downloaded: http://www.w3.org/People/Berners-Lee/card.rdf read and dumped with

Re: How to update literal value in Jena

2015-07-16 Thread Martynas Jusevičius
Roshan, there is Statement.changeLiteralObject(): https://jena.apache.org/documentation/javadoc/jena/com/hp/hpl/jena/rdf/model/Statement.html#changeLiteralObject(int) Martynas On Thu, Jul 16, 2015 at 11:22 AM, Roshan Bharath Das roshanbharath...@gmail.com wrote: Hello, I create a model as

Re: Possible Bug Roundtripping SPARQL to an SSE and back

2015-06-05 Thread Martynas Jusevičius
out as SPARQL, and the code appears also to be embedded in a larger project. So basically I figured it was less risky to use ARQ. Anyway, if I'm wrong on any of these points I'd genuinely love to know what I can do to make use of it. Thanks again, R. On 4 June 2015 at 16:37, Martynas

Re: Possible Bug Roundtripping SPARQL to an SSE and back

2015-06-04 Thread Martynas Jusevičius
Hey, this is probably not directly relevant to your use case, but once again I'd like to suggest using SPIN Vocabulary as an API-neutral way to represent and manage SPARQL natively as RDF: http://spinrdf.org/sp.html I know Sesame has plans to implement support for SPIN:

Re: Fuseki2 Delete blank node

2015-06-03 Thread Martynas Jusevičius
I think in such case it would be better to use Parameterized SPARQL String instead of string concatenation: https://jena.apache.org/documentation/query/parameterized-sparql-strings.html On Thu, Jun 4, 2015 at 2:06 AM, Wojciech Ciesielski woj...@kierzbun.pl wrote: ok thx problem solved :) i

Re: Fuseki2 Delete blank node

2015-06-02 Thread Martynas Jusevičius
Can't you use a variable instead? On Jun 2, 2015 7:17 PM, Wojciech Ciesielski woj...@kierzbun.pl wrote: Hi again :) DELETE DATA { GRAPH http://przyklad.pl/ { _:asdfasd http://przyklad.pl/TypObiektu#jest http://przyklad.pl/TypObiektu#test } } fuseki

Re: Checking whether object is rdf:XMLLiteral

2015-05-28 Thread Martynas Jusevičius
then isWellFormed() becomes true for that literal. Does this help? Martynas On Wed, May 27, 2015 at 9:48 AM, Andy Seaborne a...@apache.org wrote: On 26/05/15 23:51, Martynas Jusevičius wrote: Thanks. That does not seem to be available in Jena 2.11.0 though. No - it was added as part of being

<    1   2   3   4   5   6   7   8   >