Re: ARQ: Traversing and processing a SPARQL Algebra (Op) tree

2012-06-22 Thread Martynas Jusevičius
It might not be the traditional solution, but I've done some SPARQL query transformations with RDF/XML and XSLT 2. It doesn't work on the algebra level, but rather on the SPIN serialization. It might or might not be easier than Java code. I don't know if that applies in your case. Martynad

Re: Strange behaviour of XMLLiterals in RDF/XML

2012-06-25 Thread Martynas Jusevičius
Thanks, I didn't realize XMLLiterals have to be canonical. You don't mean XMLLiterals are going away, do you? Escaped XML would cut off all XML processing tools (I heavily use XSLT on RDF/XML, for example). Martynas On Mon, Jun 25, 2012 at 2:43 PM, Damian Steer d.st...@bristol.ac.uk wrote:

Re: Planning for a new framework for Jena

2012-06-25 Thread Martynas Jusevičius
Joan, could Graphity approach be similar to what you have in mind? http://www.w3.org/2011/09/LinkedData/ledp2011_submission_1.pdf You can see what kind of UI it can render on http://linkeddata.dk. Martynas graphity.org On Mon, Jun 25, 2012 at 7:57 PM, Joan Iglesias joan.igles...@live.com

Re: Planning for a new framework for Jena

2012-06-25 Thread Martynas Jusevičius
Joan, Graphity also allows defining XHTML templates, so the layout and functionallity is fully customizable. You can include all the libraries you want, but the platform doesn't deal with client-side much -- linkeddata.dk is just one of the possible layouts. Do you mean http://www.zkoss.org? If

Re: Can SDB 1.3.4 be used with Jena 2.7.1?

2012-06-25 Thread Martynas Jusevičius
Holger, does that also mean a new release of SPIN API which will be packaged with the latest Jena? Martynas On Tue, Jun 26, 2012 at 1:33 AM, Holger Knublauch hol...@knublauch.com wrote: We are now starting the process of upgrading our platform to the latest Jena version(s). I noticed that SDB

Re: Can SDB 1.3.4 be used with Jena 2.7.1?

2012-06-26 Thread Martynas Jusevičius
Have you tried TDB? I think it's currently more actively developed and more performant. On Jun 26, 2012 1:55 AM, Holger Knublauch hol...@knublauch.com wrote: Yes this is my hope, assuming SDB still works for us. Holger On 6/26/2012 9:46, Martynas Jusevičius wrote: Holger, does that also

Re: Property not removed?

2012-06-26 Thread Martynas Jusevičius
Note that the statement seems to point to a bNode so a simple remove is probably not enough anyway. Dave, can you elaborate on this a little? What I'm trying to do, is to replace such ORDER BY expression sp:orderBy ([ a sp:Desc ; sp:expression

Re: Planning for a new framework for Jena

2012-07-26 Thread Martynas Jusevičius
Joan, take a look at the recent Graphity release, which enables a full read/write RDF round-trip with Jena- and JAX-RS-compatible components: https://github.com/Graphity/graphity-browser Martynas graphity.org On Tue, Jun 26, 2012 at 1:27 AM, Joan Iglesias joan.igles...@live.com wrote: I've

Re: named owl:Restriction classes

2012-10-25 Thread Martynas Jusevičius
Hey Milorad, not 100% sure but could this thread be relevant? http://lists.w3.org/Archives/Public/semantic-web/2012Jul/0082.html Martynas graphity.org On Thu, Oct 25, 2012 at 12:07 PM, Milorad Tosic mbto...@yahoo.com wrote: Hi, I may missed something fundamental about OWL, so would someone

Re: ARQNotImplemented exception thrown by ARQ function calls

2012-10-29 Thread Martynas Jusevičius
There's another way to modify queries dynamically - as RDF using SPIN vocabulary: http://www.w3.org/Submission/2011/SUBM-spin-modeling-20110222/ Example QueryBuilder class: https://github.com/Graphity/graphity-ldp/blob/master/src/main/java/org/graphity/util/QueryBuilder.java Martynas

Re: Multithreads with Jena

2012-11-11 Thread Martynas Jusevičius
Hey Uri, I was just reading about concurrency in Jena, might be relevant for you as well: http://jena.sourceforge.net/how-to/concurrency.html Martynas graphity.org On Sun, Nov 11, 2012 at 1:01 PM, Uri Shani sh...@il.ibm.com wrote: Is Jena thread-safe? What would be the limitations on that

Ontology caching per request?

