Skip to content

Commit

Permalink
refactor: update code style ValidationExample
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleycaselli committed Jan 11, 2025
1 parent 94fdbd0 commit c0e31bc
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/test/java/org/topbraid/shacl/ValidationExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@

public class ValidationExample {

/**
* Loads an example SHACL file and validates all focus nodes against all shapes.
*/
public static void main(String[] args) throws Exception {
// Load the main data model
Model dataModel = JenaUtil.createMemoryModel();
dataModel.read(ValidationExample.class.getResourceAsStream("/sh/tests/core/property/class-001.test.ttl"), "urn:dummy", FileUtils.langTurtle);
// Perform the validation of everything, using the data model
// also as the shapes model - you may have them separated
Resource report = ValidationUtil.validateModel(dataModel, dataModel, true);
// Print violations
System.out.println(ModelPrinter.get().print(report.getModel()));
}
/**
* Loads an example SHACL file and validates all focus nodes against all shapes.
*/
public static void main(String[] args) {

// Load the main data model
Model dataModel = JenaUtil.createMemoryModel();
dataModel.read(ValidationExample.class.getResourceAsStream("/sh/tests/core/property/class-001.test.ttl"), "urn:dummy", FileUtils.langTurtle);

// Perform the validation of everything, using the data model
// also as the shapes model - you may have them separated
Resource report = ValidationUtil.validateModel(dataModel, dataModel, true);

// Print violations
System.out.println(ModelPrinter.get().print(report.getModel()));
}
}

0 comments on commit c0e31bc

Please sign in to comment.