sensiasoft / lib-ogc

Library for manipulating various data models and service models defined in OGC standards
Mozilla Public License 2.0
5 stars 3 forks source link

Create Data Component Builders #1

Open alexrobin opened 5 years ago

alexrobin commented 5 years ago

Since data components have many properties, providing constructors is cumbersome. The builder pattern would be more appropriate to create components in a single line, for example:

Quantity q = Factory.quantityBuilder()
    .label("Air Temperature")
    .description("Outdoor temperature under cover, measured 2m above ground")
    .definition("http://ontology/AirTemperature")
    .uomCode("Cel")
    .dataType(DataType.FLOAT);