Re: SHACL-based data extraction from a knowledge graph
Some inspiration from ShEx may help. The "validation" process is defined by assigning triples to non-overlapping partitions defined by constraints. There can be more then one way to partition the triples in a disjunction or conjunction when there are multiple occurrences of triples matching multiple constraints in the conjunction. OR and AND in ShExC. The process can involve backtracking to search through alternatives (it's like string regex except "bag regex" is assigning triples to bags as the regex passes over). It's also more "closed" by default in style. SHACL does not have this "use once". The sub-shapes of a shape are more independent. But it's only the compositional operations that matter = not the basic triple constraints. And it matters less if what is being extracted is a graph because it's a set. Some restrictions are necessary - SHACL-SPARQL does say why a constraint matched and can need the rest of the graph. Andy On 10/03/2022 19:19, Florian Kleedorfer wrote: Not sure how that could work. You could keep a set of tiples per focus node validation, add all triples that pass the constraint tests (given that you somehow are able to reconstruct the triple(s) from the data the Shacl logic is working on (which is not triples but, in many instances, sets of nodes - e.g. the result of G.allSP()), and emit the set once you've established that the complete shape is valid for the focus node. I would be very sceptical of adding such a special-interest aspect to code like SHACL that must be relied on and fast as can be. Having said that, I've wanted to modify the way Jena evaluates SHACL recently - maybe a way to extend it would be useful (allowing inheritance or having some kind of callback or somesuch). However, I found that for my use case, the trick with the graph wrapper that observes which triples are pulled by SHACL works just fine and is very simple to implement (the shacl validation algorithm, if you want to modify it, is not that simple and easy to mess up). Am 2022-03-09 14:26, schrieb Thomas Francart: What is VLib.validateShape actually returns the focusNode + Path + valueNodes that conform to each shape ? or emit them through a listener ? ( https://github.com/apache/jena/blob/5ce8c141d425655bcaa9d7567117659e502a7ff1/jena-shacl/src/main/java/org/apache/jena/shacl/validation/VLib.java#L89 ) The idea would be to use the Validator as a "filter" that emits the triples valid according to shapes, so that they can be aggregated in an output graph.
Re: error starting up jena
Solved! Thx Andy. (I must have mist somewhere the warning not to use tomcat10...) Op ma 28 mrt. 2022 om 16:18 schreef Andy Seaborne : > Fuseki does not work with Tomcat 10. > > Tomcat 9 applications are incompatible with Tomcat 10. > > Tomcat 10 is a migration of JavaEE from javax.* to jakarta.* > > https://tomcat.apache.org/migration-10.html#Specification_APIs > > > If you can't run Tomcat 9, try their conversion tool: > > https://tomcat.apache.org/download-migration.cgi > > and please let the list know if it works. > > > Andy > > On 28/03/2022 15:11, Michel Böhms wrote: > > > > Dear all > > > > I am on windows with > > > > image.png > > I installed the latest Tomcat 10.1 (as service) and deployed the > > latest Fuseki WAR (directly and renamed to fuseki.war). > > > > The problem is that I am not able to start it up. > > > > The message I get when trying to start at the Manager App is: > > FAIL - Application at context path [/fuseki] could not be started > > > > > > Is there some env. var to be set? > > > > IN catalina log: > > 28-Mar-2022 15:37:56.144 INFO [http-nio-8080-exec-26] > > org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was > > scanned for TLDs yet contained no TLDs. Enable debug logging for this > > logger for a complete list of JARs that were scanned but no TLDs were > > found in them. Skipping unneeded JARs during scanning can improve > > startup time and JSP compilation time. > > 28-Mar-2022 15:37:56.150 SEVERE [http-nio-8080-exec-26] > > org.apache.catalina.core.StandardContext.startInternal One or more > > listeners failed to start. Full details will be found in the > > appropriate container log file > > 28-Mar-2022 15:37:56.150 SEVERE [http-nio-8080-exec-26] > > org.apache.catalina.core.StandardContext.startInternal Context > > [/fuseki] startup failed due to previous errors > > > > Thanks for advice. > > Michel Bohms
Re: error starting up jena
I will try 9! thx for the quick feedback!! let the list know. Op ma 28 mrt. 2022 om 16:18 schreef Andy Seaborne : > Fuseki does not work with Tomcat 10. > > Tomcat 9 applications are incompatible with Tomcat 10. > > Tomcat 10 is a migration of JavaEE from javax.* to jakarta.* > > https://tomcat.apache.org/migration-10.html#Specification_APIs > > > If you can't run Tomcat 9, try their conversion tool: > > https://tomcat.apache.org/download-migration.cgi > > and please let the list know if it works. > > > Andy > > On 28/03/2022 15:11, Michel Böhms wrote: > > > > Dear all > > > > I am on windows with > > > > image.png > > I installed the latest Tomcat 10.1 (as service) and deployed the > > latest Fuseki WAR (directly and renamed to fuseki.war). > > > > The problem is that I am not able to start it up. > > > > The message I get when trying to start at the Manager App is: > > FAIL - Application at context path [/fuseki] could not be started > > > > > > Is there some env. var to be set? > > > > IN catalina log: > > 28-Mar-2022 15:37:56.144 INFO [http-nio-8080-exec-26] > > org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was > > scanned for TLDs yet contained no TLDs. Enable debug logging for this > > logger for a complete list of JARs that were scanned but no TLDs were > > found in them. Skipping unneeded JARs during scanning can improve > > startup time and JSP compilation time. > > 28-Mar-2022 15:37:56.150 SEVERE [http-nio-8080-exec-26] > > org.apache.catalina.core.StandardContext.startInternal One or more > > listeners failed to start. Full details will be found in the > > appropriate container log file > > 28-Mar-2022 15:37:56.150 SEVERE [http-nio-8080-exec-26] > > org.apache.catalina.core.StandardContext.startInternal Context > > [/fuseki] startup failed due to previous errors > > > > Thanks for advice. > > Michel Bohms
Re: error starting up jena
Fuseki does not work with Tomcat 10. Tomcat 9 applications are incompatible with Tomcat 10. Tomcat 10 is a migration of JavaEE from javax.* to jakarta.* https://tomcat.apache.org/migration-10.html#Specification_APIs If you can't run Tomcat 9, try their conversion tool: https://tomcat.apache.org/download-migration.cgi and please let the list know if it works. Andy On 28/03/2022 15:11, Michel Böhms wrote: Dear all I am on windows with image.png I installed the latest Tomcat 10.1 (as service) and deployed the latest Fuseki WAR (directly and renamed to fuseki.war). The problem is that I am not able to start it up. The message I get when trying to start at the Manager App is: FAIL - Application at context path [/fuseki] could not be started Is there some env. var to be set? IN catalina log: 28-Mar-2022 15:37:56.144 INFO [http-nio-8080-exec-26] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 28-Mar-2022 15:37:56.150 SEVERE [http-nio-8080-exec-26] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file 28-Mar-2022 15:37:56.150 SEVERE [http-nio-8080-exec-26] org.apache.catalina.core.StandardContext.startInternal Context [/fuseki] startup failed due to previous errors Thanks for advice. Michel Bohms
error starting up jena
Dear all I am on windows with [image: image.png] I installed the latest Tomcat 10.1 (as service) and deployed the latest Fuseki WAR (directly and renamed to fuseki.war). The problem is that I am not able to start it up. The message I get when trying to start at the Manager App is: FAIL - Application at context path [/fuseki] could not be started Is there some env. var to be set? IN catalina log: 28-Mar-2022 15:37:56.144 INFO [http-nio-8080-exec-26] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 28-Mar-2022 15:37:56.150 SEVERE [http-nio-8080-exec-26] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file 28-Mar-2022 15:37:56.150 SEVERE [http-nio-8080-exec-26] org.apache.catalina.core.StandardContext.startInternal Context [/fuseki] startup failed due to previous errors Thanks for advice. Michel Bohms
Re: Safe delete & insert with Fuseki
Queries don't have common enough selection criteria so they have to executed separately. Otherwise that would be nice solution. On Sat, 26 Mar 2022 at 11:12, Andy Seaborne wrote: > > If you put all the changes in one update request, they will be done > atomically. > > DELETE { ... } WHERE { ... } > ; > INSERT DATA { ... } > > Also, the WHERE clause in a DELETE-INSERT-WHERE can be used to "switch > off" an operation. > > Andy > > On 24/03/2022 13:17, Mikael Pesonen wrote: > > > > We have occasionally an issue with replace where inserting new data may > > fail after old data has been deleted. What is the recommended way to do > > this kind of multipart SPARQL with Fuseki (not java)? First option comes > > to mind is to test if SPARQL insert is correct and WOULD be executed. Is > > this possible? > > >