Skip to content

Commit

Permalink
Various upgrades
Browse files Browse the repository at this point in the history
bump Apache Jena 3.8.0 -> 3.9.0
initial SHACL forms code
  • Loading branch information
ebremer committed Aug 2, 2023
1 parent 4d444c8 commit 09d2a14
Show file tree
Hide file tree
Showing 124 changed files with 216,653 additions and 454 deletions.
6 changes: 3 additions & 3 deletions nbactions-ingestjar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<exec.args>${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}</exec.args>
<exec.executable>java</exec.executable>
<exec.vmArgs>-Xmx30G -Xms30G --add-opens=java.base/java.nio=ALL-UNNAMED --enable-preview -Darrow.memory.debug.allocator=true</exec.vmArgs>
<exec.appArgs>-v -src "D:\halcyon\features\src" -dest "D:\halcyon\features\dest0"</exec.appArgs>
<exec.appArgs>-v -src "D:\acc\src" -dest "D:\acc\zip" -heatmap</exec.appArgs>
<exec.mainClass>com.ebremer.halcyon.converters.Ingest</exec.mainClass>
</properties>
</action>
Expand All @@ -33,7 +33,7 @@
<exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen>
<exec.vmArgs>-Xmx30G -Xms30G --add-opens=java.base/java.nio=ALL-UNNAMED --enable-preview -Darrow.memory.debug.allocator=true -agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address}</exec.vmArgs>
<exec.appArgs>-v -src "D:\halcyon\features\src" -dest "D:\halcyon\features\dest0"</exec.appArgs>
<exec.appArgs>-v -src "D:\acc\src" -dest "D:\acc\zip" -heatmap</exec.appArgs>
<exec.mainClass>com.ebremer.halcyon.converters.Ingest</exec.mainClass>
</properties>
</action>
Expand All @@ -51,7 +51,7 @@
<exec.args>${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}</exec.args>
<exec.executable>java</exec.executable>
<exec.vmArgs>-Xmx30G -Xms30G --add-opens=java.base/java.nio=ALL-UNNAMED --enable-preview -Darrow.memory.debug.allocator=true</exec.vmArgs>
<exec.appArgs>-v -src "D:\halcyon\features\src" -dest "D:\halcyon\features\dest0"</exec.appArgs>
<exec.appArgs>-v -src "D:\acc\src" -dest "D:\acc\zip" -heatmap</exec.appArgs>
<exec.mainClass>com.ebremer.halcyon.converters.Ingest</exec.mainClass>
</properties>
</action>
Expand Down
93 changes: 87 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.ebremer</groupId>
<artifactId>Halcyon</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
<packaging>jar</packaging>
<name>Halcyon</name>
<description>A whole slide image annotation, management, and visualization system</description>
Expand Down Expand Up @@ -72,15 +72,15 @@
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>20</maven.compiler.target>
<java.version>17</java.version>
<jena.version>4.8.0</jena.version>
<wicket.ver>9.14.0</wicket.ver>
<jena.version>4.9.0</jena.version>
<wicket.ver>9.13.0</wicket.ver>
<bioformats.ver>6.13.0</bioformats.ver>
<hilbert.ver>0.2.2</hilbert.ver>
<commons-pool2.ver>2.11.1</commons-pool2.ver>
<jakarta.json.version>2.0.1</jakarta.json.version>
<titanium-json-ld.ver>1.3.2</titanium-json-ld.ver>
<dcm4che.ver>5.29.2</dcm4che.ver>
<beakgraph.version>0.4.0</beakgraph.version>
<beakgraph.version>0.5.0</beakgraph.version>
<keycloak.version>21.1.1</keycloak.version>
<infinispan.version>14.0.8.Final</infinispan.version>
<resteasy.version>4.7.7.Final</resteasy.version>
Expand Down Expand Up @@ -361,6 +361,47 @@
</plugins>
</build>
</profile>
<profile>
<id>hovernet2oa</id>
<build>
<finalName>hovernet2oa-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>heatmap2oashade</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.handlers</resource>
</transformer>
<transformer implementation="org.springframework.boot.maven.PropertiesMergingResourceTransformer">
<resource>META-INF/spring.factories</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.schemas</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
<mainClass>com.ebremer.halcyon.converters.HoverNet2OA</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>ingestjar</id>
<build>
Expand Down Expand Up @@ -415,6 +456,17 @@
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<compilerArgs>
<arg>--enable-preview</arg>
<arg>--enable-preview</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down Expand Up @@ -537,12 +589,12 @@
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>2.1.1</version>
<version>2.1.2</version>
</dependency>
<dependency>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
<version>1.1.1</version>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>com.apicatalog</groupId>
Expand Down Expand Up @@ -691,6 +743,35 @@
<artifactId>BeakGraph</artifactId>
<version>${beakgraph.version}</version>
</dependency>

