-
Notifications
You must be signed in to change notification settings - Fork 5
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
Refactor out SPIN #184
Comments
Additional notes:
|
Next steps:
|
@palagdan let's start implementation without upgrading SHACL library:
STEPS:
I created initial PR -- #251 |
@blcham @Test
public void executeSPINQueryWithCustomJavaFunction() {
PipelineFactory pipelineFactory = new PipelineFactory();
String queryString = """
PREFIX kbss-timef: <http://onto.fel.cvut.cz/ontologies/lib/function/time/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?nextDay
WHERE {
BIND(kbss-timef:add-days("2022-01-01"^^xsd:date, 1) AS ?nextDay)
}
""";
Model model = ModelFactory.createDefaultModel();
Query query = QueryFactory.create(queryString);
QueryExecution qexec = QueryExecutionFactory.create(query, model);
ResultSet results = qexec.execSelect();
if (results.hasNext()) {
QuerySolution soln = results.nextSolution();
assertEquals(soln.getLiteral("nextDay").getString(), "2022-01-02");
}
} The test works fine. PipelineFactory registers all S-PIPES modules and functions. However, I’m unsure how to reimplement functions like AddDays using SHACL because there is no available documentation on how to use the SHACL API. Additionally, why should AddDays extend the SPIN AbstractFunction class? Since SPIN is designed for constraints and AddDays is a function that produces a Date output. |
STEPS:
The text was updated successfully, but these errors were encountered: