public CustomOutputStrategy(CustomOutputStrategy other) { super(other); this.eventProperties = new Cloner().properties(other.getEventProperties()); this.outputRight = other.isOutputRight(); }
private void updateOutputStrategy(SpDataStream stream, Integer count) { if (rdfRootElement instanceof DataProcessorInvocation) { ((DataProcessorInvocation) rdfRootElement) .getOutputStrategies() .stream() .filter(strategy -> strategy instanceof CustomOutputStrategy) .forEach(strategy -> { CustomOutputStrategy outputStrategy = (CustomOutputStrategy) strategy; if (count == 0) { outputStrategy.setProvidesProperties(new ArrayList<>()); } if (outputStrategy.isOutputRight() && count > 0) { outputStrategy.setProvidesProperties(stream.getEventSchema().getEventProperties()); } else { if (outputStrategy.getProvidesProperties() == null) { outputStrategy.setProvidesProperties(new ArrayList<>()); } outputStrategy.getProvidesProperties().addAll(stream.getEventSchema().getEventProperties()); } }); } }
private void updateOutputStrategy(SpDataStream stream, Integer count) { if (rdfRootElement instanceof DataProcessorInvocation) { ((DataProcessorInvocation) rdfRootElement) .getOutputStrategies() .stream() .filter(strategy -> strategy instanceof CustomOutputStrategy) .forEach(strategy -> { CustomOutputStrategy outputStrategy = (CustomOutputStrategy) strategy; if (count == 0) { outputStrategy.setProvidesProperties(new ArrayList<>()); } if (outputStrategy.isOutputRight() && count > 0) { outputStrategy.setProvidesProperties(stream.getEventSchema().getEventProperties()); } else { if (outputStrategy.getProvidesProperties() == null) { outputStrategy.setProvidesProperties(new ArrayList<>()); } outputStrategy.getProvidesProperties().addAll(stream.getEventSchema().getEventProperties()); } }); } }