/** * Adds a new {@link org.streampipes.model.staticproperty.MappingPropertyUnary} to the pipeline element definition * which is not linked to a specific input property. * @deprecated Use {@link #unaryMappingPropertyWithoutRequirement(Label)} instead. * Use this method if you want to present users a single-value selection of all available input * event properties. * @param label A human-readable label * @return this */ public BU unaryMappingPropertyWithoutRequirement(String internalName, String label, String description) { this.staticProperties.add(new MappingPropertyUnary(internalName, label, description)); return me(); }
/** * * @deprecated Use {@link #requiredStream(CollectedStreamRequirements)} instead */ @Deprecated public BU requiredPropertyStream2WithUnaryMapping(EventProperty propertyRequirement, String internalName, String label, String description) { this.stream2Properties.add(propertyRequirement); this.staticProperties.add(new MappingPropertyUnary(URI.create(propertyRequirement.getElementId()), internalName, label, description)); return me(); }
/** * * @deprecated Use {@link #requiredStream(CollectedStreamRequirements)} instead */ @Deprecated public BU requiredPropertyStream1WithUnaryMapping(EventProperty propertyRequirement, String internalName, String label, String description) { this.stream1Properties.add(propertyRequirement); this.staticProperties.add(new MappingPropertyUnary(URI.create(propertyRequirement.getElementId()), internalName, label, description)); return me(); }
public BU unaryMappingProperty(StreamIdentifier streamIdentifier, Integer propertyIndex, Label label) { EventProperty propertyRequirement; // TODO we need proper exception handling for the sdk if (streamIdentifier == StreamIdentifier.Stream0) { propertyRequirement = this.stream1Properties.get(propertyIndex); } else { propertyRequirement = this.stream2Properties.get(propertyIndex); } this.staticProperties.add(new MappingPropertyUnary(URI.create(propertyRequirement.getElementId()), label .getInternalId(), label.getLabel(), label.getDescription())); return me(); }
/** * Adds a new {@link org.streampipes.model.staticproperty.MappingPropertyUnary} to the pipeline element definition * which is not linked to a specific input property. * @deprecated * Use this method if you want to present users a single-value selection of all available input * event properties. * @param label * @return this */ public BU unaryMappingPropertyWithoutRequirement(Label label) { this.staticProperties.add(new MappingPropertyUnary(label.getInternalId(), label.getLabel(), label.getDescription())); return me(); }
/** * Set a new event property requirement linked to a unary mapping. * @deprecated Use {@link #requiredStream(CollectedStreamRequirements)} instead */ @Deprecated public BU requiredPropertyStream1WithUnaryMapping(EventProperty propertyRequirement, Label label, PropertyScope propertyScope) { this.stream1Properties.add(propertyRequirement); MappingPropertyUnary mp = new MappingPropertyUnary(URI.create(propertyRequirement.getElementId()), label.getInternalId(), label.getLabel(), label.getDescription()); mp.setPropertyScope(propertyScope.name()); this.staticProperties.add(mp); return me(); }
/** * Sets a new property requirement and, in addition, adds a * {@link org.streampipes.model.staticproperty.MappingPropertyUnary} static property to the pipeline element * definition. * @param propertyRequirement The property requirement. Use {@link org.streampipes.sdk.helpers.EpRequirements} to * create a new requirement. * @param label The {@link org.streampipes.sdk.helpers.Label} that defines the mapping property. * @param propertyScope The {@link org.streampipes.model.schema.PropertyScope} of the requirement. * @return this */ public StreamRequirementsBuilder requiredPropertyWithUnaryMapping(EventProperty propertyRequirement, Label label, PropertyScope propertyScope) { this.eventProperties.add(propertyRequirement); MappingPropertyUnary mp = new MappingPropertyUnary(URI.create(propertyRequirement.getElementId()), label .getInternalId(), label.getLabel(), label.getDescription()); mp.setPropertyScope(propertyScope.name()); this.mappingProperties.add(mp); return this; }
/** * Adds a new {@link org.streampipes.model.staticproperty.MappingPropertyUnary} to the pipeline element definition * which is not linked to a specific input property. * @deprecated * Use this method if you want to present users a single-value selection of all available input * event properties. * @param label A human-readable label that is displayed to users in the StreamPipes UI. * @param propertyScope Only input event properties that match the * {@link org.streampipes.model.schema.PropertyScope} are displayed. * @return this */ public BU unaryMappingPropertyWithoutRequirement(Label label, PropertyScope propertyScope) { MappingPropertyUnary mp = new MappingPropertyUnary(label.getInternalId(), label.getLabel(), label.getDescription()); mp.setPropertyScope(propertyScope.name()); this.staticProperties.add(mp); return me(); }
public StaticProperty staticProperty(StaticProperty o) { if (o instanceof FreeTextStaticProperty) { return new FreeTextStaticProperty((FreeTextStaticProperty) o); } else if (o instanceof OneOfStaticProperty) { return new OneOfStaticProperty((OneOfStaticProperty) o); } else if (o instanceof RemoteOneOfStaticProperty) { return new RemoteOneOfStaticProperty((RemoteOneOfStaticProperty) o); } else if (o instanceof MappingPropertyNary) { return new MappingPropertyNary((MappingPropertyNary) o); } else if (o instanceof DomainStaticProperty) { return new DomainStaticProperty((DomainStaticProperty) o); } else if (o instanceof AnyStaticProperty) { return new AnyStaticProperty((AnyStaticProperty) o); } else if (o instanceof CollectionStaticProperty) { return new CollectionStaticProperty((CollectionStaticProperty) o); } else if (o instanceof MatchingStaticProperty) { return new MatchingStaticProperty((MatchingStaticProperty) o); } else if (o instanceof RuntimeResolvableOneOfStaticProperty) { return new RuntimeResolvableOneOfStaticProperty((RuntimeResolvableOneOfStaticProperty) o); } else if (o instanceof RuntimeResolvableAnyStaticProperty) { return new RuntimeResolvableAnyStaticProperty((RuntimeResolvableAnyStaticProperty) o); } else { return new MappingPropertyUnary((MappingPropertyUnary) o); } }