ShaclSailConfig extends AbstractDelegatingSailImplConfig { @Override public Resource export(Model m) { Resource implNode = super.export(m); m.setNamespace("sail-shacl", NAMESPACE); m.add(implNode, PARALLEL_VALIDATION, BooleanLiteral.valueOf(isParallelValidation())); m.add(implNode, UNDEFINED_TARGET_VALIDATES_ALL_SUBJECTS, BooleanLiteral.valueOf(isUndefinedTargetValidatesAllSubjects())); m.add(implNode, LOG_VALIDATION_PLANS, BooleanLiteral.valueOf(isLogValidationPlans())); m.add(implNode, LOG_VALIDATION_VIOLATIONS, BooleanLiteral.valueOf(isLogValidationViolations())); m.add(implNode, IGNORE_NO_SHAPES_LOADED_EXCEPTION, BooleanLiteral.valueOf(isIgnoreNoShapesLoadedException())); m.add(implNode, VALIDATION_ENABLED, BooleanLiteral.valueOf(isValidationEnabled())); m.add(implNode, CACHE_SELECT_NODES, BooleanLiteral.valueOf(isCacheSelectNodes())); m.add(implNode, GLOBAL_LOG_VALIDATION_EXECUTION, BooleanLiteral.valueOf(isGlobalLogValidationExecution())); m.add(implNode, RDFS_SUB_CLASS_REASONING, BooleanLiteral.valueOf(isRdfsSubClassReasoning())); m.add(implNode, PERFORMANCE_LOGGING, BooleanLiteral.valueOf(isPerformanceLogging())); m.add(implNode, SERIALIZABLE_VALIDATION, BooleanLiteral.valueOf(isSerializableValidation())); m.add(implNode, ShaclSailSchema.ECLIPSE_RDF4J_SHACL_EXTENSIONS, BooleanLiteral.valueOf(isEclipseRdf4jShaclExtensions())); m.add(implNode, ShaclSailSchema.DASH_DATA_SHAPES, BooleanLiteral.valueOf(isDashDataShapes())); m.add(implNode, ShaclSailSchema.VALIDATION_RESULTS_LIMIT_TOTAL, vf.createLiteral(getValidationResultsLimitTotal())); m.add(implNode, ShaclSailSchema.VALIDATION_RESULTS_LIMIT_PER_CONSTRAINT, vf.createLiteral(getValidationResultsLimitPerConstraint())); return implNode; } ShaclSailConfig();  ShaclSailConfig(SailImplConfig delegate); @Deprecated boolean isUndefinedTargetValidatesAllSubjects(); @Deprecated void setUndefinedTargetValidatesAllSubjects(boolean undefinedTargetValidatesAllSubjects); boolean isLogValidationPlans(); void setLogValidationPlans(boolean logValidationPlans); boolean isLogValidationViolations(); void setLogValidationViolations(boolean logValidationViolations); boolean isGlobalLogValidationExecution(); void setGlobalLogValidationExecution(boolean globalLogValidationExecution); @Deprecated boolean isIgnoreNoShapesLoadedException(); @Deprecated void setIgnoreNoShapesLoadedException(boolean ignoreNoShapesLoadedException); boolean isValidationEnabled(); void setValidationEnabled(boolean validationEnabled); boolean isParallelValidation(); void setParallelValidation(boolean parallelValidation); boolean isCacheSelectNodes(); void setCacheSelectNodes(boolean cacheSelectNodes); boolean isRdfsSubClassReasoning(); void setRdfsSubClassReasoning(boolean rdfsSubClassReasoning); boolean isPerformanceLogging(); void setPerformanceLogging(boolean performanceLogging); boolean isSerializableValidation(); void setSerializableValidation(boolean serializableValidation); @Experimental boolean isEclipseRdf4jShaclExtensions(); @Experimental void setEclipseRdf4jShaclExtensions(boolean eclipseRdf4jShaclExtensions); @Experimental boolean isDashDataShapes(); @Experimental void setDashDataShapes(boolean dashDataShapes); long getValidationResultsLimitTotal(); long getValidationResultsLimitPerConstraint(); void setValidationResultsLimitTotal(long validationResultsLimitTotal); void setValidationResultsLimitPerConstraint(long validationResultsLimitPerConstraint); @Override Resource export(Model m); @Override void parse(Model m, Resource implNode); static final boolean PARALLEL_VALIDATION_DEFAULT; static final boolean UNDEFINED_TARGET_VALIDATES_ALL_SUBJECTS_DEFAULT; static final boolean LOG_VALIDATION_PLANS_DEFAULT; static final boolean LOG_VALIDATION_VIOLATIONS_DEFAULT; static final boolean IGNORE_NO_SHAPES_LOADED_EXCEPTION_DEFAULT; static final boolean VALIDATION_ENABLED_DEFAULT; static final boolean CACHE_SELECT_NODES_DEFAULT; static final boolean GLOBAL_LOG_VALIDATION_EXECUTION_DEFAULT; static final boolean RDFS_SUB_CLASS_REASONING_DEFAULT; static final boolean PERFORMANCE_LOGGING_DEFAULT; static final boolean SERIALIZABLE_VALIDATION_DEFAULT; static final boolean ECLIPSE_RDF4J_SHACL_EXTENSIONS_DEFAULT; static final boolean DASH_DATA_SHAPES_DEFAULT; final static long VALIDATION_RESULTS_LIMIT_TOTAL_DEFAULT; final static long VALIDATION_RESULTS_LIMIT_PER_CONSTRAINT_DEFAULT; }
@Test public void exportAddsAllConfigData() { ShaclSailConfig shaclSailConfig = new ShaclSailConfig(); Model m = new TreeModel(); Resource node = shaclSailConfig.export(m); assertTrue(m.contains(node, PARALLEL_VALIDATION, null)); assertTrue(m.contains(node, UNDEFINED_TARGET_VALIDATES_ALL_SUBJECTS, null)); assertTrue(m.contains(node, LOG_VALIDATION_PLANS, null)); assertTrue(m.contains(node, LOG_VALIDATION_VIOLATIONS, null)); assertTrue(m.contains(node, IGNORE_NO_SHAPES_LOADED_EXCEPTION, null)); assertTrue(m.contains(node, VALIDATION_ENABLED, null)); assertTrue(m.contains(node, CACHE_SELECT_NODES, null)); assertTrue(m.contains(node, GLOBAL_LOG_VALIDATION_EXECUTION, null)); assertTrue(m.contains(node, RDFS_SUB_CLASS_REASONING, null)); assertTrue(m.contains(node, PERFORMANCE_LOGGING, null)); assertTrue(m.contains(node, SERIALIZABLE_VALIDATION, null)); assertTrue(m.contains(node, ECLIPSE_RDF4J_SHACL_EXTENSIONS, null)); assertTrue(m.contains(node, DASH_DATA_SHAPES, null)); assertTrue(m.contains(node, VALIDATION_RESULTS_LIMIT_TOTAL, null)); assertTrue(m.contains(node, VALIDATION_RESULTS_LIMIT_PER_CONSTRAINT, null)); }