Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:40
    hmottestad synchronize #3616
  • 13:40

    hmottestad on GH-3585-improve-sorting-2

    GH-3597 Moved exportStatements,… GH-3597 Replaced Hamcrest usage… GH-3570 Multi-threading with ci… and 13 more (compare)

  • 13:15
    hmottestad synchronize #3616
  • 13:15

    hmottestad on GH-3585-improve-sorting-2

    wip Signed-off-by: Håvard Ott… (compare)

  • 13:14
    hmottestad synchronize #3616
  • 13:14

    hmottestad on GH-3585-improve-sorting-2

    wip Signed-off-by: Håvard Ott… (compare)

  • 13:00
    hmottestad synchronize #3596
  • 13:00

    hmottestad on GH-3587-core-datatype-enum

    more tests and some cleanup Si… (compare)

  • 10:33
    hmottestad synchronize #3596
  • 10:33

    hmottestad on GH-3587-core-datatype-enum

    some cleanup and tests Signed-… (compare)

  • 09:35
    hmottestad commented #3596
  • 09:35
    hmottestad commented #3596
  • 09:34
    hmottestad synchronize #3596
  • 09:34

    hmottestad on GH-3587-core-datatype-enum

    GH-3587 initial support for usi… (compare)

  • 09:10
    hmottestad synchronize #3616
  • 09:10

    hmottestad on GH-3585-improve-sorting-2

    wip Signed-off-by: Håvard Ott… (compare)

  • Jan 17 22:18
    jeenbroekstra labeled #3611
  • Jan 17 19:17
    barthanssens closed #3617
  • Jan 17 18:16
    hmottestad commented #3616
  • Jan 17 13:11

    barthanssens on develop

    GH-3617: update apache commons … (compare)

JervenBolleman
@JervenBolleman
Oh, no. I am going to decline that as I want to finish the prepare/precompile the query execution part
Long run, yes I could look at it.
Jeen Broekstra
@jeenbroekstra
No worries, I was just joking / hoping to palm it off :) I'll take a closer look at it myself when I can - it's probably just a filter tweak
anyway, way past my bedtime, i'll be signing off. Ttyl!
JervenBolleman
@JervenBolleman
Sleep well!
Jeen Broekstra
@jeenbroekstra
i've started the release process for 3.7.4
Bart Hanssens
@barthanssens
FWIW, I've pushed a 3.7.4 multi-platform docker image to https://hub.docker.com/r/eclipse/rdf4j-workbench
It's the first multi-platform version (previously I've pushed platform-specific versions separately), so it would be helpful if someone could test on ARM (since I no longer have access to an ARM-machine...)
Jeen Broekstra
@jeenbroekstra
Thanks @barthanssens . We really need to make that part of the release procedure....
Bart Hanssens
@barthanssens
one thing I'd suggest is to use a "multi-stage" docker file https://docs.docker.com/develop/develop-images/multistage-build/, basically it turns most of the shell script + docker build file into 1 single docker build file (with the first stage being a build container that is equivalent to the shell script)
makes it somewhat platform-independent (though I doubt many people are building on Windows...)
Bart Hanssens
@barthanssens
by the way, do we want to keep all the older images on hub.docker.com or could we remove a few older ones (e.g. only keep 3.4.4 and not 3.4.3) ?
Jeen Broekstra
@jeenbroekstra
For me it's mostly a "knowing where to start" thing. I don't necessarily mind if there's a number of different commands to execute - I just need to have it documented in easy terms what I need to do, each release (and I also need to be reminded to do it, each release).
as for older images, I'm fine with removing older ones - for anything pre 3.4.0 for example
Simone Di Cola
@dicolasi

Hi all, just started with rdf4j. I am following your docs and came across this example:

        Repositories.tupleQuery(sparqlRepository, queryString, QueryResults::asList);

which when I run it, throws -> java: incompatible thrown types X in functional expression

7 replies
Simone Di Cola
@dicolasi
Hi all, need a bit of support with SparqlBuilder. Is there anyone online I can ask to?
5 replies
Simone Di Cola
@dicolasi
Is there a simple way to obtain a json response from this query List<BindingSet> results = Repositories.tupleQueryNoTransaction(sparqlRepository, selectQuery.getQueryString(), r -> QueryResults.asList(r)); using SPARQLResultsJSONWriter?
Jeen Broekstra
@jeenbroekstra

@dicolasi the simplest way to get a JSON response is to do something like this:

