Skip to content

Commit

Permalink
ci: release 2.12.0 (#733)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jan Robert <[email protected]>
Co-authored-by: Yalz <[email protected]>
Co-authored-by: Ranko Orlic <[email protected]>
  • Loading branch information
5 people authored Dec 11, 2024
2 parents c1b8d30 + ff2466e commit 58561de
Show file tree
Hide file tree
Showing 92 changed files with 692 additions and 105 deletions.
4 changes: 4 additions & 0 deletions .github/ldio.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

FROM amazoncorretto:21-alpine-jdk

## Dependency for pyroscope
RUN apk --no-cache add libstdc++

RUN adduser -D -u 2000 ldio
USER ldio
WORKDIR /ldio

COPY ./ldi-orchestrator/ldio-application/target/ldio-application.jar ./
COPY ./ldi-orchestrator/ldio-instrumentation/target/ldio-instrumentation.jar ./lib/

COPY ./ldi-orchestrator/ldio-connectors/ldio-http-in/target/ldio-http-in-jar-with-dependencies.jar ./lib/
COPY ./ldi-orchestrator/ldio-connectors/ldio-http-in-poller/target/ldio-http-in-poller-jar-with-dependencies.jar ./lib/
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/1.a-build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
**/*with-dependencies.jar
**/*application.jar
**/ldes-discoverer.jar
**/ldio-instrumentation.jar
build-ldio-image:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-merged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
**/*with-dependencies.jar
**/*application.jar
**/ldes-discoverer.jar
**/ldio-instrumentation.jar
create-ldio-image:
Expand Down
2 changes: 1 addition & 1 deletion ldi-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>be.vlaanderen.informatievlaanderen.ldes</groupId>
<artifactId>linked-data-interactions</artifactId>
<version>2.11.0</version>
<version>2.12.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion ldi-core/change-detection-filter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>be.vlaanderen.informatievlaanderen.ldes.ldi</groupId>
<artifactId>ldi-core</artifactId>
<version>2.11.0</version>
<version>2.12.0-SNAPSHOT</version>
</parent>

<artifactId>change-detection-filter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ldi-core/file-archiving/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>be.vlaanderen.informatievlaanderen.ldes.ldi</groupId>
<artifactId>ldi-core</artifactId>
<version>2.11.0</version>
<version>2.12.0-SNAPSHOT</version>
</parent>

<artifactId>file-archiving</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ldi-core/geojson-to-wkt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>be.vlaanderen.informatievlaanderen.ldes.ldi</groupId>
<artifactId>ldi-core</artifactId>
<version>2.11.0</version>
<version>2.12.0-SNAPSHOT</version>
</parent>

<artifactId>geojson-to-wkt</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ldi-core/http-sparql-out/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>be.vlaanderen.informatievlaanderen.ldes.ldi</groupId>
<artifactId>ldi-core</artifactId>
<version>2.11.0</version>
<version>2.12.0-SNAPSHOT</version>
</parent>

<artifactId>http-sparql-out</artifactId>
Expand Down
6 changes: 5 additions & 1 deletion ldi-core/json-to-ld-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>be.vlaanderen.informatievlaanderen.ldes.ldi</groupId>
<artifactId>ldi-core</artifactId>
<version>2.11.0</version>
<version>2.12.0-SNAPSHOT</version>
</parent>

<artifactId>json-to-ld-adapter</artifactId>
Expand All @@ -15,5 +15,9 @@
<groupId>be.vlaanderen.informatievlaanderen.ldes.ldi</groupId>
<artifactId>ldi-common</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.core5</groupId>
<artifactId>httpcore5</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import be.vlaanderen.informatievlaanderen.ldes.ldi.exceptions.ParseToJsonException;
import be.vlaanderen.informatievlaanderen.ldes.ldi.exceptions.UnsupportedMimeTypeException;
import be.vlaanderen.informatievlaanderen.ldes.ldi.types.LdiAdapter;
import org.apache.http.entity.ContentType;
import org.apache.hc.core5.http.ContentType;
import org.apache.jena.atlas.json.*;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
Expand Down Expand Up @@ -84,8 +84,7 @@ private Model mapJsonObjectToModel(JsonValue json) {
final var jsonObject = json.getAsObject();
addContexts(jsonObject);
Model model = ModelFactory.createDefaultModel();
RDFParser.fromString(jsonObject.toString())
.lang(Lang.JSONLD)
RDFParser.fromString(jsonObject.toString(), Lang.JSONLD)
.context(jenaContext)
.parse(model);
return model;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>be.vlaanderen.informatievlaanderen.ldes.client</groupId>
<artifactId>ldes-client</artifactId>
<version>2.11.0</version>
<version>2.12.0-SNAPSHOT</version>
</parent>

<artifactId>event-stream-properties-fetcher</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ldi-core/ldes-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>be.vlaanderen.informatievlaanderen.ldes.ldi</groupId>
<artifactId>ldi-core</artifactId>
<version>2.11.0</version>
<version>2.12.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion ldi-core/ldes-client/starting-node/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ldes-client</artifactId>
<groupId>be.vlaanderen.informatievlaanderen.ldes.client</groupId>
<version>2.11.0</version>
<version>2.12.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>starting-node</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ldi-core/ldes-client/tree-node-fetcher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ldes-client</artifactId>
<groupId>be.vlaanderen.informatievlaanderen.ldes.client</groupId>
<version>2.11.0</version>
<version>2.12.0-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.jena.graph;

import org.apache.jena.util.CollectionFactory;

import java.util.Iterator;
import java.util.Set;

/**
GraphExtract offers a very simple recursive extraction of a subgraph with a
specified root in some supergraph. The recursion is terminated by triples
that satisfy some supplied boundary condition.
*/
public class GraphExtract {
protected final TripleBoundary b;

public GraphExtract(TripleBoundary b) {
this.b = b;
}

/**
Answer a new graph which is the reachable subgraph from <code>node</code>
in <code>graph</code> with the terminating condition given by the
TripleBoundary passed to the constructor.
*/
public Graph extract(Node node, Graph graph) {
return extractInto(GraphMemFactory.createGraphMem(), node, graph);
}

/**
Answer the graph <code>toUpdate</code> augmented with the sub-graph of
<code>extractFrom</code> reachable from <code>root</code> bounded
by this instance's TripleBoundary.
*/
public Graph extractInto(Graph toUpdate, Node root, Graph extractFrom) {
new Extraction(b, toUpdate, extractFrom).extractInto(root);
return toUpdate;
}

/**
This is the class that does all the work, in the established context of the
source and destination graphs, the TripleBoundary that determines the
limits of the extraction, and a local set <code>active</code> of nodes
already seen and hence not to be re-processed.
*/
protected static class Extraction {
protected Graph toUpdate;
protected Graph extractFrom;
protected Set<Node> active;
protected TripleBoundary b;

Extraction(TripleBoundary b, Graph toUpdate, Graph extractFrom) {
this.toUpdate = toUpdate;
this.extractFrom = extractFrom;
this.active = CollectionFactory.createHashedSet();
this.b = b;
}

public void extractInto(Node root) {
active.add(root);
Iterator<Triple> it = extractFrom.find(root, Node.ANY, Node.ANY);
while (it.hasNext()) {
Triple t = it.next();
Node subRoot = t.getObject();
toUpdate.add(t);
if (!(active.contains(subRoot) || b.stopAt(t))) extractInto(subRoot);
}
}
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.jena.graph;

/**
An interface for expressing a stopping condition on triples, such as in
sub-graph extraction.
*/
public interface TripleBoundary {
/**
Answer true if this triple is a stopping triple, and whatever search is using
this interface should proceed no further.
*/
boolean stopAt(Triple t);

/**
A TripleBoundary without limits - stopAt always returns false.
*/
TripleBoundary stopNowhere = t -> false;

/**
A TripleBoundary that stops at triples with anonymous objects.
*/
TripleBoundary stopAtAnonObject = t -> t.getObject().isBlank();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.jena.rdf.model;

import org.apache.jena.graph.Graph;
import org.apache.jena.graph.GraphExtract;
import org.apache.jena.graph.TripleBoundary;

/**
ModelExtract - a wrapper for GraphExtract, allowing rooted sub-models to be
extracted from other models with some boundary condition.
*/
public class ModelExtract {
/**
The statement boundary used to bound the extraction.
*/
protected StatementBoundary boundary;

/**
Initialise this ModelExtract with a boundary condition.
*/
public ModelExtract(StatementBoundary b) {
boundary = b;
}

/**
Answer the rooted sub-model.
*/
public Model extract(Resource r, Model s) {
return extractInto(ModelFactory.createDefaultModel(), r, s);
}

/**
Answer <code>model</code> after updating it with the sub-graph of
<code>s</code> rooted at <code>r</code>, bounded by this instances
<code>boundary</code>.
*/
public Model extractInto(Model model, Resource r, Model s) {
TripleBoundary tb = boundary.asTripleBoundary(s);
Graph g = getGraphExtract(tb).extractInto(model.getGraph(), r.asNode(), s.getGraph());
return ModelFactory.createModelForGraph(g);
}

/**
Answer a GraphExtract initialised with <code>tb</code>; extension point
for sub-classes (specifically TestModelExtract's mocks).
*/
protected GraphExtract getGraphExtract(TripleBoundary tb) {
return new GraphExtract(tb);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.jena.rdf.model;

import org.apache.jena.graph.TripleBoundary;

/**
An interface for expressing search boundaries in terms of bounding statements.
*/

public interface StatementBoundary {
/**
Answer true if this statement is a boundary of the search.
*/
boolean stopAt(Statement s);

/**
Answer a TripleBoundary corresponding to this StatementBoundary,
where Triples may be converted to Statements using <code>m</code>.
*/
TripleBoundary asTripleBoundary(Model m);
}
Loading

0 comments on commit 58561de

Please sign in to comment.