<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">
      <p>Le 15/02/2019 à 12:12, Christoph Steinforth a écrit :</p>
    </div>
    <blockquote type="cite"
cite="mid:CANkBy=k+mtZvrDP-JZ0v97bnWXgrGZPZB-jzVUs0qjO9fRdcLw@mail.gmail.com">
      <p>
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
      </p>
      <div dir="ltr">
        <p>If I get this right</p>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <p>
              In particular there is nothing special about "simple
              features" versus "complex features"; there is only
              "features".
            </p>
          </div>
        </blockquote>
        <div>
          <p>something like  </p>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div class="gmail_quote">
            <p>public class DefaultComplexType extends
              DefaultAttributeType<AttributeType> implements
              ComplexType</p>
          </div>
        </blockquote>
        <div>
          <p>which is taken from geotk 3.20 is not present in SIS
            anymore?</p>
        </div>
      </div>
    </blockquote>
    <p>Right. There is no more <tt>ComplexType</tt> 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 <tt>AbstractFeature</tt>
      instance, we can invoke <tt>getProperty(name)</tt>. The result
      can be an instance of <tt>AbstractAttribute</tt>, which provides
      two methods:</p>
    <ul>
      <li><tt>getValue()</tt> returning a single value and throwing <tt>IllegalStateException</tt>
        if the attribute contains more than one value.</li>
      <li><tt>getValues()</tt> returning a collection.</li>
    </ul>
    <p>Alternatively, <tt>AbstractFeature.getPropertyValue(name)</tt>
      [1] can be used as a shortcut. The return value will be the value
      directly if the multiplicity declared in <tt>AttributeType</tt>
      is [0…0], [0…1] or [1…1], and a collection otherwise. <br>
    </p>
    <p>    Martin</p>
    <pre>[1] <a class="moz-txt-link-freetext" href="http://sis.apache.org/apidocs/org/apache/sis/feature/AbstractFeature.html#getPropertyValue-java.lang.String">http://sis.apache.org/apidocs/org/apache/sis/feature/AbstractFeature.html#getPropertyValue-java.lang.String</a>-

</pre>
  </body>
</html>