@Test(expected = SailConfigException.class) public void parseInvalidModelGivesCorrectException() { mb.add(PARALLEL_VALIDATION, "I'm not a boolean"); subject.parse(mb.build(), implNode); }
@Override public void parse(Model m, Resource implNode) throws SailConfigException { super.parse(m, implNode); try { Models.objectLiteral(m.filter(implNode, PARALLEL_VALIDATION, null)) .ifPresent(l -> setParallelValidation(l.booleanValue())); Models.objectLiteral(m.filter(implNode, UNDEFINED_TARGET_VALIDATES_ALL_SUBJECTS, null)) .ifPresent(l -> setUndefinedTargetValidatesAllSubjects(l.booleanValue())); Models.objectLiteral(m.filter(implNode, LOG_VALIDATION_PLANS, null)) .ifPresent(l -> setLogValidationPlans(l.booleanValue())); Models.objectLiteral(m.filter(implNode, LOG_VALIDATION_VIOLATIONS, null)) .ifPresent(l -> setLogValidationViolations(l.booleanValue())); Models.objectLiteral(m.filter(implNode, IGNORE_NO_SHAPES_LOADED_EXCEPTION, null)) .ifPresent(l -> setIgnoreNoShapesLoadedException(l.booleanValue())); Models.objectLiteral(m.filter(implNode, VALIDATION_ENABLED, null)) .ifPresent(l -> setValidationEnabled(l.booleanValue())); Models.objectLiteral(m.filter(implNode, CACHE_SELECT_NODES, null)) .ifPresent(l -> setCacheSelectNodes(l.booleanValue())); Models.objectLiteral(m.filter(implNode, GLOBAL_LOG_VALIDATION_EXECUTION, null)) .ifPresent(l -> setGlobalLogValidationExecution(l.booleanValue())); Models.objectLiteral(m.filter(implNode, RDFS_SUB_CLASS_REASONING, null)) .ifPresent(l -> setRdfsSubClassReasoning(l.booleanValue())); Models.objectLiteral(m.filter(implNode, PERFORMANCE_LOGGING, null)) .ifPresent(l -> setPerformanceLogging(l.booleanValue())); Models.objectLiteral(m.filter(implNode, SERIALIZABLE_VALIDATION, null)) .ifPresent(l -> setSerializableValidation(l.booleanValue())); } catch (IllegalArgumentException e) { throw new SailConfigException("error parsing Sail configuration", e); } }
ShaclSailConfig extends AbstractDelegatingSailImplConfig { @Override public void parse(Model m, Resource implNode) throws SailConfigException { super.parse(m, implNode); try { Models.objectLiteral(m.filter(implNode, PARALLEL_VALIDATION, null)) .ifPresent(l -> setParallelValidation(l.booleanValue())); Models.objectLiteral(m.filter(implNode, UNDEFINED_TARGET_VALIDATES_ALL_SUBJECTS, null)) .ifPresent(l -> setUndefinedTargetValidatesAllSubjects(l.booleanValue())); Models.objectLiteral(m.filter(implNode, LOG_VALIDATION_PLANS, null)) .ifPresent(l -> setLogValidationPlans(l.booleanValue())); Models.objectLiteral(m.filter(implNode, LOG_VALIDATION_VIOLATIONS, null)) .ifPresent(l -> setLogValidationViolations(l.booleanValue())); Models.objectLiteral(m.filter(implNode, IGNORE_NO_SHAPES_LOADED_EXCEPTION, null)) .ifPresent(l -> setIgnoreNoShapesLoadedException(l.booleanValue())); Models.objectLiteral(m.filter(implNode, VALIDATION_ENABLED, null)) .ifPresent(l -> setValidationEnabled(l.booleanValue())); Models.objectLiteral(m.filter(implNode, CACHE_SELECT_NODES, null)) .ifPresent(l -> setCacheSelectNodes(l.booleanValue())); Models.objectLiteral(m.filter(implNode, GLOBAL_LOG_VALIDATION_EXECUTION, null)) .ifPresent(l -> setGlobalLogValidationExecution(l.booleanValue())); Models.objectLiteral(m.filter(implNode, RDFS_SUB_CLASS_REASONING, null)) .ifPresent(l -> setRdfsSubClassReasoning(l.booleanValue())); Models.objectLiteral(m.filter(implNode, PERFORMANCE_LOGGING, null)) .ifPresent(l -> setPerformanceLogging(l.booleanValue())); Models.objectLiteral(m.filter(implNode, SERIALIZABLE_VALIDATION, null)) .ifPresent(l -> setSerializableValidation(l.booleanValue())); } catch (IllegalArgumentException e) { throw new SailConfigException("error parsing Sail configuration", e); } } }
ShaclSailConfig extends AbstractDelegatingSailImplConfig { @Override public void parse(Model m, Resource implNode) throws SailConfigException { super.parse(m, implNode); try { Models.objectLiteral(m.filter(implNode, PARALLEL_VALIDATION, null)) .ifPresent(l -> setParallelValidation(l.booleanValue())); Models.objectLiteral(m.filter(implNode, UNDEFINED_TARGET_VALIDATES_ALL_SUBJECTS, null)) .ifPresent(l -> setUndefinedTargetValidatesAllSubjects(l.booleanValue())); Models.objectLiteral(m.filter(implNode, LOG_VALIDATION_PLANS, null)) .ifPresent(l -> setLogValidationPlans(l.booleanValue())); Models.objectLiteral(m.filter(implNode, LOG_VALIDATION_VIOLATIONS, null)) .ifPresent(l -> setLogValidationViolations(l.booleanValue())); Models.objectLiteral(m.filter(implNode, IGNORE_NO_SHAPES_LOADED_EXCEPTION, null)) .ifPresent(l -> setIgnoreNoShapesLoadedException(l.booleanValue())); Models.objectLiteral(m.filter(implNode, VALIDATION_ENABLED, null)) .ifPresent(l -> setValidationEnabled(l.booleanValue())); Models.objectLiteral(m.filter(implNode, CACHE_SELECT_NODES, null)) .ifPresent(l -> setCacheSelectNodes(l.booleanValue())); Models.objectLiteral(m.filter(implNode, GLOBAL_LOG_VALIDATION_EXECUTION, null)) .ifPresent(l -> setGlobalLogValidationExecution(l.booleanValue())); Models.objectLiteral(m.filter(implNode, RDFS_SUB_CLASS_REASONING, null)) .ifPresent(l -> setRdfsSubClassReasoning(l.booleanValue())); Models.objectLiteral(m.filter(implNode, PERFORMANCE_LOGGING, null)) .ifPresent(l -> setPerformanceLogging(l.booleanValue())); Models.objectLiteral(m.filter(implNode, SERIALIZABLE_VALIDATION, null)) .ifPresent(l -> setSerializableValidation(l.booleanValue())); } catch (IllegalArgumentException e) { throw new SailConfigException("error parsing Sail configuration", e); } } ShaclSailConfig(); }
ShaclSailConfig extends AbstractDelegatingSailImplConfig { @Override public void parse(Model m, Resource implNode) throws SailConfigException { super.parse(m, implNode); try { Models.objectLiteral(m.filter(implNode, PARALLEL_VALIDATION, null)) .ifPresent(l -> setParallelValidation(l.booleanValue())); Models.objectLiteral(m.filter(implNode, UNDEFINED_TARGET_VALIDATES_ALL_SUBJECTS, null)) .ifPresent(l -> setUndefinedTargetValidatesAllSubjects(l.booleanValue())); Models.objectLiteral(m.filter(implNode, LOG_VALIDATION_PLANS, null)) .ifPresent(l -> setLogValidationPlans(l.booleanValue())); Models.objectLiteral(m.filter(implNode, LOG_VALIDATION_VIOLATIONS, null)) .ifPresent(l -> setLogValidationViolations(l.booleanValue())); Models.objectLiteral(m.filter(implNode, IGNORE_NO_SHAPES_LOADED_EXCEPTION, null)) .ifPresent(l -> setIgnoreNoShapesLoadedException(l.booleanValue())); Models.objectLiteral(m.filter(implNode, VALIDATION_ENABLED, null)) .ifPresent(l -> setValidationEnabled(l.booleanValue())); Models.objectLiteral(m.filter(implNode, CACHE_SELECT_NODES, null)) .ifPresent(l -> setCacheSelectNodes(l.booleanValue())); Models.objectLiteral(m.filter(implNode, GLOBAL_LOG_VALIDATION_EXECUTION, null)) .ifPresent(l -> setGlobalLogValidationExecution(l.booleanValue())); Models.objectLiteral(m.filter(implNode, RDFS_SUB_CLASS_REASONING, null)) .ifPresent(l -> setRdfsSubClassReasoning(l.booleanValue())); Models.objectLiteral(m.filter(implNode, PERFORMANCE_LOGGING, null)) .ifPresent(l -> setPerformanceLogging(l.booleanValue())); Models.objectLiteral(m.filter(implNode, SERIALIZABLE_VALIDATION, null)) .ifPresent(l -> setSerializableValidation(l.booleanValue())); } catch (IllegalArgumentException e) { throw new SailConfigException("error parsing Sail configuration", e); } } ShaclSailConfig(); boolean isUndefinedTargetValidatesAllSubjects(); boolean isLogValidationPlans(); boolean isLogValidationViolations(); boolean isGlobalLogValidationExecution(); boolean isIgnoreNoShapesLoadedException(); boolean isValidationEnabled(); boolean isParallelValidation(); boolean isCacheSelectNodes(); void setParallelValidation(boolean parallelValidation); void setUndefinedTargetValidatesAllSubjects(boolean undefinedTargetValidatesAllSubjects); void setLogValidationPlans(boolean logValidationPlans); void setLogValidationViolations(boolean logValidationViolations); void setIgnoreNoShapesLoadedException(boolean ignoreNoShapesLoadedException); void setValidationEnabled(boolean validationEnabled); void setCacheSelectNodes(boolean cacheSelectNodes); void setGlobalLogValidationExecution(boolean globalLogValidationExecution); boolean isRdfsSubClassReasoning(); void setRdfsSubClassReasoning(boolean rdfsSubClassReasoning); boolean isPerformanceLogging(); void setPerformanceLogging(boolean performanceLogging); boolean isSerializableValidation(); void setSerializableValidation(boolean serializableValidation); @Override Resource export(Model m); @Override void parse(Model m, Resource implNode); }
ShaclSailConfig extends AbstractDelegatingSailImplConfig { @Override public void parse(Model m, Resource implNode) throws SailConfigException { super.parse(m, implNode); try { Models.objectLiteral(m.filter(implNode, PARALLEL_VALIDATION, null)) .ifPresent(l -> setParallelValidation(l.booleanValue())); Models.objectLiteral(m.filter(implNode, UNDEFINED_TARGET_VALIDATES_ALL_SUBJECTS, null)) .ifPresent(l -> setUndefinedTargetValidatesAllSubjects(l.booleanValue())); Models.objectLiteral(m.filter(implNode, LOG_VALIDATION_PLANS, null)) .ifPresent(l -> setLogValidationPlans(l.booleanValue())); Models.objectLiteral(m.filter(implNode, LOG_VALIDATION_VIOLATIONS, null)) .ifPresent(l -> setLogValidationViolations(l.booleanValue())); Models.objectLiteral(m.filter(implNode, IGNORE_NO_SHAPES_LOADED_EXCEPTION, null)) .ifPresent(l -> setIgnoreNoShapesLoadedException(l.booleanValue())); Models.objectLiteral(m.filter(implNode, VALIDATION_ENABLED, null)) .ifPresent(l -> setValidationEnabled(l.booleanValue())); Models.objectLiteral(m.filter(implNode, CACHE_SELECT_NODES, null)) .ifPresent(l -> setCacheSelectNodes(l.booleanValue())); Models.objectLiteral(m.filter(implNode, GLOBAL_LOG_VALIDATION_EXECUTION, null)) .ifPresent(l -> setGlobalLogValidationExecution(l.booleanValue())); Models.objectLiteral(m.filter(implNode, RDFS_SUB_CLASS_REASONING, null)) .ifPresent(l -> setRdfsSubClassReasoning(l.booleanValue())); Models.objectLiteral(m.filter(implNode, PERFORMANCE_LOGGING, null)) .ifPresent(l -> setPerformanceLogging(l.booleanValue())); Models.objectLiteral(m.filter(implNode, SERIALIZABLE_VALIDATION, null)) .ifPresent(l -> setSerializableValidation(l.booleanValue())); } catch (IllegalArgumentException e) { throw new SailConfigException("error parsing Sail configuration", e); } } ShaclSailConfig(); boolean isUndefinedTargetValidatesAllSubjects(); boolean isLogValidationPlans(); boolean isLogValidationViolations(); boolean isGlobalLogValidationExecution(); boolean isIgnoreNoShapesLoadedException(); boolean isValidationEnabled(); boolean isParallelValidation(); boolean isCacheSelectNodes(); void setParallelValidation(boolean parallelValidation); void setUndefinedTargetValidatesAllSubjects(boolean undefinedTargetValidatesAllSubjects); void setLogValidationPlans(boolean logValidationPlans); void setLogValidationViolations(boolean logValidationViolations); void setIgnoreNoShapesLoadedException(boolean ignoreNoShapesLoadedException); void setValidationEnabled(boolean validationEnabled); void setCacheSelectNodes(boolean cacheSelectNodes); void setGlobalLogValidationExecution(boolean globalLogValidationExecution); boolean isRdfsSubClassReasoning(); void setRdfsSubClassReasoning(boolean rdfsSubClassReasoning); boolean isPerformanceLogging(); void setPerformanceLogging(boolean performanceLogging); boolean isSerializableValidation(); void setSerializableValidation(boolean serializableValidation); @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; }