diff --git a/application/pivot/daanse.pivot.bndrun b/application/pivot/daanse.pivot.bndrun index 61ed18d..fe1bf4e 100644 --- a/application/pivot/daanse.pivot.bndrun +++ b/application/pivot/daanse.pivot.bndrun @@ -56,21 +56,20 @@ -runbundles: \ - ai.starlake.transpiler;version='[1.0.0,1.0.1)',\ + ai.starlake.transpiler;version='[1.8.0,1.8.1)',\ ch.qos.logback.classic;version='[1.5.6,1.5.7)',\ com.github.ben-manes.caffeine;version='[3.1.8,3.1.9)',\ com.sun.xml.messaging.saaj.impl;version='[3.0.4,3.0.5)',\ jakarta.activation-api;version='[2.1.3,2.1.4)',\ - jakarta.xml.soap-api;version='[3.0.1,3.0.2)',\ - json;version='[20250517.0.0,20250517.0.1)',\ - net.sf.jsqlparser;version='[5.4.0,5.4.1)',\ + jakarta.xml.soap-api;version='[3.0.2,3.0.3)',\ + net.sf.jsqlparser;version='[5.3.167,5.3.168)',\ org.apache.aries.spifly.dynamic.framework.extension;version='[1.3.7,1.3.8)',\ org.apache.commons.commons-fileupload;version='[1.6.0,1.6.1)',\ org.apache.commons.commons-io;version='[2.19.0,2.19.1)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.configadmin.plugin.interpolation;version='[1.2.8,1.2.9)',\ org.apache.felix.fileinstall;version='[3.7.4,3.7.5)',\ - org.apache.felix.http.jetty12;version='[1.1.4,1.1.5)',\ + org.apache.felix.http.jetty12;version='[1.1.6,1.1.7)',\ org.apache.felix.http.servlet-api;version='[3.0.0,3.0.1)',\ org.apache.felix.metatype;version='[1.2.4,1.2.5)',\ org.apache.felix.scr;version='[2.2.10,2.2.11)',\ @@ -85,6 +84,7 @@ org.eclipse.daanse.olap.common;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.olap.format;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.olap.spi;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.olap.util.format;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.olap.xmla.bridge;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.rolap.core;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.rolap.mapping.model;version='[0.0.1,0.0.2)',\ @@ -92,13 +92,17 @@ org.eclipse.daanse.sql.guard.api;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.sql.guard.jsqltranspiler;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.xmla.api;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.xmla.csdl.model.v2.an;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.xmla.csdl.model.v2.bi;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.xmla.csdl.model.v2.cg;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.xmla.csdl.model.v2.edm;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.xmla.model.record;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.xmla.server.adapter.soapmessage;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.xmla.server.jakarta.saaj;version='[0.0.1,0.0.2)',\ org.eclipse.emf.common;version='[2.44.0,2.44.1)',\ org.eclipse.emf.ecore;version='[2.41.0,2.41.1)',\ org.eclipse.emf.ecore.xmi;version='[2.39.0,2.39.1)',\ - org.eclipse.fennec.emf.osgi.component;version='[1.0.0,1.0.1)',\ + org.eclipse.fennec.emf.osgi.component;version='[0.1.1,0.1.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[2.5.0,2.5.1)',\ org.jvnet.staxex.stax-ex;version='[2.1.0,2.1.1)',\ org.objectweb.asm;version='[9.9.0,9.9.1)',\ diff --git a/application/pivot/pom.xml b/application/pivot/pom.xml index 41eb4cf..cd1752f 100644 --- a/application/pivot/pom.xml +++ b/application/pivot/pom.xml @@ -34,7 +34,18 @@ 0.0.1-SNAPSHOT compile - + + org.apache.felix + org.apache.felix.fileinstall + 3.7.4 + compile + + + org.apache.felix + org.apache.felix.configadmin.plugin.interpolation + 1.2.8 + compile + diff --git a/application/playground/daanse.playground.bndrun b/application/playground/daanse.playground.bndrun index 979c123..9896ff7 100644 --- a/application/playground/daanse.playground.bndrun +++ b/application/playground/daanse.playground.bndrun @@ -76,24 +76,23 @@ -runbundles: \ - ai.starlake.transpiler;version='[1.0.0,1.0.1)',\ + ai.starlake.transpiler;version='[1.8.0,1.8.1)',\ ch.qos.logback.classic;version='[1.5.6,1.5.7)',\ com.github.ben-manes.caffeine;version='[3.1.8,3.1.9)',\ com.h2database;version='[2.3.230,2.3.231)',\ - com.microsoft.sqlserver.mssql-jdbc;version='[12.8.1,12.8.2)',\ + com.microsoft.sqlserver.mssql-jdbc;version='[12.8.2,12.8.3)',\ com.mysql.cj;version='[9.0.0,9.0.1)',\ com.sun.xml.messaging.saaj.impl;version='[3.0.4,3.0.5)',\ jakarta.activation-api;version='[2.1.3,2.1.4)',\ - jakarta.xml.soap-api;version='[3.0.1,3.0.2)',\ - json;version='[20250517.0.0,20250517.0.1)',\ - net.sf.jsqlparser;version='[5.4.0,5.4.1)',\ + jakarta.xml.soap-api;version='[3.0.2,3.0.3)',\ + net.sf.jsqlparser;version='[5.3.167,5.3.168)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.apache.commons.commons-fileupload;version='[1.6.0,1.6.1)',\ org.apache.commons.commons-io;version='[2.19.0,2.19.1)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.configadmin.plugin.interpolation;version='[1.2.8,1.2.9)',\ org.apache.felix.fileinstall;version='[3.7.4,3.7.5)',\ - org.apache.felix.http.jetty12;version='[1.1.4,1.1.5)',\ + org.apache.felix.http.jetty12;version='[1.1.6,1.1.7)',\ org.apache.felix.http.servlet-api;version='[3.0.0,3.0.1)',\ org.apache.felix.inventory;version='[2.0.0,2.0.1)',\ org.apache.felix.metatype;version='[1.2.4,1.2.5)',\ @@ -131,6 +130,7 @@ org.eclipse.daanse.olap.common;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.olap.format;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.olap.spi;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.olap.util.format;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.olap.xmla.bridge;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.rolap.core;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.rolap.mapping.model;version='[0.0.1,0.0.2)',\ @@ -139,13 +139,17 @@ org.eclipse.daanse.sql.guard.api;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.sql.guard.jsqltranspiler;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.xmla.api;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.xmla.csdl.model.v2.an;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.xmla.csdl.model.v2.bi;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.xmla.csdl.model.v2.cg;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.xmla.csdl.model.v2.edm;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.xmla.model.record;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.xmla.server.adapter.soapmessage;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.xmla.server.jakarta.saaj;version='[0.0.1,0.0.2)',\ org.eclipse.emf.common;version='[2.44.0,2.44.1)',\ org.eclipse.emf.ecore;version='[2.41.0,2.41.1)',\ org.eclipse.emf.ecore.xmi;version='[2.39.0,2.39.1)',\ - org.eclipse.fennec.emf.osgi.component;version='[1.0.0,1.0.1)',\ + org.eclipse.fennec.emf.osgi.component;version='[0.1.1,0.1.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[2.5.0,2.5.1)',\ org.jvnet.staxex.stax-ex;version='[2.1.0,2.1.1)',\ org.objectweb.asm;version='[9.9.0,9.9.1)',\ @@ -156,10 +160,11 @@ org.osgi.service.cm;version='[1.6.1,1.6.2)',\ org.osgi.service.component;version='[1.5.1,1.5.2)',\ org.osgi.service.jdbc;version='[1.1.0,1.1.1)',\ - org.osgi.service.log;version='[1.5.0,1.5.1)',\ + org.osgi.service.log;version='[1.4.0,1.4.1)',\ org.osgi.util.converter;version='[1.0.9,1.0.10)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ org.osgi.util.promise;version='[1.3.0,1.3.1)',\ + org.osgi.util.pushstream;version='[1.1.0,1.1.1)',\ org.owasp.encoder;version='[1.2.3,1.2.4)',\ org.postgresql.jdbc;version='[42.7.3,42.7.4)',\ org.xerial.sqlite-jdbc;version='[3.46.1,3.46.2)' \ No newline at end of file diff --git a/application/playground/pom.xml b/application/playground/pom.xml index 8971a67..2850b0b 100644 --- a/application/playground/pom.xml +++ b/application/playground/pom.xml @@ -260,6 +260,20 @@ runtime + + org.apache.felix + org.apache.felix.fileinstall + 3.7.4 + compile + + + + org.apache.felix + org.apache.felix.configadmin.plugin.interpolation + 1.2.8 + compile + + diff --git a/application/pom.xml b/application/pom.xml index a0d039f..f26b652 100644 --- a/application/pom.xml +++ b/application/pom.xml @@ -11,168 +11,121 @@ **********************************************************************/ --> - 4.0.0 - - org.eclipse.daanse - org.eclipse.daanse.server - ${revision} - - org.eclipse.daanse.server.application - pom - - - probe - pivot - playground - - - - - org.apache.felix - org.apache.felix.fileinstall - 3.7.4 - runtime - - - - org.apache.felix - org.apache.felix.configadmin.plugin.interpolation - 1.2.8 - runtime - - - - org.eclipse.daanse - org.eclipse.daanse.rolap.core - 0.0.1-SNAPSHOT - compile - - - - org.eclipse.daanse - org.eclipse.daanse.xmla.api - ${revision} - compile - - - - org.eclipse.daanse - org.eclipse.daanse.olap.api - ${revision} - compile - - - - com.github.ben-manes.caffeine - caffeine - 3.1.8 - runtime - - - - org.glassfish.hk2 - osgi-resource-locator - 2.5.0-b42 - runtime - - - - org.eclipse.daanse - org.eclipse.daanse.mdx.parser.ccc - 0.0.1-SNAPSHOT - runtime - - - - org.eclipse.daanse - org.eclipse.daanse.mdx.parser.cccx - 0.0.1-SNAPSHOT - runtime - - - - jakarta.servlet - jakarta.servlet-api - 6.0.0 - compile - - - - org.eclipse.daanse - org.eclipse.daanse.xmla.server.jakarta.saaj - ${revision} - runtime - - - - com.sun.xml.messaging.saaj - saaj-impl - 3.0.4 - runtime - - - - org.eclipse.daanse - org.eclipse.daanse.jdbc.db.importer.csv - ${revision} - compile - - - - org.eclipse.daanse - org.eclipse.daanse.olap.xmla.bridge - ${revision} - runtime - - - - - org.eclipse.daanse - ${revision} - org.eclipse.daanse.rolap.mapping.model - compile - - - - org.eclipse.daanse - org.eclipse.daanse.sql.guard.jsqltranspiler - 0.0.1-SNAPSHOT - runtime - - - - org.apache.felix - org.apache.felix.framework - runtime - - - - org.apache.felix - org.apache.felix.http.jetty12 - 1.1.4 - runtime - - - - commons-fileupload - commons-fileupload - 1.6.0 - runtime - - - - - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + org.eclipse.daanse + org.eclipse.daanse.server + ${revision} + + org.eclipse.daanse.server.application + pom + - - org.eclipse.fennec.emf - org.eclipse.fennec.emf.osgi.component - 1.0.0-SNAPSHOT - runtime - + + org.eclipse.daanse + org.eclipse.daanse.sql.guard.jsqltranspiler + 0.0.1-SNAPSHOT + compile + + + + org.eclipse.daanse + org.eclipse.daanse.sql.guard.api + 0.0.1-SNAPSHOT + compile + + + + org.eclipse.daanse + org.eclipse.daanse.sql.deparser.api + 0.0.1-SNAPSHOT + compile + + + + org.eclipse.daanse + org.eclipse.daanse.sql.deparser.jsqlparser + 0.0.1-SNAPSHOT + compile + + + + org.eclipse.daanse + org.eclipse.daanse.io.fs.watcher.api + 0.0.1-SNAPSHOT + compile + + + + org.eclipse.daanse + org.eclipse.daanse.jdbc.db.importer.csv + 0.0.1-SNAPSHOT + compile + + + + org.glassfish.hk2 + osgi-resource-locator + 2.5.0-b42 + + + + com.sun.xml.messaging.saaj + saaj-impl + 3.0.4 + + + + org.eclipse.daanse + org.eclipse.daanse.olap.xmla.bridge + 0.0.1-SNAPSHOT + compile + + + + org.apache.felix + org.apache.felix.http.jetty12 + 1.1.6 + compile + + + + org.eclipse.daanse + org.eclipse.daanse.xmla.server.jakarta.saaj + 0.0.1-SNAPSHOT + compile + + + + org.eclipse.daanse + org.eclipse.daanse.mdx.parser.ccc + 0.0.1-SNAPSHOT + compile + + + + org.eclipse.daanse + org.eclipse.daanse.rolap.mapping.model + 0.0.1-SNAPSHOT + compile + + + + org.eclipse.daanse + org.eclipse.daanse.rolap.core + 0.0.1-SNAPSHOT + compile + + - + + + probe + pivot + playground + + \ No newline at end of file diff --git a/application/probe/daanse.probe.bndrun b/application/probe/daanse.probe.bndrun index e160211..5aa965b 100644 --- a/application/probe/daanse.probe.bndrun +++ b/application/probe/daanse.probe.bndrun @@ -55,7 +55,12 @@ bnd.identity;id='org.eclipse.daanse.jakarta.servlet.filter.auth.dummy.noauth',\ bnd.identity;id='org.eclipse.daanse.sql.deparser.api',\ bnd.identity;id='org.eclipse.daanse.sql.deparser.jsqlparser',\ - bnd.identity;id='org.eclipse.fennec.emf.osgi.component' + bnd.identity;id='org.eclipse.fennec.emf.osgi.component',\ + bnd.identity;id='org.eclipse.daanse.olap.check.model.emf',\ + bnd.identity;id='org.eclipse.daanse.olap.check.runtime',\ + bnd.identity;id='org.eclipse.daanse.olap.check.reporter.api',\ + bnd.identity;id='org.eclipse.daanse.olap.check.reporter.log',\ + bnd.identity;id='org.eclipse.daanse.olap.check.reporter.file' @@ -70,21 +75,20 @@ -runbundles: \ - ai.starlake.transpiler;version='[1.0.0,1.0.1)',\ + ai.starlake.transpiler;version='[1.8.0,1.8.1)',\ ch.qos.logback.classic;version='[1.5.6,1.5.7)',\ - com.github.ben-manes.caffeine;version='[3.1.8,3.1.9)',\ + com.github.ben-manes.caffeine;version='[3.1.2,3.1.3)',\ com.h2database;version='[2.3.230,2.3.231)',\ com.sun.xml.messaging.saaj.impl;version='[3.0.4,3.0.5)',\ de.siegmar.fastcsv;version='[3.1.0,3.1.1)',\ jakarta.activation-api;version='[2.1.3,2.1.4)',\ - jakarta.xml.soap-api;version='[3.0.1,3.0.2)',\ - json;version='[20250517.0.0,20250517.0.1)',\ - net.sf.jsqlparser;version='[5.4.0,5.4.1)',\ + jakarta.xml.soap-api;version='[3.0.2,3.0.3)',\ + net.sf.jsqlparser;version='[5.3.167,5.3.168)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.apache.commons.commons-fileupload;version='[1.6.0,1.6.1)',\ org.apache.commons.commons-io;version='[2.19.0,2.19.1)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ - org.apache.felix.http.jetty12;version='[1.1.4,1.1.5)',\ + org.apache.felix.http.jetty12;version='[1.1.6,1.1.7)',\ org.apache.felix.http.servlet-api;version='[3.0.0,3.0.1)',\ org.apache.felix.metatype;version='[1.2.4,1.2.5)',\ org.apache.felix.scr;version='[2.2.10,2.2.11)',\ @@ -112,10 +116,16 @@ org.eclipse.daanse.odc.model.simple;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.odc.writer.simple;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.olap.api;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.olap.check.model.emf;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.olap.check.reporter.api;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.olap.check.reporter.file;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.olap.check.reporter.log;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.olap.check.runtime;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.olap.common;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.olap.format;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.olap.odc;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.olap.spi;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.olap.util.format;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.olap.xmla.bridge;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.rolap.core;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.rolap.documentation.api;version='[0.0.1,0.0.2)',\ @@ -128,13 +138,17 @@ org.eclipse.daanse.sql.guard.api;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.sql.guard.jsqltranspiler;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.xmla.api;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.xmla.csdl.model.v2.an;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.xmla.csdl.model.v2.bi;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.xmla.csdl.model.v2.cg;version='[0.0.1,0.0.2)',\ + org.eclipse.daanse.xmla.csdl.model.v2.edm;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.xmla.model.record;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.xmla.server.adapter.soapmessage;version='[0.0.1,0.0.2)',\ org.eclipse.daanse.xmla.server.jakarta.saaj;version='[0.0.1,0.0.2)',\ org.eclipse.emf.common;version='[2.44.0,2.44.1)',\ org.eclipse.emf.ecore;version='[2.41.0,2.41.1)',\ org.eclipse.emf.ecore.xmi;version='[2.39.0,2.39.1)',\ - org.eclipse.fennec.emf.osgi.component;version='[1.0.0,1.0.1)',\ + org.eclipse.fennec.emf.osgi.component;version='[0.1.1,0.1.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[2.5.0,2.5.1)',\ org.jvnet.staxex.stax-ex;version='[2.1.0,2.1.1)',\ org.objectweb.asm;version='[9.9.0,9.9.1)',\ diff --git a/application/probe/pom.xml b/application/probe/pom.xml index 401e339..e9f8462 100644 --- a/application/probe/pom.xml +++ b/application/probe/pom.xml @@ -109,65 +109,66 @@ org.eclipse.daanse - org.eclipse.daanse.rolap.documentation.common + org.eclipse.daanse.olap.check.model.emf 0.0.1-SNAPSHOT compile org.eclipse.daanse - - org.eclipse.daanse.jakarta.servlet.filter.auth.dummy.role + org.eclipse.daanse.olap.check.runtime 0.0.1-SNAPSHOT compile org.eclipse.daanse - - org.eclipse.daanse.jakarta.servlet.filter.auth.dummy.noauth + org.eclipse.daanse.olap.check.reporter.api 0.0.1-SNAPSHOT compile org.eclipse.daanse - org.eclipse.daanse.olap.odc + org.eclipse.daanse.olap.check.reporter.log 0.0.1-SNAPSHOT - compile + runtime org.eclipse.daanse - org.eclipse.daanse.sql.guard.jsqltranspiler + org.eclipse.daanse.olap.check.reporter.file 0.0.1-SNAPSHOT - compile + runtime org.eclipse.daanse - org.eclipse.daanse.sql.guard.api + org.eclipse.daanse.rolap.documentation.common 0.0.1-SNAPSHOT compile org.eclipse.daanse - org.eclipse.daanse.sql.deparser.api + + org.eclipse.daanse.jakarta.servlet.filter.auth.dummy.role 0.0.1-SNAPSHOT compile org.eclipse.daanse - org.eclipse.daanse.sql.deparser.jsqlparser + + org.eclipse.daanse.jakarta.servlet.filter.auth.dummy.noauth 0.0.1-SNAPSHOT compile - org.slf4j - slf4j-api + org.eclipse.daanse + org.eclipse.daanse.olap.odc + 0.0.1-SNAPSHOT compile diff --git a/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/CheckSuiteXmiFileListener.java b/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/CheckSuiteXmiFileListener.java new file mode 100644 index 0000000..743d555 --- /dev/null +++ b/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/CheckSuiteXmiFileListener.java @@ -0,0 +1,131 @@ +/* +* Copyright (c) 2026 Contributors to the Eclipse Foundation. +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +* +* Contributors: +* SmartCity Jena - initial +* Stefan Bischof (bipolis.org) - initial +*/ +package org.eclipse.daanse.server.application.probe; + +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.WatchEvent.Kind; +import java.util.Dictionary; +import java.util.Hashtable; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; + +import org.eclipse.daanse.io.fs.watcher.api.FileSystemWatcherListener; +import org.eclipse.daanse.io.fs.watcher.api.propertytypes.FileSystemWatcherListenerProperties; +import org.osgi.service.cm.Configuration; +import org.osgi.service.cm.ConfigurationAdmin; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.ConfigurationPolicy; +import org.osgi.service.component.annotations.Deactivate; +import org.osgi.service.component.annotations.Reference; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@FileSystemWatcherListenerProperties(recursive = true, pattern = ".*.xmi") +@Component(service = FileSystemWatcherListener.class, configurationPid = CheckSuiteXmiFileListener.PID, configurationPolicy = ConfigurationPolicy.REQUIRE) +public class CheckSuiteXmiFileListener implements FileSystemWatcherListener { + + private static final Logger logger = LoggerFactory.getLogger(CheckSuiteXmiFileListener.class); + + public static final String PID = "daanse.server.application.probe.CheckSuiteXmiFileListener"; + + private static final String PID_CHECK_SUITE_PROVIDER = "org.eclipse.daanse.olap.check.suite.provider"; + + @Reference + private ConfigurationAdmin ca; + + private String matcherKey; + + private final Map configurations = new ConcurrentHashMap<>(); + + @Activate + public CheckSuiteXmiFileListener(Map props) { + this.matcherKey = (String) props.get(ProbeFileListener.MATCHER_KEY); + } + + @Override + public void handleBasePath(Path basePath) { + logger.info("Handling check suite base path: {}", basePath); + } + + @Override + public void handleInitialPaths(List paths) { + if (paths.isEmpty()) { + logger.debug("No check suite XMI files found, skipping"); + return; + } + logger.info("Handling check suite initial paths: {}", paths); + for (Path path : paths) { + addCheckSuiteConfig(path); + } + } + + @Override + public void handlePathEvent(Path path, Kind kind) { + logger.info("Handling check suite path event for: {} with kind: {}", path, kind); + + if (java.nio.file.StandardWatchEventKinds.ENTRY_DELETE.equals(kind)) { + removeCheckSuiteConfig(path); + } else if (java.nio.file.StandardWatchEventKinds.ENTRY_CREATE.equals(kind)) { + addCheckSuiteConfig(path); + } else if (java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY.equals(kind)) { + removeCheckSuiteConfig(path); + addCheckSuiteConfig(path); + } + } + + private void addCheckSuiteConfig(Path path) { + try { + Configuration configuration = ca.getFactoryConfiguration(PID_CHECK_SUITE_PROVIDER, + UUID.randomUUID().toString(), "?"); + + Dictionary props = new Hashtable<>(); + props.put("resource.url", path.toAbsolutePath().toString()); + props.put(ProbeFileListener.KEY_FILE_CONTEXT_MATCHER, matcherKey); + + configuration.update(props); + configurations.put(path, configuration); + logger.info("Configured check suite provider for: {}", path); + } catch (IOException e) { + logger.error("Failed to configure check suite reader for path: {}", path, e); + } + } + + private void removeCheckSuiteConfig(Path path) { + Configuration configuration = configurations.remove(path); + if (configuration != null) { + try { + configuration.delete(); + } catch (IOException e) { + logger.error("Failed to delete configuration for path: {}", path, e); + } + } + } + + @Deactivate + private void deactivate() { + logger.info("Deactivating CheckSuiteXmiFileListener"); + for (Configuration configuration : configurations.values()) { + try { + configuration.delete(); + } catch (IOException e) { + logger.error("Failed to delete configuration", e); + } + } + configurations.clear(); + } +} diff --git a/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/Probe.java b/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/Probe.java index cbcac5b..8a626a2 100644 --- a/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/Probe.java +++ b/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/Probe.java @@ -66,6 +66,8 @@ public class Probe { private Configuration configAutoODC; + private Configuration configFileReporter; + @Activate public void activate() throws IOException { logger.info("Activating ProbeSetup"); @@ -78,6 +80,7 @@ public void activate() throws IOException { initContextGroup(); initDocumenter(); initODC(); + initCheckReporter(); logger.info("ProbeSetup activation completed"); } @@ -183,6 +186,13 @@ private void initODC() throws IOException { } + private void initCheckReporter() throws IOException { + configFileReporter = ca.getFactoryConfiguration("daanse.olap.check.reporter.file", CONFIG_IDENT, "?"); + Dictionary dict = new Hashtable<>(); + dict.put("output.dir", "./output/check-results"); + configFileReporter.update(dict); + } + @Deactivate public void deactivate() throws IOException { logger.info("Deactivating ProbeSetup"); @@ -216,6 +226,10 @@ public void deactivate() throws IOException { configOdcWriter.delete(); } + if (configFileReporter != null) { + configFileReporter.delete(); + } + logger.info("ProbeSetup deactivation completed"); } diff --git a/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/ProbeCheckExecutionComponent.java b/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/ProbeCheckExecutionComponent.java new file mode 100644 index 0000000..cbbaafa --- /dev/null +++ b/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/ProbeCheckExecutionComponent.java @@ -0,0 +1,152 @@ +/* +* Copyright (c) 2026 Contributors to the Eclipse Foundation. +* +* This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 +* which is available at https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +* +* Contributors: +* SmartCity Jena - initial +* Stefan Bischof (bipolis.org) - initial +*/ +package org.eclipse.daanse.server.application.probe; + +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +import org.eclipse.daanse.olap.api.Context; +import org.eclipse.daanse.olap.check.model.check.CheckExecutionResult; +import org.eclipse.daanse.olap.check.model.check.OlapCheckSuite; +import org.eclipse.daanse.olap.check.reporter.api.CheckResultReporter; +import org.eclipse.daanse.olap.check.runtime.api.CheckExecutor; +import org.eclipse.daanse.olap.check.runtime.api.OlapCheckSuiteSupplier; +import org.osgi.framework.BundleContext; +import org.osgi.framework.InvalidSyntaxException; +import org.osgi.framework.ServiceReference; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Deactivate; +import org.osgi.service.component.annotations.Reference; +import org.osgi.service.component.annotations.ReferenceCardinality; +import org.osgi.service.component.annotations.ReferencePolicy; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@Component(immediate = true) +public class ProbeCheckExecutionComponent { + + private static final Logger logger = LoggerFactory.getLogger(ProbeCheckExecutionComponent.class); + private static final long EXECUTION_DELAY_SECONDS = 5; + + @Reference + private CheckExecutor checkExecutor; + + @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC) + private volatile List reporters; + + private BundleContext bundleContext; + + private final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor(); + private final Map> pendingExecutions = new ConcurrentHashMap<>(); + + @Activate + public void activate(BundleContext bundleContext) { + this.bundleContext = bundleContext; + } + + @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC) + void bindCheckSuiteSupplier(OlapCheckSuiteSupplier supplier, Map props) { + String matcherKey = (String) props.get(ProbeFileListener.KEY_FILE_CONTEXT_MATCHER); + if (matcherKey == null) { + logger.debug("CheckSuiteSupplier without file.context.matcher, skipping"); + return; + } + logger.info("CheckSuiteSupplier bound with matcher key: {}, scheduling execution in {} seconds", matcherKey, + EXECUTION_DELAY_SECONDS); + scheduleExecution(matcherKey, supplier); + } + + void unbindCheckSuiteSupplier(OlapCheckSuiteSupplier supplier, Map props) { + String matcherKey = (String) props.get(ProbeFileListener.KEY_FILE_CONTEXT_MATCHER); + if (matcherKey != null) { + ScheduledFuture future = pendingExecutions.remove(matcherKey); + if (future != null) { + future.cancel(false); + } + } + } + + private void scheduleExecution(String matcherKey, OlapCheckSuiteSupplier supplier) { + ScheduledFuture future = scheduler.schedule(() -> { + try { + executeChecks(matcherKey, supplier); + } catch (Exception e) { + logger.error("Check execution failed for matcher key: {}", matcherKey, e); + } finally { + pendingExecutions.remove(matcherKey); + } + }, EXECUTION_DELAY_SECONDS, TimeUnit.SECONDS); + pendingExecutions.put(matcherKey, future); + } + + @SuppressWarnings("unchecked") + private void executeChecks(String matcherKey, OlapCheckSuiteSupplier supplier) { + logger.info("Starting check execution for matcher key: {}", matcherKey); + + Context context = findContextByMatcherKey(matcherKey); + if (context == null) { + logger.warn("No Context found for matcher key: {}, retrying in {} seconds", matcherKey, + EXECUTION_DELAY_SECONDS); + scheduleExecution(matcherKey, supplier); + return; + } + + OlapCheckSuite suite = supplier.get(); + String suiteName = suite.getName() != null ? suite.getName() : matcherKey; + List results = checkExecutor.execute(suite, context); + + logger.info("Check execution completed for '{}': dispatching to {} reporter(s)", suiteName, + reporters != null ? reporters.size() : 0); + + if (reporters != null) { + for (CheckResultReporter reporter : reporters) { + try { + reporter.report(results, suiteName); + } catch (Exception e) { + logger.error("Reporter {} failed for suite '{}'", reporter.getClass().getSimpleName(), suiteName, + e); + } + } + } + } + + @SuppressWarnings("unchecked") + private Context findContextByMatcherKey(String matcherKey) { + try { + String filter = "(" + ProbeFileListener.KEY_FILE_CONTEXT_MATCHER + "=" + matcherKey + ")"; + Collection> refs = (Collection>) (Collection) bundleContext + .getServiceReferences(Context.class, filter); + if (refs != null && !refs.isEmpty()) { + ServiceReference ref = refs.iterator().next(); + return bundleContext.getService(ref); + } + } catch (InvalidSyntaxException e) { + logger.error("Invalid filter syntax for matcher key: {}", matcherKey, e); + } + return null; + } + + @Deactivate + public void deactivate() { + scheduler.shutdownNow(); + pendingExecutions.clear(); + } +} diff --git a/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/ProbeFileListener.java b/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/ProbeFileListener.java index df3a1fd..15fef94 100644 --- a/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/ProbeFileListener.java +++ b/application/probe/src/main/java/org/eclipse/daanse/server/application/probe/ProbeFileListener.java @@ -71,6 +71,7 @@ public class ProbeFileListener implements FileSystemWatcherListener { private Map catalogFolderConfigsCSV = new ConcurrentHashMap<>(); private Map catalogFolderConfigsContext = new ConcurrentHashMap<>(); private Map catalogFolderConfigsMapping = new ConcurrentHashMap<>(); + private Map catalogFolderConfigsCheckSuite = new ConcurrentHashMap<>(); @Override public void handleBasePath(Path basePath) { @@ -127,6 +128,15 @@ private void removePath(Path path) { } catch (IOException e) { logger.error("Failed to delete mapping configuration for path: {}", path, e); } + + try { + Configuration c = catalogFolderConfigsCheckSuite.remove(path); + if (c != null) { + c.delete(); + } + } catch (IOException e) { + logger.error("Failed to delete check suite configuration for path: {}", path, e); + } } private void addPath(Path path) { @@ -143,6 +153,7 @@ private void addPath(Path path) { createH2DataSource(path, matcherKey); createCsvDatabaseImporter(path, matcherKey); createMapping(path, matcherKey); + createCheckSuite(path, matcherKey); createContext(path, matcherKey); } catch (IOException e) { @@ -170,6 +181,29 @@ private void createMapping(Path path, String matcherKey) { } } + private void createCheckSuite(Path path, String matcherKey) { + Path checkSuitePath = path.resolve("check"); + if (!Files.isDirectory(checkSuitePath)) { + logger.debug("No check directory found at: {}, skipping", checkSuitePath); + return; + } + try { + Configuration configCheckSuiteFileListener = ca.getFactoryConfiguration(CheckSuiteXmiFileListener.PID, + UUID.randomUUID().toString(), "?"); + + Dictionary props = new Hashtable<>(); + props.put(FileSystemWatcherWhiteboardConstants.FILESYSTEM_WATCHER_PATH, + checkSuitePath.toAbsolutePath().toString()); + props.put(MATCHER_KEY, matcherKey); + + configCheckSuiteFileListener.update(props); + + catalogFolderConfigsCheckSuite.put(path, configCheckSuiteFileListener); + } catch (IOException e) { + logger.error("Failed to create check suite configuration for path: {}", path, e); + } + } + private void createContext(Path path, String matcherKey) throws IOException { Configuration configContext = ca.getFactoryConfiguration(BASIC_CONTEXT_PID, UUID.randomUUID().toString(), "?"); @@ -190,6 +224,7 @@ private void createContext(Path path, String matcherKey) throws IOException { props.put("description", theDescription); props.put("catalog.path", catalog_path); props.put("useAggregates", true); + props.put(KEY_FILE_CONTEXT_MATCHER, matcherKey); configContext.update(props); catalogFolderConfigsContext.put(path, configContext);