try(var conn = sparqlRepository.getConnection()) {
     conn.prepareTupleQuery(selectQuery.getQueryString()).evaluate(new SPARQLResultsJSONWriter(out));
}

This passes the result of the query straight to the writer (instead of first converting it a list of BindingSets).

Btw, you can do the same thing using the Repositories utility class, passing in the writer as an additional argument:

Repositories.tupleQuery(sparqlRepository, selectQuery.getQueryString(), new SPARQLResultsJSONWriter(out));
11 replies
Jeen
@abrokenjester:matrix.org
[m]
Keen to see if we can get a first milestone build for 4.0 out the door next weekend.
Jeen
@abrokenjester:matrix.org
[m]
alrighty, let's get this show on the road. I'm going to be merging several PRs into develop, and make a start on writing some initial upgrade notes for a milestone build, to be produced today or tomorrow.
Jeen
@abrokenjester:matrix.org
[m]
I think I've now merged everything that is ready to be merged.
Jeen
@abrokenjester:matrix.org
[m]
Tagged and notes written. Deployment will follow tomorrow
Florian Kleedorfer
@fkleedorfer
Great, thanks!
Florian Kleedorfer
@fkleedorfer
Is there a site with the documentation for the milestone build? Asking because when the milestone is out it is a good time to ask for feedback in the spring in integration, and the docs would certainly help.
Jeen
@abrokenjester:matrix.org
[m]
There's a pull request up with release notes, but nothing specific about the spring stuff. Feel free to suggest some additions!
Jeen
@abrokenjester:matrix.org
[m]
@fkleedorfer: I'll take a look at pulling your spring documentation over to the main branch, so that we can publish it as part of the milestone release. Unfortunately I cannot simply cherry-pick it since its commits are tied up with code changes that we don't want to enter the main branch just yet. I'll probably fix with a manual copy for now, and we'll resolve conflicts once we get to a final release state.
Jeen
@abrokenjester:matrix.org
[m]
grmbl, will no one rid me of this antiquated spring xml configuration in RDF4J Server?
Jeen
@abrokenjester:matrix.org
[m]
I've only just realized that we have a draft of the 4.0 release notes on the develop branch, and that I completely ignored that for the M1 milestone build (I just rewrote from scratch). I'll need to do some work to bring those back in line (and also do my homework to make sure it's up to date with some of the deprecation/removal work I've been doing)
Bart Hanssens
@barthanssens
not a Spring expert, but are recent Spring versions not annotation-based/capable instead of XML config files ?
or is that just Spring Boot ?
Jeen
@abrokenjester:matrix.org
[m]
no you're quite right - but our server was written when Spring was young and XML was still hot
Florian Kleedorfer
@fkleedorfer
I will look imto it
Jeen
@abrokenjester:matrix.org
[m]
@fkleedorfer: would be great to get your eyes on it. I'd rather see if we can actually reimplement the server from scratch, but maybe a little maintenance can make things easier...
Simone Di Cola
@dicolasi

hi all, got the following query:

prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix sr: <http://data.ordnancesurvey.co.uk/ontology/spatialrelations/>
prefix pc: <http://data.ordnancesurvey.co.uk/ontology/postcode/>
prefix ukhpi: <http://landregistry.data.gov.uk/def/ukhpi/>
prefix lrppi: <http://landregistry.data.gov.uk/def/ppi/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix lrcommon: <http://landregistry.data.gov.uk/def/common/>
PREFIX spatial: <http://data.ordnancesurvey.co.uk/ontology/spatialrelations/>
PREFIX postcode: <http://data.ordnancesurvey.co.uk/ontology/postcode/>


SELECT DISTINCT * {
  SERVICE <http://data.ordnancesurvey.co.uk/datasets/os-linked-data/apis/sparql> {
   SELECT ?ordnanceSurveyRegion
   WHERE {
     VALUES ?outcode {
      "CH"
     }
   ?postcodeArea rdfs:label ?outcode .

   ?postcode spatial:within ?postcodeArea ;
     postcode:district ?ordnanceSurveyRegion .
   }
   LIMIT 1
  }
  ?region owl:sameAs ?ordnanceSurveyRegion ;
   rdfs:label ?regionName .
  FILTER (langMatches(lang(?regionName), "EN"))

  ?report
    ukhpi:refRegion ?region;
    ukhpi:refMonth ?date;
    ukhpi:refPeriodStart ?refPeriodStart ;
    ukhpi:housePriceIndex ?ukhpi ;
    ukhpi:averagePrice ?averagePrice ;
    ukhpi:percentageAnnualChange    ?percentageAnnualChange ;
    ukhpi:percentageChange    ?percentageChange .

} ORDER BY DESC(?date)
LIMIT 1

