-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# CHANGELOG.md # README.md # docker/compose.yaml # pom.xml # src/main/scala/io/rml/framework/Main.scala # src/main/scala/io/rml/framework/core/function/model/Function.scala # src/main/scala/io/rml/framework/engine/statement/FunctionMapGeneratorAssembler.scala # src/test/scala/io/rml/framework/SandboxTests.scala
- Loading branch information
Showing
36 changed files
with
631 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM eclipse-temurin:19_36-jre-alpine | ||
RUN mkdir /opt/app | ||
COPY target/RMLStreamer-*.jar /opt/app/RMLStreamer.jar | ||
ENTRYPOINT ["java", "-jar", "/opt/app/RMLStreamer.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
version=$(grep -F '<version>' pom.xml | head -n 1 | cut -d '>' -f 2 | cut -d '<' -f 1) | ||
|
||
### 1. Build RMLStreamer stand-alone | ||
echo "Building stand-alone RMLStreamer version $version" | ||
mvn clean package -DskipTests -P 'stand-alone' | ||
|
||
### 2. Build the docker container | ||
docker build --tag "rmlstreamer:$version" . && \ | ||
echo "Successfully built rmlstreamer:$version !" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
src/main/java/io/rml/framework/flink/util/DummyFunctionAgent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package io.rml.framework.flink.util; | ||
|
||
import be.ugent.idlab.knows.functions.agent.Agent; | ||
import be.ugent.idlab.knows.functions.agent.Arguments; | ||
|
||
import java.io.IOException; | ||
import java.lang.reflect.Method; | ||
import java.util.List; | ||
|
||
/** | ||
* This is a "dummy" function agent that just returns the value of the | ||
* first argument, or null of there are no arguments. | ||
* <p> | ||
* MIT License | ||
* <p> | ||
* Copyright (C) 2017 - 2022 RDF Mapping Language (RML) | ||
* <p> | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* <p> | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* <p> | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
**/ | ||
public class DummyFunctionAgent implements Agent { | ||
@Override | ||
public Object execute(String functionId, Arguments arguments) throws Exception { | ||
return arguments.size() == 0 ? null : arguments.get(arguments.getArgumentNames().iterator().next()); | ||
} | ||
|
||
@Override | ||
public Object execute(String s, Arguments arguments, boolean b) throws Exception { | ||
return execute(s, arguments, false); | ||
} | ||
|
||
@Override | ||
public void executeToFile(String s, Arguments arguments, String s1) throws Exception { | ||
// not used | ||
} | ||
|
||
@Override | ||
public void executeToFile(String s, Arguments arguments, String s1, boolean b) throws Exception { | ||
// not used | ||
} | ||
|
||
@Override | ||
public void writeModel(String s) throws IOException { | ||
// not used | ||
} | ||
|
||
@Override | ||
public String loadFunction(Method method) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public List<String> getParameterPredicates(String s) { | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package io.rml.framework.flink.util; | ||
|
||
import org.apache.commons.io.input.BOMInputStream; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.FileInputStream; | ||
import java.io.IOException; | ||
import java.io.InputStreamReader; | ||
import java.nio.charset.StandardCharsets; | ||
import java.nio.file.Path; | ||
|
||
/** | ||
* MIT License | ||
* <p> | ||
* Copyright (C) 2017 - 2022 RDF Mapping Language (RML) | ||
* <p> | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* <p> | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* <p> | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
**/ | ||
public class IOUtils { | ||
|
||
public static String readFirstLineFromUTF8FileWithBOM(final Path filePath) throws IOException { | ||
try(BufferedReader in = new BufferedReader( | ||
new InputStreamReader( | ||
new BOMInputStream( | ||
new FileInputStream(filePath.toFile())), StandardCharsets.UTF_8) | ||
) | ||
){ | ||
return in.readLine(); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.