@Test(expected = SailConfigException.class) public void testTimeoutFail() throws Exception { TreeModel g = new TreeModel(); g.add(SimpleValueFactory.getInstance().createIRI("http: HBaseSailConfig cfg = new HBaseSailConfig(); cfg.parse(g, null); }
@Override public void parse(Model graph, Resource implNode) throws SailConfigException { super.parse(graph, implNode); Optional<Literal> tablespaceValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.TABLE_NAME_PROPERTY); if (tablespaceValue.isPresent() && tablespaceValue.get().stringValue().length() > 0) { setTablespace(tablespaceValue.get().stringValue()); } else { Optional<Resource> delegate = Models.subject(graph.filter(null, SailConfigSchema.DELEGATE, implNode)); Optional<Resource> sailImpl = Models.subject(graph.filter(null, SailRepositorySchema.SAILIMPL, delegate.isPresent() ? delegate.get(): implNode)); if (sailImpl.isPresent()) { Optional<Resource> repoImpl = Models.subject(graph.filter(null, RepositoryConfigSchema.REPOSITORYIMPL, sailImpl.get())); if (repoImpl.isPresent()) { Optional<Literal> idValue = Models.objectLiteral(graph.filter(repoImpl.get(), RepositoryConfigSchema.REPOSITORYID, null)); if (idValue.isPresent()) { setTablespace(idValue.get().stringValue()); } } } } Optional<Literal> splitBitsValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.SPLITBITS_PROPERTY); if (splitBitsValue.isPresent()) try { setSplitBits(splitBitsValue.get().intValue()); } catch (NumberFormatException e) { throw new SailConfigException(e); } Optional<Literal> createValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.CREATE_TABLE_PROPERTY); if (createValue.isPresent()) try { setCreate(createValue.get().booleanValue()); } catch (IllegalArgumentException e) { throw new SailConfigException(e); } Optional<Literal> pushValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.PUSH_STRATEGY_PROPERTY); if (pushValue.isPresent()) try { setPush(pushValue.get().booleanValue()); } catch (IllegalArgumentException e) { throw new SailConfigException(e); } Optional<Literal> timeoutValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.EVALUATION_TIMEOUT_PROPERTY); if (timeoutValue.isPresent()) try { setEvaluationTimeout(timeoutValue.get().intValue()); } catch (NumberFormatException e) { throw new SailConfigException(e); } Optional<Literal> elasticIndexValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.ELASTIC_INDEX_URL_PROPERTY); if (elasticIndexValue.isPresent()) { setElasticIndexURL(elasticIndexValue.get().stringValue()); } }
HBaseSailConfig extends AbstractSailImplConfig { @Override public void parse(Model graph, Resource implNode) throws SailConfigException { super.parse(graph, implNode); Optional<Literal> tablespaceValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.TABLE_NAME_PROPERTY); if (tablespaceValue.isPresent() && tablespaceValue.get().stringValue().length() > 0) { setTablespace(tablespaceValue.get().stringValue()); } else { Optional<Resource> delegate = Models.subject(graph.filter(null, SailConfigSchema.DELEGATE, implNode)); Optional<Resource> sailImpl = Models.subject(graph.filter(null, SailRepositorySchema.SAILIMPL, delegate.isPresent() ? delegate.get(): implNode)); if (sailImpl.isPresent()) { Optional<Resource> repoImpl = Models.subject(graph.filter(null, RepositoryConfigSchema.REPOSITORYIMPL, sailImpl.get())); if (repoImpl.isPresent()) { Optional<Literal> idValue = Models.objectLiteral(graph.filter(repoImpl.get(), RepositoryConfigSchema.REPOSITORYID, null)); if (idValue.isPresent()) { setTablespace(idValue.get().stringValue()); } } } } Optional<Literal> splitBitsValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.SPLITBITS_PROPERTY); if (splitBitsValue.isPresent()) try { setSplitBits(splitBitsValue.get().intValue()); } catch (NumberFormatException e) { throw new SailConfigException(e); } Optional<Literal> createValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.CREATE_TABLE_PROPERTY); if (createValue.isPresent()) try { setCreate(createValue.get().booleanValue()); } catch (IllegalArgumentException e) { throw new SailConfigException(e); } Optional<Literal> pushValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.PUSH_STRATEGY_PROPERTY); if (pushValue.isPresent()) try { setPush(pushValue.get().booleanValue()); } catch (IllegalArgumentException e) { throw new SailConfigException(e); } Optional<Literal> timeoutValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.EVALUATION_TIMEOUT_PROPERTY); if (timeoutValue.isPresent()) try { setEvaluationTimeout(timeoutValue.get().intValue()); } catch (NumberFormatException e) { throw new SailConfigException(e); } Optional<Literal> elasticIndexValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.ELASTIC_INDEX_URL_PROPERTY); if (elasticIndexValue.isPresent()) { setElasticIndexURL(elasticIndexValue.get().stringValue()); } } }
HBaseSailConfig extends AbstractSailImplConfig { @Override public void parse(Model graph, Resource implNode) throws SailConfigException { super.parse(graph, implNode); Optional<Literal> tablespaceValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.TABLE_NAME_PROPERTY); if (tablespaceValue.isPresent() && tablespaceValue.get().stringValue().length() > 0) { setTablespace(tablespaceValue.get().stringValue()); } else { Optional<Resource> delegate = Models.subject(graph.filter(null, SailConfigSchema.DELEGATE, implNode)); Optional<Resource> sailImpl = Models.subject(graph.filter(null, SailRepositorySchema.SAILIMPL, delegate.isPresent() ? delegate.get(): implNode)); if (sailImpl.isPresent()) { Optional<Resource> repoImpl = Models.subject(graph.filter(null, RepositoryConfigSchema.REPOSITORYIMPL, sailImpl.get())); if (repoImpl.isPresent()) { Optional<Literal> idValue = Models.objectLiteral(graph.filter(repoImpl.get(), RepositoryConfigSchema.REPOSITORYID, null)); if (idValue.isPresent()) { setTablespace(idValue.get().stringValue()); } } } } Optional<Literal> splitBitsValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.SPLITBITS_PROPERTY); if (splitBitsValue.isPresent()) try { setSplitBits(splitBitsValue.get().intValue()); } catch (NumberFormatException e) { throw new SailConfigException(e); } Optional<Literal> createValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.CREATE_TABLE_PROPERTY); if (createValue.isPresent()) try { setCreate(createValue.get().booleanValue()); } catch (IllegalArgumentException e) { throw new SailConfigException(e); } Optional<Literal> pushValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.PUSH_STRATEGY_PROPERTY); if (pushValue.isPresent()) try { setPush(pushValue.get().booleanValue()); } catch (IllegalArgumentException e) { throw new SailConfigException(e); } Optional<Literal> timeoutValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.EVALUATION_TIMEOUT_PROPERTY); if (timeoutValue.isPresent()) try { setEvaluationTimeout(timeoutValue.get().intValue()); } catch (NumberFormatException e) { throw new SailConfigException(e); } Optional<Literal> elasticIndexValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.ELASTIC_INDEX_URL_PROPERTY); if (elasticIndexValue.isPresent()) { setElasticIndexURL(elasticIndexValue.get().stringValue()); } } HBaseSailConfig(); }
HBaseSailConfig extends AbstractSailImplConfig { @Override public void parse(Model graph, Resource implNode) throws SailConfigException { super.parse(graph, implNode); Optional<Literal> tablespaceValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.TABLE_NAME_PROPERTY); if (tablespaceValue.isPresent() && tablespaceValue.get().stringValue().length() > 0) { setTablespace(tablespaceValue.get().stringValue()); } else { Optional<Resource> delegate = Models.subject(graph.filter(null, SailConfigSchema.DELEGATE, implNode)); Optional<Resource> sailImpl = Models.subject(graph.filter(null, SailRepositorySchema.SAILIMPL, delegate.isPresent() ? delegate.get(): implNode)); if (sailImpl.isPresent()) { Optional<Resource> repoImpl = Models.subject(graph.filter(null, RepositoryConfigSchema.REPOSITORYIMPL, sailImpl.get())); if (repoImpl.isPresent()) { Optional<Literal> idValue = Models.objectLiteral(graph.filter(repoImpl.get(), RepositoryConfigSchema.REPOSITORYID, null)); if (idValue.isPresent()) { setTablespace(idValue.get().stringValue()); } } } } Optional<Literal> splitBitsValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.SPLITBITS_PROPERTY); if (splitBitsValue.isPresent()) try { setSplitBits(splitBitsValue.get().intValue()); } catch (NumberFormatException e) { throw new SailConfigException(e); } Optional<Literal> createValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.CREATE_TABLE_PROPERTY); if (createValue.isPresent()) try { setCreate(createValue.get().booleanValue()); } catch (IllegalArgumentException e) { throw new SailConfigException(e); } Optional<Literal> pushValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.PUSH_STRATEGY_PROPERTY); if (pushValue.isPresent()) try { setPush(pushValue.get().booleanValue()); } catch (IllegalArgumentException e) { throw new SailConfigException(e); } Optional<Literal> timeoutValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.EVALUATION_TIMEOUT_PROPERTY); if (timeoutValue.isPresent()) try { setEvaluationTimeout(timeoutValue.get().intValue()); } catch (NumberFormatException e) { throw new SailConfigException(e); } Optional<Literal> elasticIndexValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.ELASTIC_INDEX_URL_PROPERTY); if (elasticIndexValue.isPresent()) { setElasticIndexURL(elasticIndexValue.get().stringValue()); } } HBaseSailConfig(); void setTablespace(String tablespace); String getTablespace(); void setSplitBits(int splitBits); int getSplitBits(); boolean isCreate(); void setCreate(boolean create); boolean isPush(); void setPush(boolean push); int getEvaluationTimeout(); void setEvaluationTimeout(int evaluationTimeout); void setElasticIndexURL(String elasticIndexURL); String getElasticIndexURL(); @Override Resource export(Model graph); @Override void parse(Model graph, Resource implNode); }
HBaseSailConfig extends AbstractSailImplConfig { @Override public void parse(Model graph, Resource implNode) throws SailConfigException { super.parse(graph, implNode); Optional<Literal> tablespaceValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.TABLE_NAME_PROPERTY); if (tablespaceValue.isPresent() && tablespaceValue.get().stringValue().length() > 0) { setTablespace(tablespaceValue.get().stringValue()); } else { Optional<Resource> delegate = Models.subject(graph.filter(null, SailConfigSchema.DELEGATE, implNode)); Optional<Resource> sailImpl = Models.subject(graph.filter(null, SailRepositorySchema.SAILIMPL, delegate.isPresent() ? delegate.get(): implNode)); if (sailImpl.isPresent()) { Optional<Resource> repoImpl = Models.subject(graph.filter(null, RepositoryConfigSchema.REPOSITORYIMPL, sailImpl.get())); if (repoImpl.isPresent()) { Optional<Literal> idValue = Models.objectLiteral(graph.filter(repoImpl.get(), RepositoryConfigSchema.REPOSITORYID, null)); if (idValue.isPresent()) { setTablespace(idValue.get().stringValue()); } } } } Optional<Literal> splitBitsValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.SPLITBITS_PROPERTY); if (splitBitsValue.isPresent()) try { setSplitBits(splitBitsValue.get().intValue()); } catch (NumberFormatException e) { throw new SailConfigException(e); } Optional<Literal> createValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.CREATE_TABLE_PROPERTY); if (createValue.isPresent()) try { setCreate(createValue.get().booleanValue()); } catch (IllegalArgumentException e) { throw new SailConfigException(e); } Optional<Literal> pushValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.PUSH_STRATEGY_PROPERTY); if (pushValue.isPresent()) try { setPush(pushValue.get().booleanValue()); } catch (IllegalArgumentException e) { throw new SailConfigException(e); } Optional<Literal> timeoutValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.EVALUATION_TIMEOUT_PROPERTY); if (timeoutValue.isPresent()) try { setEvaluationTimeout(timeoutValue.get().intValue()); } catch (NumberFormatException e) { throw new SailConfigException(e); } Optional<Literal> elasticIndexValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.ELASTIC_INDEX_URL_PROPERTY); if (elasticIndexValue.isPresent()) { setElasticIndexURL(elasticIndexValue.get().stringValue()); } } HBaseSailConfig(); void setTablespace(String tablespace); String getTablespace(); void setSplitBits(int splitBits); int getSplitBits(); boolean isCreate(); void setCreate(boolean create); boolean isPush(); void setPush(boolean push); int getEvaluationTimeout(); void setEvaluationTimeout(int evaluationTimeout); void setElasticIndexURL(String elasticIndexURL); String getElasticIndexURL(); @Override Resource export(Model graph); @Override void parse(Model graph, Resource implNode);  }