You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streampipes.apache.org by Florian Micklich <fl...@disy.net.INVALID> on 2020/05/12 10:08:13 UTC

different between using PrimitivePropertyBuilder and EpProperties in output strategy

Hi all,

I just created an output strategy and found two different ways to do so.

Either I use

.outputStrategy(

    OutputStrategies.append(

        PrimitivePropertyBuilder

            .create(Datatypes.String, "trajectory-wkt")

            .domainProperty("http://www.opengis.net/ont/geosparql#Geometry"<http://www.opengis.net/ont/geosparql#Geometry>)

            .build())

)


or





.outputStrategy(OutputStrategies.append(

    EpProperties.stringEp(

        Labels.withId(WKT),

        "trajectory-wkt",

        "http://www.opengis.net/ont/geosparql#Geometry"<http://www.opengis.net/ont/geosparql#Geometry>)

    )

)



What is the different between this 2 ways and which one should be preferred?

Greetings

Florian


Disy Informationssysteme GmbH
Florian Micklich
Lösungsentwickler
+49 721 16006 477,  florian.micklich@disy.net

Firmensitz: Ludwig-Erhard-Allee 6, 76131 Karlsruhe
Registergericht: Amtsgericht Mannheim, HRB 107964
Geschäftsführer: Claus Hofmann

Bitte beachten Sie folgende Informationen für Kunden, Lieferanten und Bewerber
- Datenschutz: www.disy.net/datenschutz
- Informationspflichten:  www.disy.net/informationspflichten


Re: different between using PrimitivePropertyBuilder and EpProperties in output strategy

Posted by Dominik Riemer <ri...@apache.org>.
Hi Florian,

in general, these are two different ways to achieve the same.
The builder provides more options to create non-mandatory properties (e.g., measurement units).
The EpProperties class contains convenience methods to describe event properties, so if you don't miss anything in this class, you can use this one. In case you need advanced settings that are not provided here, you can switch to the PrimitivePropertyBuilder.

Dominik

On 2020/05/12 10:08:13, Florian Micklich <fl...@disy.net.INVALID> wrote: 
> Hi all,
> 
> I just created an output strategy and found two different ways to do so.
> 
> Either I use
> 
> .outputStrategy(
> 
>     OutputStrategies.append(
> 
>         PrimitivePropertyBuilder
> 
>             .create(Datatypes.String, "trajectory-wkt")
> 
>             .domainProperty("http://www.opengis.net/ont/geosparql#Geometry"<http://www.opengis.net/ont/geosparql#Geometry>)
> 
>             .build())
> 
> )
> 
> 
> or
> 
> 
> 
> 
> 
> .outputStrategy(OutputStrategies.append(
> 
>     EpProperties.stringEp(
> 
>         Labels.withId(WKT),
> 
>         "trajectory-wkt",
> 
>         "http://www.opengis.net/ont/geosparql#Geometry"<http://www.opengis.net/ont/geosparql#Geometry>)
> 
>     )
> 
> )
> 
> 
> 
> What is the different between this 2 ways and which one should be preferred?
> 
> Greetings
> 
> Florian
> 
> 
> Disy Informationssysteme GmbH
> Florian Micklich
> Lösungsentwickler
> +49 721 16006 477,  florian.micklich@disy.net
> 
> Firmensitz: Ludwig-Erhard-Allee 6, 76131 Karlsruhe
> Registergericht: Amtsgericht Mannheim, HRB 107964
> Geschäftsführer: Claus Hofmann
> 
> Bitte beachten Sie folgende Informationen für Kunden, Lieferanten und Bewerber
> - Datenschutz: www.disy.net/datenschutz
> - Informationspflichten:  www.disy.net/informationspflichten
> 
>