public class PrimitivePropertyBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
PrimitivePropertyBuilder |
accuracy(Float accuracy,
URI measurementUnit) |
EventPropertyPrimitive |
build() |
static PrimitivePropertyBuilder |
create(Datatypes datatype,
String runtimeName)
A builder class helping to define advanced primitive properties.
|
PrimitivePropertyBuilder |
description(String description)
Assigns a human-readable description to the event property.
|
PrimitivePropertyBuilder |
domainProperty(String domainProperty)
Specifies the semantics of the property (e.g., whether a double value stands for a latitude coordinate).
|
PrimitivePropertyBuilder |
label(String label)
Assigns a human-readable label to the event property.
|
PrimitivePropertyBuilder |
measurementUnit(URI measurementUnit)
Defines the measurement unit (e.g., tons) of the event property.
|
PrimitivePropertyBuilder |
resolution(Float resolution,
URI measurementUnit) |
PrimitivePropertyBuilder |
scope(PropertyScope propertyScope)
Assigns a property scope to the event property.
|
PrimitivePropertyBuilder |
valueSpecification(Float min,
Float max,
Float step)
Defines the value range.
|
PrimitivePropertyBuilder |
valueSpecification(String label,
String description,
List<String> allowedValues)
Defines the value range in form of an enumeration.
|
public static PrimitivePropertyBuilder create(Datatypes datatype, String runtimeName)
EpProperties.datatype - The primitive Datatypes definition of the new property.runtimeName - The name of the property at runtime (e.g., the field name of the JSON primitive.public PrimitivePropertyBuilder domainProperty(String domainProperty)
domainProperty - The domain property as a String. The domain property should reflect an URI. Use some
existing vocabulary from org.streampipes.vocabulary or create your own.public PrimitivePropertyBuilder measurementUnit(URI measurementUnit)
measurementUnit - The measurement unit as a URI from a vocabulary (e.g., QUDT).public PrimitivePropertyBuilder valueSpecification(Float min, Float max, Float step)
min - The minimum value the property can have at runtime.max - The maximum value the property can have at runtime.step - The expected granularity the property has at runtime.public PrimitivePropertyBuilder valueSpecification(String label, String description, List<String> allowedValues)
label - A human-readable label describing this enumeration.description - A human-readable description of the enumeration.allowedValues - A list of allowed values of the event property at runtime.public PrimitivePropertyBuilder label(String label)
label - public PrimitivePropertyBuilder description(String description)
description - public PrimitivePropertyBuilder accuracy(Float accuracy, URI measurementUnit)
public PrimitivePropertyBuilder resolution(Float resolution, URI measurementUnit)
public PrimitivePropertyBuilder scope(PropertyScope propertyScope)
propertyScope - The PropertyScope.public EventPropertyPrimitive build()
Copyright © 2018. All rights reserved.