Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pushed Jena to v5.2.0 #184

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading