Skip to content

Instantly share code, notes, and snippets.

View fkleedorfer's full-sized avatar

Florian Kleedorfer fkleedorfer

View GitHub Profile
@fkleedorfer
fkleedorfer / OptionalPositionBug.java
Created May 24, 2024 09:50
Reproducing the optional position bug
package org.eclipse.rdf4j.bugs;
import org.eclipse.rdf4j.model.vocabulary.RDF;
import org.eclipse.rdf4j.query.TupleQuery;
import org.eclipse.rdf4j.query.TupleQueryResult;
import org.eclipse.rdf4j.repository.RepositoryConnection;
import org.eclipse.rdf4j.repository.sail.SailRepository;
import org.eclipse.rdf4j.sail.memory.MemoryStore;
import static org.eclipse.rdf4j.model.util.Values.iri;
@fkleedorfer
fkleedorfer / delete-queries.txt
Created March 7, 2024 09:36
Delete QUDT properties by query
STATEMENTS TO DELETE:
PREFIX qudt: <http://qudt.org/schema/qudt/>
PREFIX unit: <http://qudt.org/vocab/unit/>
PREFIX constant: <http://qudt.org/vocab/constant/>
PREFIX cur: <http://qudt.org/vocab/currency/>
DELETE { ?u http://qudt.org/schema/qudt/conversionOffset ?m }
WHERE { ?u http://qudt.org/schema/qudt/conversionOffset ?m .
VALUES ?u {
This file has been truncated, but you can view the full file.
<urn:uuid:0e4e68ca-2676-442b-b595-09a26c02bf32> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#Organization> .
<urn:uuid:ddb30519-e789-46d3-a0c9-734ad493b387> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#Standard> .
<urn:uuid:33f111e4-800b-4744-b4c6-d3ee896b1eee> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#PropertySet> .
<urn:uuid:39c83445-5986-4e80-bf6f-7cf7930019cc> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#PropertySet> .
<urn:uuid:5bfffc1f-cd2e-4128-9a30-f56a3e0fe5b8> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#PropertySet> .
<urn:uuid:6e6d2de2-a950-4fae-a3e8-ac72be3b0b34> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#PropertySet> .
<urn:uuid:5e52d813-d274-4e12-b1ca-52dc6750f92c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#Prope
This file has been truncated, but you can view the full file.
<urn:uuid:2ce438f0-c6e3-4789-a923-8ce9b0d467c5> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#Organization> .
<urn:uuid:ef4497c5-a0b8-4672-a137-84a55b4b9128> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#Standard> .
<urn:uuid:8cfdefcd-8fcf-4e09-866c-2fa827ddf74b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#PropertySet> .
<urn:uuid:9fc5fdb9-ae93-49db-9a56-71ab192791e0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#PropertySet> .
<urn:uuid:017a293d-bbe0-4d19-bfe7-f548effa4e9e> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#PropertySet> .
<urn:uuid:fb250a87-c734-4f1d-8878-9898eb8baab6> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#PropertySet> .
<urn:uuid:bc2c5527-6e0b-42bc-b4dd-599cdf35b0fa> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://mms.researchstudio.at/mms#Prope
@fkleedorfer
fkleedorfer / AgreementFunction.java
Created January 3, 2018 16:07
ConcurrentModificationException for Jena 3.5.0 SELECT query
package won.utils.agreement;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import org.apache.commons.io.Charsets;
import org.apache.commons.io.IOUtils;
import org.apache.jena.query.Dataset;
import org.apache.jena.query.DatasetFactory;
@fkleedorfer
fkleedorfer / additional-node-not-covered-by-shape-noerrors.trig
Last active December 1, 2017 18:34
sample data for SPARQL-based extraction of triples based on a SHACL validation result (here: no errors -> no ValidationResults)
# This example is taken from http://shacl.org/playground and
# transformed to trig, putting shapes, data and validation results in separate graphs
#
# Test case: there is an additional node in the data - ex:Paris - that is not covered by the shape.
# There are no validation results
# Expected result:
# <http://example.org/ns#Bob> schema:address <http://example.org/ns#BobsAddress>
# <http://example.org/ns#Bob> schema:birthDate 1971-07-07
# <http://example.org/ns#Bob> schema:birthPlace <http://example.org/ns#Paris>
# <http://example.org/ns#Bob> schema:deathDate 1998-09-10
@fkleedorfer
fkleedorfer / gist:81b32e3235105a4a4743e9fa76ba9332
Created November 16, 2017 18:08
WoN goal-merging and checking
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix s: <http://schema.org/> .
@prefix ex1: <http://example.org/1/> .
@prefix ex2: <http://example.org/2/> .
@prefix voc: <http://example.org/myvocabulary/> .
@prefix taxi: <http://example.org/taxi/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix msg: <http://purl.org/webofneeds/message#> .
@prefix conn: <https://node.matchat.org/won/resource/connection/> .
@prefix need: <https://node.matchat.org/won/resource/need/> .
@prefix woncrypt: <http://purl.org/webofneeds/woncrypt#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix cert: <http://www.w3.org/ns/auth/cert#> .
@prefix local: <https://node.matchat.org/won/resource/> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix sig: <http://icp.it-risk.iwvi.uni-koblenz.de/ontologies/signature.owl#> .
# baseURI: http://ontology.tno.nl/logico
# imports: http://www.w3.org/2003/01/geo/wgs84_pos#
# imports: http://www.w3.org/2006/time
# c14n-version: 3
@prefix LogiCO: <http://ontology.tno.nl/logico#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix dul: <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
Mai 19, 2016 5:50:15 PM org.apache.tomcat.util.net.AprEndpoint$Acceptor run
FEIN: APR socket [461,374,656] opened with remote port [61,460]
Mai 19, 2016 5:50:15 PM org.apache.tomcat.util.net.AprEndpoint processSocketWithOptions
FEIN: socket [461,374,656]
Mai 19, 2016 5:50:15 PM org.apache.tomcat.util.threads.LimitLatch countUpOrAwait
FEIN: Counting up[http-apr-8443-Acceptor-0] latch=1
Mai 19, 2016 5:50:15 PM org.apache.tomcat.util.net.AprEndpoint setSocketOptions
FEIN: Handshake failed: error:14089086:SSL routines:ssl3_get_client_certificate:certificate verify failed
Mai 19, 2016 5:50:15 PM org.apache.tomcat.util.net.AprEndpoint$Poller removeFromPoller
FEIN: Attempting to remove [461,374,656] from poller