Skip to content

Commit

Permalink
Merge pull request #184 from TopQuadrant/177-jena5
Browse files Browse the repository at this point in the history
Pushed Jena to v5.2.0
  • Loading branch information
ashleycaselli authored Jan 10, 2025
2 parents 19fbc85 + 6a4ec5f commit 7c73739
Show file tree
Hide file tree
Showing 46 changed files with 4,730 additions and 4,896 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# By default, normalize line endings
* text=auto

# Force microsofty files to use CRLF
# Force microsoft files to use CRLF
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
*.{reg,[rR][eE][gG]} text eol=crlf
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
include:
- package: "x86_64"
platform: linux/amd64
base: eclipse-temurin:11-alpine
base: eclipse-temurin:21-alpine
- package: "arm64"
platform: linux/arm64
base: amazoncorretto:11-alpine3.18-jdk
base: amazoncorretto:21-alpine3.20-jdk

steps:
- name: lowercase image name
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/maven-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ on:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
distribution: [ "temurin", "corretto" ]
java: [ "17", "21" ]
name: Testing with Java ${{ matrix.java }} (${{ matrix.distribution }})
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
java-version: "11"
distribution: "temurin"
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}

- name: Test with Maven
run: mvn -B test
run: mvn -B test
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<ver.jena>4.10.0</ver.jena>
<ver.jena>5.2.0</ver.jena>
<ver.junit>4.13.2</ver.junit>
<ver.slf4j>1.7.36</ver.slf4j>
<ver.log4j2>2.20.0</ver.log4j2>
<java.version>11</java.version>
<java.version>17</java.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.apache.jena.sparql.function.Function;
import org.apache.jena.sparql.function.FunctionEnv;
import org.apache.jena.sparql.sse.SSE;
import org.apache.jena.sparql.util.Context;
import org.apache.jena.sparql.util.FmtUtils;
import org.topbraid.jenax.statistics.ExecStatistics;
import org.topbraid.jenax.statistics.ExecStatisticsManager;
Expand All @@ -44,10 +45,8 @@
public abstract class AbstractFunction implements Function {

@Override
public void build(String uri, ExprList args) {
}
public void build(String uri, ExprList args, Context context){}


@Override
public NodeValue exec(Binding binding, ExprList args, String uri, FunctionEnv env) {
Node[] nodes = new Node[args.size()];
Expand Down
110 changes: 58 additions & 52 deletions src/main/java/org/topbraid/jenax/progress/ProgressMonitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,60 +21,66 @@
/**
* Inspired by the Eclipse IProgressMonitor, this interface supports monitoring long-running processes with intermediate
* status messages and the ability to cancel.
*
*
* @author Holger Knublauch
*/
public interface ProgressMonitor {

/**
* Typically used by the (long-running) process to determine whether the user has requested cancellation.
* The process should then find a suitable, clean termination.
* @return true if cancel was requested
*/
boolean isCanceled();


/**
* Informs the progress monitor that a new task has been started, with a given number of expected steps.
* A UI connected to the ProgressMonitor would typically display something like a progress bar and the task name.
* @param label the name of the task
* @param totalWork the number of steps (see <code>worked</code>) that is expected to be needed to complete the task
*/
void beginTask(String label, int totalWork);


/**
* Informs the progress monitor that all is completed.
*/
void done();


/**
* Typically called from a parallel thread triggered by the user, this informs the progress monitor that it needs to
* return <code>true</code> for <code>isCanceled</code>.
* Once a process has been canceled, it should not be un-canceled.
* @param value true if canceled
*/
void setCanceled(boolean value);


/**
* Changes the name or label of the current task.
* @param value
*/
void setTaskName(String value);


/**
* Sets the label that serves as sub-task, typically printed under the main task name.
* @param label the subtask label
*/
void subTask(String label);


/**
* Informs the progress monitor that one or more steps have been completed towards the current task (see <code>beginTask</code>).
* @param amount the number of steps completed
*/
void worked(int amount);
/**
* Typically used by the (long-running) process to determine whether the user has requested cancellation.
* The process should then find a suitable, clean termination.
*
* @return true if cancel was requested
*/
boolean isCanceled();


/**
* Informs the progress monitor that a new task has been started, with a given number of expected steps.
* A UI connected to the ProgressMonitor would typically display something like a progress bar and the task name.
*
* @param label the name of the task
* @param totalWork the number of steps (see <code>worked</code>) that is expected to be needed to complete the task
*/
void beginTask(String label, int totalWork);


/**
* Informs the progress monitor that all is completed.
*/
void done();


/**
* Typically called from a parallel thread triggered by the user, this informs the progress monitor that it needs to
* return <code>true</code> for <code>isCanceled</code>.
* Once a process has been canceled, it should not be un-canceled.
*
* @param value true if canceled
*/
void setCanceled(boolean value);


/**
* Changes the name or label of the current task.
*
* @param value the task name
*/
void setTaskName(String value);


/**
* Sets the label that serves as sub-task, typically printed under the main task name.
*
* @param label the subtask label
*/
void subTask(String label);


/**
* Informs the progress monitor that one or more steps have been completed towards the current task (see <code>beginTask</code>).
*
* @param amount the number of steps completed
*/
void worked(int amount);
}
Loading

0 comments on commit 7c73739

Please sign in to comment.