@Override public void validate() throws SailConfigException { super.validate(); }
/** * Create a new RepositoryConfigImpl. */ public AbstractSailImplConfig(String type) { this(); setType(type); }
@Override public Resource export(Model m) { Resource implNode = super.export(m); if (delegate != null) { Resource delegateNode = delegate.export(m); m.add(implNode, DELEGATE, delegateNode); } return implNode; }
@Override public void parse(Model m, Resource implNode) throws SailConfigException { super.parse(m, implNode); try { Models.objectResource(m.filter(implNode, DELEGATE, null)).ifPresent( delegate -> setDelegate(SailConfigUtil.parseRepositoryImpl(m, delegate))); } catch (ModelException e) { throw new SailConfigException(e.getMessage(), e); } } }
public void parse(Model m, Resource implNode) throws SailConfigException { try { Models.objectLiteral(m.filter(implNode, SAILTYPE, null)).ifPresent( lit -> setType(lit.getLabel())); Models.objectLiteral( m.filter(implNode, SailConfigSchema.ITERATION_CACHE_SYNC_THRESHOLD, null)).ifPresent( lit -> setIterationCacheSyncThreshold(lit.longValue())); Models.objectLiteral( m.filter(implNode, SailConfigSchema.CONNECTION_TIME_OUT, null)).ifPresent( lit -> setConnectionTimeOut(lit.longValue())); } catch (ModelException e) { throw new SailConfigException(e.getMessage(), e); } }
@Override public Resource export(Model m) { Resource implNode = super.export(m); if (delegate != null) { Resource delegateNode = delegate.export(m); m.add(implNode, DELEGATE, delegateNode); } return implNode; }
@Override public void parse(Model m, Resource implNode) throws SailConfigException { super.parse(m, implNode); try { Models.objectResource(m.filter(implNode, DELEGATE, null)).ifPresent( delegate -> setDelegate(SailConfigUtil.parseRepositoryImpl(m, delegate))); } catch (ModelException e) { throw new SailConfigException(e.getMessage(), e); } } }
public void parse(Model m, Resource implNode) throws SailConfigException { try { Models.objectLiteral(m.filter(implNode, SAILTYPE, null)).ifPresent( lit -> setType(lit.getLabel())); Models.objectLiteral( m.filter(implNode, SailConfigSchema.ITERATION_CACHE_SYNC_THRESHOLD, null)).ifPresent( lit -> setIterationCacheSyncThreshold(lit.longValue())); Models.objectLiteral( m.filter(implNode, SailConfigSchema.CONNECTION_TIME_OUT, null)).ifPresent( lit -> setConnectionTimeOut(lit.longValue())); } catch (ModelException e) { throw new SailConfigException(e.getMessage(), e); } }
@Override public Resource export(Model graph) { Resource implNode = super.export(graph); if (evalStratFactoryClassName != null) { graph.setNamespace("sb", NAMESPACE); graph.add(implNode, EVALUATION_STRATEGY_FACTORY, SimpleValueFactory.getInstance().createLiteral(evalStratFactoryClassName)); } return implNode; }
@Override public void parse(Model graph, Resource implNode) throws SailConfigException { super.parse(graph, implNode); try { Models.objectLiteral(graph.filter(implNode, EVALUATION_STRATEGY_FACTORY, null)).ifPresent( factoryClassName -> { setEvaluationStrategyFactoryClassName(factoryClassName.stringValue()); }); } catch (ModelException e) { throw new SailConfigException(e.getMessage(), e); } } }
@Override public void validate() throws SailConfigException { super.validate(); if (delegate == null) { throw new SailConfigException("No delegate specified for " + getType() + " Sail"); } delegate.validate(); }
/** * Create a new RepositoryConfigImpl. */ public AbstractSailImplConfig(String type) { this(); setType(type); }
@Override public Resource export(final Model model) { final Resource implNode = super.export(model); @SuppressWarnings("deprecation") final ValueFactory v = model.getValueFactory(); model.add(implNode, USER, v.createLiteral(user)); model.add(implNode, PASSWORD, v.createLiteral(password)); model.add(implNode, INSTANCE, v.createLiteral(instance)); model.add(implNode, ZOOKEEPERS, v.createLiteral(zookeepers)); model.add(implNode, IS_MOCK, v.createLiteral(isMock)); return implNode; }
super.parse(graph, implNode); Optional<Literal> tablespaceValue = backCompatibilityFilterObjectLiteral(graph, implNode, HALYARD.TABLE_NAME_PROPERTY); if (tablespaceValue.isPresent() && tablespaceValue.get().stringValue().length() > 0) {
@Override public void validate() throws SailConfigException { super.validate(); if (delegate == null) { throw new SailConfigException("No delegate specified for " + getType() + " Sail"); } delegate.validate(); }
/** * Stores configuration into the given Model * @param graph Model to store configuration into * @return Resource node with the configuration within the Model */ @Override public Resource export(Model graph) { Resource implNode = super.export(graph); ValueFactory vf = SimpleValueFactory.getInstance(); if (tablespace != null) graph.add(implNode, HALYARD.TABLE_NAME_PROPERTY, vf.createLiteral(tablespace)); graph.add(implNode, HALYARD.SPLITBITS_PROPERTY, vf.createLiteral(splitBits)); graph.add(implNode, HALYARD.CREATE_TABLE_PROPERTY, vf.createLiteral(create)); graph.add(implNode, HALYARD.PUSH_STRATEGY_PROPERTY, vf.createLiteral(push)); graph.add(implNode, HALYARD.EVALUATION_TIMEOUT_PROPERTY, vf.createLiteral(evaluationTimeout)); graph.add(implNode, HALYARD.ELASTIC_INDEX_URL_PROPERTY, vf.createLiteral(elasticIndexURL)); return implNode; }
@Override public void parse(final Model model, final Resource implNode) throws SailConfigException { super.parse(model, implNode); System.out.println("parsing");