2012-11-16 Thread Martynas Jusevičius
Hey all, I'm having a little problem with a trade-off between ontology caching and consistency. I'm using JAX-RS resources with default per-request life-cycle (an object is created for each request). Resource instance reads an OntModel from ontology file using OntDocumentManager (caching turned

Re: arq - accept header in remote SPARQL update

2012-12-06 Thread Martynas Jusevičius
If Jena would be consistent in its HTTP handling and use an established API such as JAX-RS, things could be much easier. Martynas graphity.org On Thu, Dec 6, 2012 at 6:04 PM, Rob Vesse rve...@yarcdata.com wrote: My two cents: In my experience of writing a HTTP connector for Dydra for

Re: arq - accept header in remote SPARQL update

2012-12-06 Thread Martynas Jusevičius
) within Linked Data -- what else do we need? Martynas On Thu, Dec 6, 2012 at 10:36 PM, Rob Vesse rve...@yarcdata.com wrote: On 12/6/12 12:31 PM, Andy Seaborne a...@apache.org wrote: On 06/12/12 20:03, Martynas Jusevičius wrote: If Jena would be consistent in its HTTP handling and use

Re: Retrieving CONSTRUCT results as n3

2013-01-09 Thread Martynas Jusevičius
Olivier, what are you trying to achieve? Wouldn't QueryEngineHTTP help you here? http://jena.apache.org/documentation/javadoc/arq/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.html On Wed, Jan 9, 2013 at 2:22 PM, Olivier Rossel olivier.ros...@gmail.com wrote: QueryExecutionFactory

Re: A Model's URI

2013-02-06 Thread Martynas Jusevičius
Mark, ontologies usually have URIs, but Models don't (named graphs come close, but that's in triplestores). As Model is just a set of statements, there might be multiple ontologies in one Model. You can list ontologies in OntModel:

ResourceFactory.createPlainLiteral(String, String)

2013-02-06 Thread Martynas Jusevičius
Hey, seems to me that a method to create an untyped Literal with language tag is missing from ResourceFactory? I mean this form: http://jena.apache.org/documentation/javadoc/jena/com/hp/hpl/jena/rdf/model/Model.html#createLiteral(java.lang.String, java.lang.String) Martynas graphity.org

Re: ReverseProxy

2013-02-07 Thread Martynas Jusevičius
Rurik, not sure what your use case is exactly, but I recently replaced Apache with Varnish as the frontend for Tomcat. It seems to work fine, and additionally you get HTTP cache. Maybe it could be useful: https://www.varnish-cache.org Martynas graphity.org On Thu, Feb 7, 2013 at 11:46 PM, Rurik

Re: loading data into different graphs

2013-02-14 Thread Martynas Jusevičius
Stefan, I presume you have to use N-Quads or TriX syntax to do this in one go -- RDF/XML and Turtle do not support named graphs. Alternatively you could import one graph at a time? Martynas graphity.org On Thu, Feb 14, 2013 at 9:29 AM, Stefan Scheffler sscheff...@avantgarde-labs.de wrote:

DEBUG FBRuleInfGraph messages

