[geotk] Migration from geotk 3.20 to Apache SIS

Martin Desruisseaux martin.desruisseaux at geomatys.com
Fri Feb 15 03:40:17 PST 2019


Le 15/02/2019 à 12:12, Christoph Steinforth a écrit :

> If I get this right
>
>     In particular there is nothing special about "simple features"
>     versus "complex features"; there is only "features".
>
> something like 
>
>     public class DefaultComplexType extends
>     DefaultAttributeType<AttributeType> implements ComplexType
>
> which is taken from geotk 3.20 is not present in SIS anymore?
>
Right. There is no more ComplexType in SIS. All attributes and features
can potentially be complex. "Simple features" in Geotk were features in
which all attributes are restricted to [1…1] multiplicity, while
"complex features" are everything else. SIS no longer define particular
classes or interfaces for those two cases. Given an AbstractFeature
instance, we can invoke getProperty(name). The result can be an instance
of AbstractAttribute, which provides two methods:

  * getValue() returning a single value and throwing
    IllegalStateException if the attribute contains more than one value.
  * getValues() returning a collection.

Alternatively, AbstractFeature.getPropertyValue(name) [1] can be used as
a shortcut. The return value will be the value directly if the
multiplicity declared in AttributeType is [0…0], [0…1] or [1…1], and a
collection otherwise.

    Martin

[1] http://sis.apache.org/apidocs/org/apache/sis/feature/AbstractFeature.html#getPropertyValue-java.lang.String-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20190215/987db5a5/attachment.html>


More information about the Geotoolkit mailing list