public SpDataStream declareModel()

in streampipes-pipeline-elements-examples-processors-jvm/src/main/java/org/apache/streampipes/tutorial/VehicleStream.java [24:34]


  public SpDataStream declareModel() {
    return DataStreamBuilder.create("org.apache.streampipes.tutorial.vehicle.position", "Vehicle Position", "An event stream " +
            "that produces current vehicle positions")
        .property(EpProperties.timestampProperty("timestamp"))
        .property(EpProperties.stringEp(Labels.from("plate-number", "Plate Number", "Denotes the plate number of the vehicle"), "plateNumber", "http://my.company/plateNumber"))
        .property(EpProperties.doubleEp(Labels.from("latitude", "Latitude", "Denotes the latitude value of the vehicle's position"), "latitude", Geo.LAT))
        .property(EpProperties.doubleEp(Labels.from("longitude", "Longitude", "Denotes the longitude value of the vehicle's position"), "longitude", Geo.LNG))
        .format(Formats.jsonFormat())
        .protocol(Protocols.kafka("localhost", 9094, "org.apache.streampipes.tutoria.vehicle"))
        .build();
  }