2013-02-21 Thread Martynas Jusevičius
Hey, how can I switch off the inference rule debug messages like this one: 12:37:13,406 DEBUG FBRuleInfGraph:264 - Adding rule [ (?x http://spinrdf.org/sp#variable ?y) - (?x rdf:type http://spinrdf.org/sp#Bind) ] I'm using Jena 2.7.2. I tried this in log4j.properties but it doesn't seem to

Re: srv:serviceContext in QueryEngineHTTP

2013-02-26 Thread Martynas Jusevičius
at 1:49 PM, Martynas Jusevičius marty...@graphity.org wrote: Hey, I'm running SPARQL queries on endpoints with HTTP Basic authentication, and am looking for a convenient way to manage and configure the credentials. Currently I've implemented a simple registry that checks endpoint URIs

Re: srv:serviceContext in QueryEngineHTTP

2013-02-26 Thread Martynas Jusevičius
have moved on since then. How do things stand relative to Jena 2.10.0? On 26/02/13 13:45, Martynas Jusevičius wrote: I extended QueryEngineHTTP to achieve what I had described: https://raw.github.com/Graphity/graphity-ldp/rf-input-mode/src/main/java/org/graphity/ldp/query/QueryEngineHTTP.java

Re: Owl instance testing with Jena

2013-03-05 Thread Martynas Jusevičius
Vegard, have you looked at SPIN constraints? http://spinrdf.org/spin.html#spin-constraints http://semwebquality.org/ontologies/dq-constraints Martynas graphity.org On Tue, Mar 5, 2013 at 10:20 AM, Vegard Vaage vegard.va...@tv2.no wrote: Hi! I'm trying to verify instance data against an

Re: Architecture Direction

2013-03-27 Thread Martynas Jusevičius
Claude, SPARQL endpoint implementation in Graphity Linked Data server can proxy another endpoint, or serve a local Model. It can be accessed via HTTP or directly through JAX-RS object methods:

QueryEngineHTTP.setInitialBinding() using ParameterizedSparqlString?

2013-04-03 Thread Martynas Jusevičius
Hey all, QueryEngineHTTP does not implement setInitialBindings() due to Jena's implementation specifics, as I found out a while ago: http://mail-archives.apache.org/mod_mbox/jena-users/201201.mbox/%3c4f11b03e.7040...@apache.org%3E However, this lack of uniformity prevents generic code that

Re: QueryEngineHTTP.setInitialBinding() using ParameterizedSparqlString?

2013-04-03 Thread Martynas Jusevičius
be to inject a VALUES clause into the query though there may be some issues with scoping and collision with existing VALUES clauses Feel free to open a JIRA Rob On 4/3/13 9:21 AM, Martynas Jusevičius marty...@graphity.org wrote: Hey all, QueryEngineHTTP does not implement

Problem serializing ORDER BY ASC() in Query?

2013-05-07 Thread Martynas Jusevičius
Hey, with such query string SELECT * { ?s ?p ?o } ORDER BY ASC(STR(?o)) passed into QueryFactory.create() and calling toString() on the Query object, what I get back is: SELECT * WHERE { ?s ?p ?o } ORDER BY ASCstr(?o) where ASC is missing parentheses . DESC() doesn't have this

Re: Problem serializing ORDER BY ASC() in Query?

2013-05-07 Thread Martynas Jusevičius
BTW, I'm using Jena 2.7.2 / ARQ 2.9.2. On Tue, May 7, 2013 at 9:34 PM, Martynas Jusevičius marty...@graphity.org wrote: Hey, with such query string SELECT * { ?s ?p ?o } ORDER BY ASC(STR(?o)) passed into QueryFactory.create() and calling toString() on the Query object, what I get back

Static Logger references

2013-05-08 Thread Martynas Jusevičius
Hey, Jena uses a pattern to define static Logger objects that I have adopted: private static Logger log = LoggerFactory.getLogger(FileManager.class) ; However some online material indicates this pattern as a possible source of memory leaks, especially when the application is deployed in a

Re: Spin integration

2013-05-29 Thread Martynas Jusevičius
Hey Matias, I'm using SPIN API in Graphity Linked Data platform. Here's an example of a SPIN-based SPARQL QueryBuilder: https://github.com/Graphity/graphity-browser/blob/master/src/main/java/org/graphity/processor/query/QueryBuilder.java I'm also planning to use SPIN constraints to validate

Re: Spin integration

2013-05-29 Thread Martynas Jusevičius
it on startup, I'm trying to find an example now. On Wed, May 29, 2013 at 11:44 AM, Martynas Jusevičius marty...@graphity.org wrote: Hey Matias, I'm using SPIN API in Graphity Linked Data platform. Here's an example of a SPIN-based SPARQL QueryBuilder: https://github.com/Graphity/graphity-browser

Re: Tr : Basic Authentication for SPARQL Update

2013-06-26 Thread Martynas Jusevičius
Rob, as a sidenote for this thread and some previous ones about uniform HTTP access in Jena, I wanted to show how easily authentication can be done using Jersey (implementation of JAX-RS). This is from Graphity subclass of UpdateProcessRemote: @Override public void execute() {

UpdateProcessRemote authentication

2013-07-14 Thread Martynas Jusevičius
Hey, I know changes were introduced (and bugs fixed) in this area, but I'm having trouble getting update requests to work with HTTP Basic authentication. This code should send authenticated INSERT to Dydra: UpdateRequest update = UpdateFactory.create(uString);

Re: Using Fuseki as an HTTP and GSP component

2013-07-25 Thread Martynas Jusevičius
Luis, not directly related to Fuseki, but you could implement a custom GS using JAX-RS interfaces from Graphity: https://github.com/Graphity/graphity-ldp/blob/master/src/main/java/org/graphity/server/model/GraphStore.java There is also a Jena-compatible implementation that functions as a proxy

Re: convert SPARQL query to a query tree

2013-08-02 Thread Martynas Jusevičius
Also consider SPIN from TopQuadrant. SPIN can represent SPARQL as RDF. There is a vocabulary and API: http://spinrdf.org/spin.html http://topbraid.org/spin/api/ Martynas graphityhq.com On Fri, Aug 2, 2013 at 10:55 AM, Amin beyranvand amin_2...@yahoo.com wrote: Hi I want to write an engine

Re: Naming entities

2013-08-15 Thread Martynas Jusevičius
Where uniqueness is more important than readability, I would go with UUIDs. On Thu, Aug 15, 2013 at 2:03 AM, David Moss admo...@gmail.com wrote: This is a fairly basic question, but how do others go about naming entities in an RDF graph? The semantic web evangelists are keen on URIs that

Re: Leaving URIs relative

2013-08-15 Thread Martynas Jusevičius
No, URIs are absolute in RDF model, even though they can be relative in serializations. Why don't you use base URI (@base in Turtle) and/or prefixes so that URIs stay stable no matter where you load the file from? Martynas On Thu, Aug 15, 2013 at 5:39 PM, Norman Walsh n...@nwalsh.com wrote:

Re: Leaving URIs relative

2013-08-15 Thread Martynas Jusevičius
...@nwalsh.com wrote: Martynas Jusevičius marty...@graphity.org writes: No, URIs are absolute in RDF model, even though they can be relative in serializations. Why don't you use base URI (@base in Turtle) and/or prefixes so that URIs stay stable no matter where you load the file from? It's

Re: JSON-LD as a Fuseki output format

2013-09-05 Thread Martynas Jusevičius
I've developed a basic XSLT 2.0 stylesheet transforming Jena's RDF/XML into simple JSON-LD: https://github.com/Graphity/graphity-browser/blob/master/src/main/resources/org/graphity/client/writer/rdfxml2json-ld.xsl Graphity's JSONLDWriter can be used as a MessageBodyWriterModel provider in a

Re: Bug with xsd:date datatype

2013-09-12 Thread Martynas Jusevičius
Does November ever have 31 days? On Thu, Sep 12, 2013 at 12:47 PM, Julien Plu julien@redaction-developpez.com wrote: Hi, I use Jena 2.10.1 to compute the age of people from french DBpedia dataset. When I retrieve a date, sometimes, this code date.getValue(), where date is a Literal,

Fuseki DatasetAdapter not escaping graph URI?

2013-09-13 Thread Martynas Jusevičius
Hey, I'm using DatasetAdapter to access a Graph Store. It seems to me however that it is not properly escaping graph URI when building the request URI. 4.2 Indirect Graph Identification (http://www.w3.org/TR/sparql11-http-rdf-update/#indirect-graph-identification) gives an example of encoded

Re: Fuseki DatasetAdapter not escaping graph URI?

2013-09-13 Thread Martynas Jusevičius
This is probably the correct encoded value (including slashes etc): http%3A%2F%2Flocalhost%3A8080%2Fgraphs%2F2013%2520Danfoss%2520MPHE.xlsx On Fri, Sep 13, 2013 at 1:35 PM, Martynas Jusevičius marty...@graphity.org wrote: Hey, I'm using DatasetAdapter to access a Graph Store. It seems to me

Re: Fuseki DatasetAdapter not escaping graph URI?

2013-09-14 Thread Martynas Jusevičius
AM, Andy Seaborne a...@apache.org wrote: Version? IIRC there was a fix around here not so long ago. On 13/09/13 12:41, Martynas Jusevičius wrote: This is probably the correct encoded value (including slashes etc): http%3A%2F%2Flocalhost%3A8080%2Fgraphs%2F2013%2520Danfoss%2520MPHE.xlsx http%3A

Re: Fuseki DatasetAdapter not escaping graph URI?

2013-09-14 Thread Martynas Jusevičius
Ok, I found it and the new target(Node name) method seems to do the trick: https://svn.apache.org/repos/asf/jena/trunk/jena-arq/src/main/java/org/apache/jena/web/DatasetGraphAccessorHTTP.java On Sat, Sep 14, 2013 at 1:49 PM, Martynas Jusevičius marty...@graphity.org wrote: Sorry about

Re: Tool to build model from scratch

2013-09-25 Thread Martynas Jusevičius
Charles, you can try Graphity for UI building: https://github.com/Graphity/graphity-browser It transforms RDF/XML to (X)HTML using modular XSLT templates, and includes default generic layout as well as specialized stylehseets for vocabularies such as GoodRelations (which should be useful for

SERVICE within GRAPH

2013-09-29 Thread Martynas Jusevičius
Hey, I want to do federation between to endpoints, both of which contain named graphs. I'm trying a query of this shape: PREFIX foaf: http://xmlns.com/foaf/0.1/ PREFIX acl: http://www.w3.org/ns/auth/acl# SELECT * WHERE { GRAPH

NPE in QueryHTTPEngine.execModel() (ARQ 2.9.2)

2013-10-29 Thread Martynas Jusevičius
Hey, one of Graphity users has configured it with Sesame SPARQL endpoint, but he gets an NPE in ARQ code: 11:15:54,198 DEBUG DataManager:98 - Remote service http://localhost:8080/openrdf-workbench/repositories/odn/query Query: DESCRIBE ?instance http://192.168.122.30:8080/graphity-browser/ WHERE

Re: How to export uri prefixes within a resourse value

2013-10-29 Thread Martynas Jusevičius
What you want can be done on the syntactic XML level using entities: rdf:type rdf:resource=rdfs;Resource/ This would require a local entity definition however: !DOCTYPE rdf:RDF [ !ENTITY rdfs http://www.w3.org/2000/01/rdf-schema#; ] I don't think it can be done using qualified names as

Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-13 Thread Martynas Jusevičius
Hey, I have datetime components as 3 separate literals, with xsd:gYear, xsd:gMonth, xsd:gDay respective datatypes. Not all mandatory - the format can be , -MM, -MM-DD. Now how do I combine those into a single xsd:dateTime Literal? A concrete use case would be converting

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Martynas Jusevičius
, you can then use createTypedLiteral(String lex, RDFDatatype dtype) Not all mandatory - the format can be , -MM, -MM-DD. You could build the lexical form. Andy On 14/11/13 02:02, Martynas Jusevičius wrote: Hey, I have datetime components as 3 separate literals

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Martynas Jusevičius
OK I was probably too quick - now I realized the syntax of xsd:gMonth and xsd:gDay is not so simple... On Thu, Nov 14, 2013 at 4:05 PM, Martynas Jusevičius marty...@graphity.org wrote: I came up with an approach that concatenates lexical values and doesn't need Calendar or DateTimeStruct

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Martynas Jusevičius
, Andy Seaborne a...@apache.org wrote: On 14/11/13 16:42, Martynas Jusevičius wrote: OK I was probably too quick - now I realized the syntax of xsd:gMonth and xsd:gDay is not so simple... :-) http://www.w3.org/TR/xmlschema11-2/#dateTime for details. The range of time:month is a non

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Martynas Jusevičius
BTW, there seems to be a related question on StackOverflow: http://answers.semanticweb.com/questions/610/ordering-by-time-in-sparql-query I might just give up building an xsd:dateTime and use separate year/month/day components. On Thu, Nov 14, 2013 at 7:26 PM, Martynas Jusevičius marty

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Martynas Jusevičius
: On 14/11/13 18:29, Martynas Jusevičius wrote: BTW, there seems to be a related question on StackOverflow: http://answers.semanticweb.com/questions/610/ordering-by-time-in-sparql-query I might just give up building an xsd:dateTime and use separate year/month/day components. On Thu, Nov 14

Re: How to correct com.hp.hpl.jena.rdf.model.HasNoModelException

2013-12-05 Thread Martynas Jusevičius
This might happen if the Resource object has been created using ResourceFactory.createResource(), in which case its getModel() returns null. Martynas graphityhq.com On Thu, Dec 5, 2013 at 2:44 PM, Dibyanshu Jaiswal djthequ...@gmail.com wrote: Hi! I using JenaParliament for spatial queries.

Alternative to org.openjena.riot.WebContent?

2013-12-05 Thread Martynas Jusevičius
Hey, I'm using constants from org.openjena.riot.WebContent, such as WebContent.contentTypeRDFXML, WebContent.langRDFXML etc. After upgrading to Jena 2.11.0 (as part of SPIN API 1.3.1), the WebContent class is not there anymore. What can I use instead? Thanks. Martynas

Re: Alternative to org.openjena.riot.WebContent?

2013-12-05 Thread Martynas Jusevičius
(WebContent.contentTypeTurtle, WebContent.langTurtle); // snip } Martynas On Thu, Dec 5, 2013 at 11:45 PM, Martynas Jusevičius marty...@graphity.org wrote: Hey, I'm using constants from org.openjena.riot.WebContent, such as WebContent.contentTypeRDFXML, WebContent.langRDFXML etc. After

Re: Alternative to org.openjena.riot.WebContent?

2013-12-05 Thread Martynas Jusevičius
) and use constants not Strings. Andy On 05/12/13 22:57, Martynas Jusevičius wrote: Or rather, what functionality can replace langFromContentType() that I was using to convert media type to Jena syntax name: String syntax = langFromContentType(in.getMimeType

Re: call a Sparql command in a rule, is it possible?

2013-12-05 Thread Martynas Jusevičius
Miguel, not exactly sure, but maybe SPIN rules could help you? http://spinrdf.org/spin.html#spin-rules Martynas On Fri, Dec 6, 2013 at 1:20 AM, Miguel Bento Alves mbentoal...@gmail.com wrote: Is it possible call a Sparql command in a rule? Can we do that with a custom built-in function? An

Re: Alternative to org.openjena.riot.WebContent?

2013-12-06 Thread Martynas Jusevičius
if RDFLanguages.contentTypeToLang() returns null before calling read()/write(). On Fri, Dec 6, 2013 at 1:39 PM, Andy Seaborne a...@apache.org wrote: On 06/12/13 12:08, Martynas Jusevičius wrote: Thanks Andy. Yes looks like I have some upgrading to do... Can you provide more info about that FileManager adapter

RDF/XML writer bug in 2.11.0?

2013-12-08 Thread Martynas Jusevičius
Hey, I've upgraded to Jena 2.11.0 as part of SPIN API 1.3.1. As a result, previously working RDF/XML output breaks: com.hp.hpl.jena.shared.BadURIException: Only well-formed absolute URIrefs can be included in RDF/XML output: # Code: 57/REQUIRED_COMPONENT_MISSING in SCHEME: A component that is

HttpException: 411 - Length Required

2013-12-10 Thread Martynas Jusevičius
Hey, after upgrade to 2.11.0 I get this exception during Graph Store Protocol request: org.apache.jena.atlas.web.HttpException: 411 - Length Required org.apache.jena.riot.web.HttpOp.exec(HttpOp.java:1020) org.apache.jena.riot.web.HttpOp.execHttpPost(HttpOp.java:633)

Re: HttpException: 411 - Length Required

2013-12-10 Thread Martynas Jusevičius
wrote: On 10/12/13 14:33, Martynas Jusevičius wrote: Hey, after upgrade to 2.11.0 I get this exception during Graph Store Protocol request: org.apache.jena.atlas.web.HttpException: 411 - Length Required org.apache.jena.riot.web.HttpOp.exec(HttpOp.java:1020

Re: HttpException: 411 - Length Required

2013-12-12 Thread Martynas Jusevičius
Andy, speaking of nginx - maybe you happen to know if is possible to limit request content size without a Content-Length header? Martynas On Tue, Dec 10, 2013 at 6:53 PM, Andy Seaborne a...@apache.org wrote: On 10/12/13 16:26, Martynas Jusevičius wrote: I'm upgrading from an old version

Escaping SPARQL regex

2014-01-20 Thread Martynas Jusevičius
Hey, is there a way to build a SPARQL-specific regex string in Jena? Now I'm using the Pattern class to implement simple regex() based search. If the search string contains special characters, escaping is done but the syntax does not seem to work. For example,

Re: Escaping SPARQL regex

2014-01-20 Thread Martynas Jusevičius
/#grammarEscapes On Tue, Jan 21, 2014 at 1:59 AM, Joshua TAYLOR joshuaaa...@gmail.com wrote: On Mon, Jan 20, 2014 at 7:30 PM, Martynas Jusevičius marty...@graphity.org wrote: For example, Pattern.compile(Pattern.quote(+35)) produces query with FILTER regex(str(?label), \\Q+35\\E, i) which returns

Re: Escaping SPARQL regex

2014-01-21 Thread Martynas Jusevičius
= ... + filter(regex(...,\+35\) + ...; Sorry for the hasty and inaccurate reply. On Mon, Jan 20, 2014 at 9:27 PM, Joshua TAYLOR joshuaaa...@gmail.com wrote: On Mon, Jan 20, 2014 at 8:48 PM, Martynas Jusevičius marty...@graphity.org wrote: OK maybe +35 was a bad example. But isn't + a special

Re: Escaping SPARQL regex

2014-01-22 Thread Martynas Jusevičius
Thanks Andy. REUtil.quoteMeta() seems to do the trick. On Tue, Jan 21, 2014 at 6:22 PM, Andy Seaborne a...@apache.org wrote: On 21/01/14 16:58, Martynas Jusevičius wrote: Andy, what if I'm sending the query to a remote endpoint that does not support Java style regex syntax? Do I need to use

Re: Update an existing TDB with a RDF file

2014-01-29 Thread Martynas Jusevičius
Frederic, are you sure this hasn't been done before? I've used JenaBean [1], but I know there are at least several other similar projects. Martynas [1] https://code.google.com/p/jenabean/ On Wed, Jan 29, 2014 at 2:58 PM, Frederic Toublanc frederic.toubl...@telemis.com wrote: Ok thx a lot :)

Re: controlling RDF/XML-ABBREV output

2014-02-08 Thread Martynas Jusevičius
One option is to do post-processing with XSLT. Here's a stylesheet that groups and sorts resource descriptions and properties within them: https://github.com/Graphity/graphity-browser/blob/master/src/main/webapp/static/org/graphity/client/xsl/group-sort-triples.xsl Martynas graphityhq.com On

Re: SPARQL 1.1 Graphstore Protocol

2014-02-09 Thread Martynas Jusevičius
Will, check DatasetAdapter: http://jena.apache.org/documentation/javadoc/arq/org/apache/jena/web/DatasetAdapter.html Martynas On Mon, Feb 10, 2014 at 12:52 AM, Will william_gree...@hotmail.com wrote: Hi, I am writing some Groovy extensions for Jena, but am struggling to find anything about

Re: Fuskei: ordering in Construct

2014-02-27 Thread Martynas Jusevičius
Mark, if you are using DESCRIBE or CONSTRUCT queries then the result you get is a Model. And a model is a set of statements which is not ordered. You can do post-processing to sort them the way you want, e.g. when you are presenting data to the user. Martynas On Thu, Feb 27, 2014 at 2:29 PM,

Re: Fuskei: ordering in Construct

2014-02-27 Thread Martynas Jusevičius
On Thu, 27 Feb 2014 14:34:49 +0100 Martynas Jusevičius marty...@graphity.org wrote: Mark, if you are using DESCRIBE or CONSTRUCT queries then the result you get is a Model. And a model is a set of statements which is not ordered. You can do post-processing to sort them the way you want, e.g. when

Re: A query with an OR smaller doesn't work, but the same OR bigger does!

2014-03-08 Thread Martynas Jusevičius
Jose, sorry can't help with your question - just wanted to let you know that FILTER (?actor IN (http://data.linkedmdb.org/resource/actor/30711, ...)) is a shorter version of the same expression, in case you were not aware: http://www.w3.org/TR/sparql11-query/#func-in Are you implementing

Re: Sparql To SQL

2014-03-30 Thread Martynas Jusevičius
Hey, have you tried D2RQ? http://d2rq.org Martynas On Sun, Mar 30, 2014 at 11:37 AM, Kamalraj Jairam kjai...@semanticsoftware.com.au wrote: Hello All, Whats the best way to convert sparql to SQL using R2RML mappings and convert resultset from DB to RDF? Thanks -- Kjairam Sent with

Re: Sparql To SQL

2014-03-30 Thread Martynas Jusevičius
There are also commercial options, e.g. this: http://www.revelytix.com/content/spyder On Sun, Mar 30, 2014 at 10:15 PM, Kamalraj Jairam kjai...@semanticsoftware.com.au wrote: Hello Paul, These are the informtion i have 1) R2RML mapping for existing DB 2) I have some fedreated queries which

Re: Building Semantic Web Application

2014-04-18 Thread Martynas Jusevičius
Mohammad, I think Ordnance Survey Linked Data is a good example that it can: http://data.ordnancesurvey.co.uk Martynas On Fri, Apr 18, 2014 at 12:09 PM, Mohammad Hailmizan Bin Jafar hailmizan.ja...@egc.gov.bn wrote: I would like to build e-govt service application (e-services) such as Land

Re: Jena libraries in Netbeans

2014-04-26 Thread Martynas Jusevičius
David, Using Jena as Maven dependencies is much easier. Martynas On Apr 26, 2014 9:32 AM, David Moss admo...@gmail.com wrote: Jena libraries in Netbeans Saturday, 26 April 2014 12:38 PM Adding Jena to Netbeans was interesting. Lots of trial and error. There were tutorials on how to

Re: Consistency checking

2014-04-27 Thread Martynas Jusevičius
Hey Cindy, Check SPIN constraints: http://spinrdf.org/spin.html#spin-constraints Martynas graphityhq.com On Apr 27, 2014 1:41 PM, Cindy A McMullen cindy.mcmul...@oracle.com wrote: Hi - Is there a way to check the consistency of triples with one's ontology prior to insertion into the graph?

Turning off RDF/XML canonicalization check

2014-06-25 Thread Martynas Jusevičius
Hey, is this possible? Or is there a workaround? I need XMLLiteral as embedded XML (actually XHTML) regardless if it's canonical or not, otherwise XSLT processing breaks. I've tuned the XHTML quite sucessfully, but still there are some large literals failing, even though they look canonical to

Re: Turning off RDF/XML canonicalization check

2014-06-25 Thread Martynas Jusevičius
I would be willing to fix the XHTML as well, but I haven't found a way to identify exactly what causes the problem. I'm attaching the file, maybe that helps. On Wed, Jun 25, 2014 at 9:41 PM, Martynas Jusevičius marty...@graphity.org wrote: Hey, is this possible? Or is there a workaround? I

Assembler for Datasets

2014-08-23 Thread Martynas Jusevičius
Hey, are there any examples on how to assemble a Dataset, with files becoming (possibly renamed) named graphs? Or maybe assembler is not the right tool for this? I checked the how-to but it's mostly about Models. https://jena.apache.org/documentation/assembler/assembler-howto.html Martynas

OntModel resources - main or imported?

2014-08-25 Thread Martynas Jusevičius
Hey, is it possible to check if resource in OntModel comes from the main/root ontology or the owl:imports? Is thought that is what isInBaseModel() does, but I don't get expected result.

Re: OntModel resources - main or imported?

2014-08-26 Thread Martynas Jusevičius
On Tue, Aug 26, 2014 at 9:57 AM, Dave Reynolds dave.e.reyno...@gmail.com wrote: On 26/08/14 02:10, Martynas Jusevičius wrote: Hey, is it possible to check if resource in OntModel comes from the main/root ontology or the owl:imports? Is thought that is what isInBaseModel() does, but I don't get

Re: Assembler for Datasets

2014-09-04 Thread Martynas Jusevičius
couldn't see any openDataset() or similar methods that would return the assembled Dataset? Martynas On Sun, Aug 24, 2014 at 3:12 PM, Andy Seaborne a...@apache.org wrote: On 23/08/14 23:43, Martynas Jusevičius wrote: Hey, are there any examples on how to assemble a Dataset, with files becoming

ReorderTransformationBase logging

2014-09-17 Thread Martynas Jusevičius
Hey, could the logging level of this class be reduced to TRACE? Right now it is DEBUG and produces a lot of quite cryptic output. Martynas

FILTER NOT EXISTS semantics

2014-09-29 Thread Martynas Jusevičius
Hey, can someone explain to me why the following query returns no results: PREFIX dct: http://purl.org/dc/terms/ PREFIX gr: http://purl.org/goodrelations/v1# PREFIX skos: http://www.w3.org/2004/02/skos/core# SELECT * WHERE { ?this a gr:ProductOrServiceModel . FILTER NOT EXISTS {

Re: FILTER NOT EXISTS semantics

2014-09-29 Thread Martynas Jusevičius
a skos:Concept } } On Mon, Sep 29, 2014 at 2:15 PM, Martynas Jusevičius marty...@graphity.org wrote: Hey, can someone explain to me why the following query returns no results: PREFIX dct: http://purl.org/dc/terms/ PREFIX gr: http://purl.org/goodrelations/v1# PREFIX skos: http://www.w3.org

Re: FILTER NOT EXISTS semantics

2014-09-30 Thread Martynas Jusevičius
Thanks Andy! On Sep 29, 2014 10:22 PM, Andy Seaborne a...@apache.org wrote: On 29/09/14 12:56, Martynas Jusevičius wrote: OK, I realize now the valid ?subject was still matching the FILTER pattern. I guess what I need here is MINUS: PREFIX dct: http://purl.org/dc/terms/ PREFIX gr: http

Re: Good Style to interact with Jena

2014-10-22 Thread Martynas Jusevičius
Benjamin, Regarding creation of RDF from SQL (relational databases), take a look at D2RQ: http://d2rq.org You can define a declarative mapping and pass it to D2RQ. In the ideal case you won't even have to touch Java. Martynas On Thu, Oct 9, 2014 at 11:02 PM, Benjamin Eckstein umi...@gmail.com

Re: RDF/XML-ABBREV problems with inline node expansion

2014-11-17 Thread Martynas Jusevičius
PM, Hammond, Tony tony.hamm...@macmillan.com wrote: Hi Martynas: As said: The basic RDF/XML output from Jena is not what we need. We just need a better, more regular, RDF/XML-ABBREV such as the rapper output. Cheers, Tony On 17/11/2014 14:35, Martynas Jusevičius marty...@graphity.org

Re: Using Model inside Java Objects.

2014-11-27 Thread Martynas Jusevičius
David, in my experience this approach only gives you the object-model impedance mismatch and no real advantages. Have you considered working directly on Jena Models and Resources? Martynas graphityhq.com On Thu, Nov 20, 2014 at 11:13 PM, David Moss admo...@gmail.com wrote: Until now I have

Encoding RDFNode as N-Triples token (for the Sesame REST HTTP Protocol)

2015-01-23 Thread Martynas Jusevičius
Hey, I need to implement Sesame HTTP protocol for remotely parameterized queries: http://rdf4j.org/sesame/2.7/docs/system.docbook?view#repository-queries My plan is to pass QuerySolutionMap to the QueryEngineHTTP level which then would encode the values as N-Triples and add them to the query

Re: Encoding RDFNode as N-Triples token (for the Sesame REST HTTP Protocol)

2015-01-23 Thread Martynas Jusevičius
pass the parameters remotely, then this step is avoided. On Fri, Jan 23, 2015 at 9:22 PM, Andy Seaborne a...@apache.org wrote: On 23/01/15 19:52, Martynas Jusevičius wrote: Hey, I need to implement Sesame HTTP protocol for remotely parameterized queries: http://rdf4j.org/sesame/2.7/docs

Re: Adding NegativePropertyAssertion to ABox

2015-01-26 Thread Martynas Jusevičius
I think an even shorter version should work, as most Resource methods follow the builder pattern: negativePropertyAssertion.addProperty(OWL2.assertionProperty, hasPropertyR). addProperty(OWL2.sourceIndividual, sourceIndividual). addProperty(OWL2.targetIndividual,

Params.httpString() URI-encoding

2015-02-19 Thread Martynas Jusevičius
Hey, I have some code that adds query parameters to SPARQL Protocol requests. According to my quick research, the final HTTP query string depends on com.hp.hpl.jena.sparql.engine.http.Params.httpString(): public String httpString() { StringBuffer sbuff = new StringBuffer() ;

Re: Best way to synchonize across graphs

2015-01-28 Thread Martynas Jusevičius
HTTP error code 403 means the client does not have access to the requested resource: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4 On Thu, Jan 29, 2015 at 2:57 AM, Trevor Donaldson tmdona...@gmail.com wrote: Trying to use DatasetAccessor. I am getting the following error.

Re: Encoding RDFNode as N-Triples token (for the Sesame REST HTTP Protocol)

2015-01-26 Thread Martynas Jusevičius
Is there some code that can build the VALUES part from QuerySolutionMap? On Fri, Jan 23, 2015 at 9:22 PM, Andy Seaborne a...@apache.org wrote: On 23/01/15 19:52, Martynas Jusevičius wrote: Hey, I need to implement Sesame HTTP protocol for remotely parameterized queries: http://rdf4j.org

Re: Design a JEE / Jena TDB / MVC web application - best practice

2015-01-05 Thread Martynas Jusevičius
Nicolas, I suggest you also take a look at Graphity Client: https://github.com/Graphity/graphity-client You don't really need an object layer representing your RDF classes above Jena, it is a bottleneck. You can express both the webapp structure and the instance data as RDF, and define a mapping

Re: Graph traversal and Jena TDB

2015-01-09 Thread Martynas Jusevičius
There was some interesting research from Microsoft about their Trinity RDF store, could be relevant here: http://research.microsoft.com/apps/pubs/default.aspx?id=183717 On Fri, Jan 9, 2015 at 7:05 PM, Andy Seaborne a...@apache.org wrote: On 09/01/15 11:08, Olivier Rossel wrote: Hi everyone.

  1   2   3   4   5   6   7   8   >