public PipelineVerificationHandler storeConnection() { String fromId = rdfRootElement.getConnectedTo().get(rdfRootElement.getConnectedTo().size() - 1); NamedStreamPipesEntity sepaElement = TreeUtils.findSEPAElement(fromId, pipeline.getSepas(), pipeline.getStreams()); String sourceId; if (sepaElement instanceof SpDataStream) { sourceId = sepaElement.getElementId(); } else { sourceId = ((InvocableStreamPipesEntity) sepaElement).getBelongsTo(); } Connection connection = new Connection(sourceId, rdfRootElement.getBelongsTo()); StorageDispatcher.INSTANCE.getNoSqlStore().getConnectionStorageApi().addConnection(connection); return this; }
public PipelineElementRecommendationMessage findRecommendedElements() throws NoSuitableSepasAvailableException { String rootNodeElementId; try { rootNodeElementId = getRootNodeElementId(getRootNode()); Optional<SpDataStream> outputStream = getOutputStream(); outputStream.ifPresent(spDataStream -> validate(spDataStream, getAll())); } catch (Exception e) { e.printStackTrace(); return recommendationMessage; } if (recommendationMessage.getPossibleElements().size() == 0) { throw new NoSuitableSepasAvailableException(); } else { recommendationMessage .setRecommendedElements(calculateWeights( filterOldElements(getNoSqlStorage() .getConnectionStorageApi() .getRecommendedElements(rootNodeElementId)))); return recommendationMessage; } }
public PipelineElementRecommendationMessage findRecommendedElements() throws NoSuitableSepasAvailableException { String rootNodeElementId; try { rootNodeElementId = getRootNodeElementId(getRootNode()); Optional<SpDataStream> outputStream = getOutputStream(); outputStream.ifPresent(spDataStream -> validate(spDataStream, getAll())); } catch (Exception e) { e.printStackTrace(); return recommendationMessage; } if (recommendationMessage.getPossibleElements().size() == 0) { throw new NoSuitableSepasAvailableException(); } else { recommendationMessage .setRecommendedElements(calculateWeights( filterOldElements(getNoSqlStorage() .getConnectionStorageApi() .getRecommendedElements(rootNodeElementId)))); return recommendationMessage; } }
public PipelineVerificationHandler storeConnection() { String fromId = rdfRootElement.getConnectedTo().get(rdfRootElement.getConnectedTo().size() - 1); NamedStreamPipesEntity sepaElement = TreeUtils.findSEPAElement(fromId, pipeline.getSepas(), pipeline.getStreams()); String sourceId; if (sepaElement instanceof SpDataStream) { sourceId = sepaElement.getElementId(); } else { sourceId = ((InvocableStreamPipesEntity) sepaElement).getBelongsTo(); } Connection connection = new Connection(sourceId, rdfRootElement.getBelongsTo()); StorageDispatcher.INSTANCE.getNoSqlStore().getConnectionStorageApi().addConnection(connection); return this; }