I am having a bit of troubles in translating it with rdf4j.

  • not clear how to do sub queries
  • not clear how to create a filter.

So far I got this:

 Variable averagePrice = var("averagePrice");
        Variable housePriceIndex = var("housePriceIndex");
        Variable percentageChange = var("percentageChange");
        Variable percentageAnnualChange = var("percentageAnnualChange");
        Variable refPeriodStart = var("refPeriodStart");

        Prefix spatial = prefix(iri("http://data.ordnancesurvey.co.uk/ontology/spatialrelations/"));
        Prefix postcode = prefix(iri("http://data.ordnancesurvey.co.uk/ontology/postcode/"));
        Prefix owl = prefix(iri("http://www.w3.org/2002/07/owl#"));
        Prefix rdfs = prefix(iri("http://www.w3.org/2000/01/rdf-schema#"));
        Prefix ukhpi = prefix(iri("http://landregistry.data.gov.uk/def/ukhpi/"));


        GraphPattern ordnanceSurveyRegion = GraphPatterns.select(var("ordnanceSurveyRegion"))
                .where(var("postcodeArea").has(rdfs.iri("label"), outcode)
                .and(var("postcode").has(spatial.iri("within"), var("postcodeArea"))
                .andHas(postcode.iri("district"), var("ordnanceSurveyRegion")))).limit(1);


        GraphPatterns landRegistryHPI = GraphPatterns.select(averagePrice, housePriceIndex, percentageChange, percentageAnnualChange, refPeriodStart)
                .where(var("region").has(owl.iri("sameAs"),"ordnanceSurveyRegion")
                        .andHas(rdfs.iri("label"),var("regionName")))
                .filter(function(SparqlFunction.LANGMATCHES, ? ?));
37 replies
Simone Di Cola
@dicolasi
Adrian Hamod
@AdrianHamod
Hi everyone! Has anyone managed to get a SpringBoot app to work with rdf4j-spring and ElastisearchStore? I am encountering some weird behavior.
Adrian Hamod
@AdrianHamod
My read operations don't work, but data is saved in ES when writing. It might seem that there is a bug in my implementation but the same read operations fetch results when executing them in the same transactions in which I execute write operations.
Florian Kleedorfer
@fkleedorfer
Haven't tried it with the elastic search store. Might be able to say more if I could see the code. Do you use @Transactional in the methods you use to access the DAOs/RepositoryTemplate?
Adrian Hamod
@AdrianHamod
Yes. It actually just crashes if I dont annotate with @Transactional. I'm cleaning up my local workspace and I will push it to a public repo.
Adrian Hamod
@AdrianHamod
One thing I noticed is that using the connection directly to list everything will workreturn getRdf4JTemplate().applyToConnection(con -> con.getStatements(null, null, null));
Calling the connection with an id doesn't return anything (same as using the repository currently).
I think it's either a bug in my code or the writes don't serialize the data in ES as I would believe they should. But I can't figure out how the writes actually look like at ES client level.
Adrian Hamod
@AdrianHamod
You can view in everything I have in my local workspace in AdrianHamod/BeverageManager@e90d437
I tested with ES 7.8.1 and 7.12.1
1 reply
Florian Kleedorfer
@fkleedorfer
I am not sure about yout transaction manager. Are you sure you need this configuration?
Have you tried with an in-memory repo?
Adrian Hamod
@AdrianHamod
I have not. I want to use ES.
I would've guessed that's the default transaction manager to use with the RDF4J repos
Configuration on line 36 has no impact btw txManager.setTransactionSynchronization(AbstractPlatformTransactionManager.SYNCHRONIZATION_NEVER); It was just my attempt to make it work, forgot to clean it up
Florian Kleedorfer
@fkleedorfer
Ok, I think I would try to write a simple unit test against an inmemory repo and see it that helps narrowing it down. There's a section on unit testing in the programming guide.
Frens Jan Rumph
@frensjan
Hi, I'm exploring Rio. Is there a pull parser? I.e. something that takes an InputStream and returns an Iterator<Statement> and is lazy / reads on the background?
I know of the background reader, but I rather not use a background thread.