Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .codex/skills/mvnf/scripts/mvnf.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def main() -> int:
print(f"Test selector: {test_selector} ({'failsafe' if args.it else 'surefire'})")

clean_cmd = mvn_cmd + common_flags + ["-pl", module, "clean"]
install_cmd = mvn_cmd + (offline_flag + ["-T", "1C", "-Dmaven.repo.local=.m2_repo", "-Pquick", "clean", "install"])
install_cmd = mvn_cmd + (offline_flag + ["-T", "1C", "-Dmaven.repo.local=.m2_repo", "-Pquick", "install"])

verify_cmd = mvn_cmd + common_flags + ["-pl", module]
if test_selector is not None:
Expand All @@ -298,7 +298,7 @@ def main() -> int:

rc, _ = _run(install_cmd, repo_root, args.tail, log_paths[1], args.stream)
if rc != 0:
print("\n[mvnf] Root clean install failed.")
print("\n[mvnf] Root install failed.")
return rc

rc, _ = _run(verify_cmd, repo_root, args.tail, log_paths[2], args.stream)
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ e2e/test-results
.m2_repo/
.serena/
.vscode
/.codex/environments/environment.toml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ public static final class Shacl {
public final static IRI rdfsSubClassReasoning = createIRI(NAMESPACE,
"shacl.rdfsSubClassReasoning");

/**
* <code>tag:rdf4j.org,2023:config/shacl.includeInferredStatements</code>
*/
public final static IRI includeInferredStatements = createIRI(NAMESPACE,
"shacl.includeInferredStatements");

/**
* <code>tag:rdf4j.org,2023:config/shacl.performanceLogging</code>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public class RSX {
/** <var>http://rdf4j.org/shacl-extensions#targetShape</var> */
public final static IRI targetShape = create("targetShape");

public final static IRI rdfsSubClassReasoning = create("rdfsSubClassReasoning");
public final static IRI includeInferredStatements = create("includeInferredStatements");

public final static IRI dataGraph = create("dataGraph");
public final static IRI shapesGraph = create("shapesGraph");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void processForSchemaCache(Statement statement) {
sail.addSubPropertyOfStatement(
sail.getValueFactory().createStatement(subject, RDFS.SUBPROPERTYOF, RDFS.MEMBER));
schemaChange = true;
} else if (predicate.equals(RDF.TYPE)) {
} else if (predicate.equals(RDF.TYPE) && object instanceof Resource) {
if (!sail.hasType(((Resource) object))) {
sail.addType((Resource) object);
schemaChange = true;
Expand Down Expand Up @@ -276,11 +276,7 @@ private void addStatement(boolean actuallyAdd, Resource subject, IRI predicate,

}

if (predicate.equals(RDF.TYPE)) {
if (!(object instanceof Resource)) {
throw new SailException("Expected object to a a Resource: " + object.toString());
}

if (predicate.equals(RDF.TYPE) && object instanceof Resource) {
sail.resolveTypes((Resource) object)
.stream()
.peek(inferredType -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ abstract class ShaclSailBaseConfiguration extends NotifyingSailWrapper {
private boolean validationEnabled = ShaclSailConfig.VALIDATION_ENABLED_DEFAULT;
private boolean cacheSelectNodes = ShaclSailConfig.CACHE_SELECT_NODES_DEFAULT;
private boolean rdfsSubClassReasoning = ShaclSailConfig.RDFS_SUB_CLASS_REASONING_DEFAULT;
private boolean includeInferredStatements = true;
private boolean serializableValidation = ShaclSailConfig.SERIALIZABLE_VALIDATION_DEFAULT;
private boolean performanceLogging = ShaclSailConfig.PERFORMANCE_LOGGING_DEFAULT;
private boolean eclipseRdf4jShaclExtensions = ShaclSailConfig.ECLIPSE_RDF4J_SHACL_EXTENSIONS_DEFAULT;
Expand Down Expand Up @@ -146,6 +147,25 @@ public void setRdfsSubClassReasoning(boolean rdfsSubClassReasoning) {
this.rdfsSubClassReasoning = rdfsSubClassReasoning;
}

/**
* Check if inferred statements from the base sail should be used during SHACL validation when
* {@link #isRdfsSubClassReasoning()} is disabled.
*
* @return <code>true</code> if inferred statements should be considered, <code>false</code> otherwise.
*/
public boolean isIncludeInferredStatements() {
return includeInferredStatements;
}

/**
* Allow SHACL validation to use inferred statements from the base sail when RDFS subclass reasoning is disabled.
*
* @param includeInferredStatements default true
*/
public void setIncludeInferredStatements(boolean includeInferredStatements) {
this.includeInferredStatements = includeInferredStatements;
}

/**
* Disable the SHACL validation on commit()
*/
Expand Down
Loading
Loading