<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-tiff</artifactId>
<version>3.9.4</version>
</dependency>
<!--
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-jp2k</artifactId>
<version>27.4.01</version>
</dependency>-->
<!--
<dependency>
<groupId>it.geosolutions.imageio-ext</groupId>
<artifactId>imageio-ext-kakadu</artifactId>
<version>1.4.5</version>
</dependency>-->
<!--
<dependency>
<groupId>com.github.jai-imageio</groupId>
<artifactId>jai-imageio-core</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>com.github.jai-imageio</groupId>
<artifactId>jai-imageio-jpeg2000</artifactId>
<version>1.4.0</version>
</dependency>-->
</dependencies>
<pluginRepositories>
<pluginRepository>
Expand Down
9 changes: 2 additions & 7 deletions src/main/java/com/ebremer/ethereal/AbstractLDModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,13 @@ public AbstractLDModel(final Object modelObject) {
public T getObject() {
Dataset ds = DatabaseLocator.getDatabase().getDataset();
ds.begin(ReadWrite.READ);
final String expression = propertyExpression();
System.out.println("public T getObject() "+expression);
final Object target = getInnermostModelOrObject();
System.out.println("TARGET MAESTRO : "+target.getClass().toString());
if (target instanceof ModelCom) {
Model m = (Model) target;
Triple triple = tripleExpression();
Statement ss = m.getRequiredProperty(m.asRDFNode(triple.getSubject()).asResource(), m.createProperty(triple.getPredicate().getURI()));
String now = ss.getObject().asLiteral().getString();
Component c = getComponent();
RDFTextField d = (RDFTextField) c;
RDFTextField d = (RDFTextField) getComponent();
d.setTriple(ss.asTriple());
ds.end();
return (T) now;
Expand All @@ -56,7 +52,7 @@ public void setObject(T object) {
Triple triple = tripleExpression();
Statement before = m.asStatement(triple);
Node oo = NodeFactory.createLiteral((String) object);
Statement after = m.asStatement(new Triple(triple.getSubject(),triple.getPredicate(),oo));
Statement after = m.asStatement(Triple.create(triple.getSubject(),triple.getPredicate(),oo));
m.remove(before);
m.add(after);
RDFDataMgr.write(System.out, m, RDFFormat.TURTLE_PRETTY);
Expand All @@ -67,7 +63,6 @@ public void setObject(T object) {
}
}

protected abstract String propertyExpression();
protected abstract Triple tripleExpression();
protected abstract Component getComponent();
}
4 changes: 0 additions & 4 deletions src/main/java/com/ebremer/ethereal/AbstractNodeModel.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.ebremer.ethereal;

import org.apache.jena.graph.Node;
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/com/ebremer/ethereal/Bruh.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.ebremer.ethereal;

import com.ebremer.ns.EXIF;
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/com/ebremer/ethereal/ISolutionModel.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.ebremer.ethereal;

import org.apache.wicket.model.IModel;
Expand All @@ -22,5 +18,4 @@ public ISolutionModel(Solution s) {
public Solution getObject() {
return solution;
}

}
69 changes: 3 additions & 66 deletions src/main/java/com/ebremer/ethereal/LDModel.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.ebremer.ethereal;

import org.apache.jena.graph.Triple;
Expand All @@ -10,76 +6,25 @@
import org.apache.wicket.model.IComponentInheritedModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.IWrapModel;
import org.danekja.java.util.function.serializable.SerializableBiFunction;
import org.danekja.java.util.function.serializable.SerializableFunction;
import org.danekja.java.util.function.serializable.SerializablePredicate;
import org.danekja.java.util.function.serializable.SerializableSupplier;

/**
*
* @author erich
* @param <T>
*/
public class LDModel <T> extends ChainingModel<T> implements IComponentInheritedModel<T> {
T rdf;
//T rdf;

public LDModel(final IModel<T> model) {
super(model);
this.rdf = (T) model;
}

@Override
public IModel<T> filter(SerializablePredicate<? super T> predicate) {
System.out.println("filter");
return super.filter(predicate); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/OverriddenMethodBody
}

@Override
public <R> IModel<R> map(SerializableFunction<? super T, R> mapper) {
System.out.println("map");
return super.map(mapper); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/OverriddenMethodBody
}

@Override
public <R, U> IModel<R> combineWith(IModel<U> other, SerializableBiFunction<? super T, ? super U, R> combiner) {
System.out.println("combineWith");
return super.combineWith(other, combiner); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/OverriddenMethodBody
}

@Override
public <R> IModel<R> flatMap(SerializableFunction<? super T, IModel<R>> mapper) {
System.out.println("flatMap");
return super.flatMap(mapper); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/OverriddenMethodBody
}

@Override
public IModel<T> orElse(T other) {
System.out.println("orElse");
return super.orElse(other); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/OverriddenMethodBody
}

@Override
public IModel<T> orElseGet(SerializableSupplier<? extends T> other) {
System.out.println("orElseGet");
return super.orElseGet(other); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/OverriddenMethodBody
}

@Override
public IModel<Boolean> isPresent() {
System.out.println("isPresent");
return super.isPresent(); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/OverriddenMethodBody
// this.rdf = (T) model;
}

@Override
public <C> IWrapModel<C> wrapOnInheritance(Component component) {
System.out.println("wrapOnInheritance");
return new AttachedLDModel<>(component);
}

protected String propertyExpression(Component component) {
return component.getId();
}

private class AttachedLDModel<C> extends AbstractLDModel<C> implements IWrapModel<C>{
private static final long serialVersionUID = 1L;
private final Component owner;
Expand All @@ -89,12 +34,6 @@ private class AttachedLDModel<C> extends AbstractLDModel<C> implements IWrapMode
this.owner = owner;
}

@Override
protected String propertyExpression() {
//System.out.println("XXXXXX propertyExpression : "+owner.getClass().getCanonicalName());
return LDModel.this.propertyExpression(owner);
}

@Override
public IModel<T> getWrappedModel() {
return LDModel.this;
Expand All @@ -104,14 +43,12 @@ public IModel<T> getWrappedModel() {
public void detach() {
super.detach();
LDModel.this.detach();
//System.out.println("AttachedLDModel detach");
}

@Override
protected Triple tripleExpression() {
if (owner instanceof RDFTextField haha) {
Triple t = haha.getTriple();
return t;
return haha.getTriple();
}
throw new UnsupportedOperationException("Can't handle this object type. Sorry sibling.");
}
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/com/ebremer/ethereal/Q.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.ebremer.ethereal;

import com.ebremer.ns.EXIF;
import com.ebremer.ns.HAL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.jena.arq.querybuilder.handlers.WhereHandler;
import org.apache.jena.query.ParameterizedSparqlString;
import org.apache.jena.query.Query;
import org.apache.jena.query.QueryFactory;
import org.apache.jena.sparql.lang.sparql_11.ParseException;
import org.apache.jena.sparql.syntax.Element;
import org.apache.jena.sparql.syntax.ElementFilter;
import org.apache.jena.sparql.syntax.ElementGroup;
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/com/ebremer/ethereal/RDFCheckBox.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.ebremer.ethereal;

import org.apache.jena.graph.Node;
Expand All @@ -19,7 +15,7 @@ public class RDFCheckBox extends CheckBox {

public RDFCheckBox(String id, Resource s, Property p) {
super(id, null);
this.triple = new Triple(s.asNode(), p.asNode(), Node.ANY);
this.triple = Triple.create(s.asNode(), p.asNode(), Node.ANY);
}

public Triple getTriple() {
Expand Down
Loading

0 comments on commit 09d2a14

Please sign in to comment.