| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 --> |
| <title>FeatureTypeBuilder (Apache SIS 1.4 API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2023-10-05"> |
| <meta name="description" content="declaration: module: org.apache.sis.feature, package: org.apache.sis.feature.builder, class: FeatureTypeBuilder"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.feature.builder.FeatureTypeBuilder class"> |
| <meta name="keywords" content="clear()"> |
| <meta name="keywords" content="setAll()"> |
| <meta name="keywords" content="isAbstract()"> |
| <meta name="keywords" content="setAbstract()"> |
| <meta name="keywords" content="getSuperTypes()"> |
| <meta name="keywords" content="setSuperTypes()"> |
| <meta name="keywords" content="getNameSpace()"> |
| <meta name="keywords" content="setNameSpace()"> |
| <meta name="keywords" content="setName()"> |
| <meta name="keywords" content="setDefaultMultiplicity()"> |
| <meta name="keywords" content="setIdentifierDelimiters()"> |
| <meta name="keywords" content="properties()"> |
| <meta name="keywords" content="isNameUsed()"> |
| <meta name="keywords" content="getProperty()"> |
| <meta name="keywords" content="addAttribute()"> |
| <meta name="keywords" content="addAssociation()"> |
| <meta name="keywords" content="addProperty()"> |
| <meta name="keywords" content="setDefinition()"> |
| <meta name="keywords" content="setDesignation()"> |
| <meta name="keywords" content="setDescription()"> |
| <meta name="keywords" content="setDeprecated()"> |
| <meta name="keywords" content="build()"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../sis.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../../script-dir/jquery-3.6.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var pathtoroot = "../../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span></button> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../../index.html">Overview</a></li> |
| <li><a href="../../../../../module-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| <ul class="sub-nav-list-small"> |
| <li> |
| <p>Summary:</p> |
| <ul> |
| <li>Nested</li> |
| <li>Field</li> |
| <li><a href="#constructor-summary">Constr</a></li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| </li> |
| <li> |
| <p>Detail:</p> |
| <ul> |
| <li>Field</li> |
| <li><a href="#constructor-detail">Constr</a></li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div id="navbar-sub-list"> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor-detail">Constr</a> | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><a href="../../../../../../search.html">SEARCH</a> |
| <input type="text" id="search-input" disabled placeholder="Search"> |
| <input type="reset" id="reset-button" disabled value="reset"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="module-label-in-type">Module</span> <a href="../../../../../module-summary.html">org.apache.sis.feature</a></div> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.sis.feature.builder</a></div> |
| <h1 title="Class FeatureTypeBuilder" class="title">Class FeatureTypeBuilder</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| <div class="inheritance"><a href="TypeBuilder.html" title="class in org.apache.sis.feature.builder">TypeBuilder</a> |
| <div class="inheritance">FeatureTypeBuilder</div> |
| </div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="../../../../../../org.apache.sis.util/org/apache/sis/util/Localized.html" title="interface in org.apache.sis.util">Localized</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">FeatureTypeBuilder</span> |
| <span class="extends-implements">extends <a href="TypeBuilder.html" title="class in org.apache.sis.feature.builder">TypeBuilder</a></span></div> |
| <div class="block">Helper class for the creation of <code>FeatureType</code> instances. |
| This builder can create the arguments to be given to the |
| <a href="../DefaultFeatureType.html#%3Cinit%3E(java.util.Map,boolean,org.apache.sis.feature.DefaultFeatureType%5B%5D,org.apache.sis.feature.AbstractIdentifiedType...)">feature type constructor</a> |
| from simpler parameters given to this builder. |
| The main methods provided in this class are: |
| |
| <ul> |
| <li>Various <a href="#setName(java.lang.CharSequence)"><code>setName(...)</code></a> methods for specifying the feature type name (mandatory).</li> |
| <li>Methods for optionally setting <a href="#setDesignation(java.lang.CharSequence)">designation</a>, <a href="#setDefinition(java.lang.CharSequence)">definition</a> or |
| <a href="#setDescription(java.lang.CharSequence)">description</a> texts, or the <a href="#setDeprecated(boolean)">deprecation status</a>.</li> |
| <li>Methods for optionally specifying the feature type hierarchy: its <a href="#setSuperTypes(org.apache.sis.feature.DefaultFeatureType...)">super types</a> |
| and whether the feature type is <a href="#setAbstract(boolean)">abstract</a>.</li> |
| <li>Convenience methods for setting the <a href="#setNameSpace(java.lang.CharSequence)">name space</a> and the |
| <a href="#setDefaultMultiplicity(int,int)">default multiplicity</a> of properties to be added to the feature type.</li> |
| <li>Methods for <a href="#addAttribute(java.lang.Class)">adding an attribute</a>, <a href="#addAssociation(org.apache.sis.feature.DefaultFeatureType)">an association</a> or <a href="#addProperty(org.apache.sis.feature.AbstractIdentifiedType)">an operation</a>.</li> |
| <li>Method for listing the previously added <a href="#properties()">properties</a>.</li> |
| <li>A <a href="#build()"><code>build()</code></a> method for creating the <code>FeatureType</code> instance from all previous information.</li> |
| </ul> |
| |
| The following example creates a city named "Utopia" by default: |
| |
| |
| <div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../../copy.svg" alt="Copy snippet"></button> |
| <pre class="snippet"><code class="language-java">FeatureTypeBuilder builder; |
| |
| // Create a feature type for a city, which contains a name and a population. |
| builder = new FeatureTypeBuilder() .setName("City"); |
| builder.addAttribute(String.class) .setName("name").setDefaultValue("Utopia"); |
| builder.addAttribute(Integer.class).setName("population"); |
| FeatureType city = builder.build(); |
| </code></pre> |
| </div> |
| |
| |
| A call to <code>System.out.println(city)</code> prints the following table: |
| |
| <pre class="text"> |
| City |
| ┌────────────┬─────────┬──────────────┬───────────────┐ |
| │ Name │ Type │ Multiplicity │ Default value │ |
| ├────────────┼─────────┼──────────────┼───────────────┤ |
| │ name │ String │ [1 … 1] │ Utopia │ |
| │ population │ Integer │ [1 … 1] │ │ |
| └────────────┴─────────┴──────────────┴───────────────┘</pre> |
| |
| <code>FeatureTypeBuilder</code> instances should be short lived. |
| After the <code>FeatureType</code> has been created, the builder should be discarded.</div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.8</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="../../../../../../org.apache.sis.referencing/org/apache/sis/parameter/ParameterBuilder.html" title="class in org.apache.sis.parameter"><code>ParameterBuilder</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table two-column-summary"> |
| <div class="table-header col-first">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">FeatureTypeBuilder</a>()</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Creates a new builder instance using the default name factory.</div> |
| </div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.sis.feature.DefaultFeatureType)" class="member-name-link">FeatureTypeBuilder</a><wbr>(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> template)</code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Creates a new builder instance using the given feature type as a template.</div> |
| </div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.opengis.util.NameFactory,org.apache.sis.setup.GeometryLibrary,java.util.Locale)" class="member-name-link">FeatureTypeBuilder</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/NameFactory.html" title="class or interface in org.opengis.util" class="external-link">NameFactory</a> factory, |
| <a href="../../../../../../org.apache.sis.util/org/apache/sis/setup/GeometryLibrary.html" title="enum class in org.apache.sis.setup">GeometryLibrary</a> library, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a> locale)</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Creates a new builder instance using the given name factory, geometry library |
| and locale for formatting error messages.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="AssociationRoleBuilder.html" title="class in org.apache.sis.feature.builder">AssociationRoleBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addAssociation(org.apache.sis.feature.DefaultAssociationRole)" class="member-name-link">addAssociation</a><wbr>(<a href="../DefaultAssociationRole.html" title="class in org.apache.sis.feature">DefaultAssociationRole</a> template)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Creates a new <code>FeatureAssociationRole</code> builder initialized to the same characteristics |
| than the given template.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="AssociationRoleBuilder.html" title="class in org.apache.sis.feature.builder">AssociationRoleBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addAssociation(org.apache.sis.feature.DefaultFeatureType)" class="member-name-link">addAssociation</a><wbr>(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> type)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Creates a new <code>FeatureAssociationRole</code> builder for features of the given type.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="AssociationRoleBuilder.html" title="class in org.apache.sis.feature.builder">AssociationRoleBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addAssociation(org.opengis.util.GenericName)" class="member-name-link">addAssociation</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/GenericName.html" title="class or interface in org.opengis.util" class="external-link">GenericName</a> type)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Creates a new <code>FeatureAssociationRole</code> builder for features of a type of the given name.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><V> <a href="AttributeTypeBuilder.html" title="class in org.apache.sis.feature.builder">AttributeTypeBuilder</a><wbr><V></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addAttribute(java.lang.Class)" class="member-name-link">addAttribute</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><V> valueClass)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Creates a new <code>AttributeType</code> builder for values of the given class.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><V> <a href="AttributeTypeBuilder.html" title="class in org.apache.sis.feature.builder">AttributeTypeBuilder</a><wbr><V></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addAttribute(org.apache.sis.feature.DefaultAttributeType)" class="member-name-link">addAttribute</a><wbr>(<a href="../DefaultAttributeType.html" title="class in org.apache.sis.feature">DefaultAttributeType</a><V> template)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Creates a new <code>AttributeType</code> builder initialized to the same characteristics than the given template.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="AttributeTypeBuilder.html" title="class in org.apache.sis.feature.builder">AttributeTypeBuilder</a><wbr><?></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addAttribute(org.opengis.metadata.acquisition.GeometryType)" class="member-name-link">addAttribute</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/acquisition/GeometryType.html" title="class or interface in org.opengis.metadata.acquisition" class="external-link">GeometryType</a> type)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Creates a new attribute for geometries of the given type.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="PropertyTypeBuilder.html" title="class in org.apache.sis.feature.builder">PropertyTypeBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addProperty(org.apache.sis.feature.AbstractIdentifiedType)" class="member-name-link">addProperty</a><wbr>(<a href="../AbstractIdentifiedType.html" title="class in org.apache.sis.feature">AbstractIdentifiedType</a> template)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds the given property in the feature type properties.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#build()" class="member-name-link">build</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Builds the feature type from the information and properties specified to this builder.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#clear()" class="member-name-link">clear</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Clears all setting in this builder.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getNameSpace()" class="member-name-link">getNameSpace</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the namespace of the names created by <code>setName(CharSequence...)</code> method calls.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="PropertyTypeBuilder.html" title="class in org.apache.sis.feature.builder">PropertyTypeBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getProperty(java.lang.String)" class="member-name-link">getProperty</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the builder for the property of the given name.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a>[]</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSuperTypes()" class="member-name-link">getSuperTypes</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the direct parents of the feature type to create.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isAbstract()" class="member-name-link">isAbstract</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns <code>true</code> if the feature type to create will act as an abstract super-type.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isNameUsed(java.lang.String)" class="member-name-link">isNameUsed</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns <code>true</code> if a property of the given name is defined or if the given name is ambiguous.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><wbr><<a href="PropertyTypeBuilder.html" title="class in org.apache.sis.feature.builder">PropertyTypeBuilder</a>></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#properties()" class="member-name-link">properties</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns a view of all attributes and associations added to the <code>FeatureType</code> to build.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setAbstract(boolean)" class="member-name-link">setAbstract</a><wbr>(boolean isAbstract)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets whether the feature type to create will be abstract.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setAll(org.apache.sis.feature.DefaultFeatureType)" class="member-name-link">setAll</a><wbr>(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> template)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets all properties of this builder to the values of the given feature type.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setDefaultMultiplicity(int,int)" class="member-name-link">setDefaultMultiplicity</a><wbr>(int minimumOccurs, |
| int maximumOccurs)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets the default minimum and maximum number of next attributes and associations to add.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setDefinition(java.lang.CharSequence)" class="member-name-link">setDefinition</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> definition)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets a concise definition of the element.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setDeprecated(boolean)" class="member-name-link">setDeprecated</a><wbr>(boolean deprecated)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets whether the type is deprecated.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setDescription(java.lang.CharSequence)" class="member-name-link">setDescription</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> description)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets optional information beyond that required for concise definition of the element.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setDesignation(java.lang.CharSequence)" class="member-name-link">setDesignation</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> designation)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets a natural language designator for the element.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setIdentifierDelimiters(java.lang.String,java.lang.String,java.lang.String)" class="member-name-link">setIdentifierDelimiters</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> delimiter, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> prefix, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> suffix)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets the prefix, suffix and delimiter to use when formatting a compound identifier made of two or more attributes.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setName(java.lang.CharSequence)" class="member-name-link">setName</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> localPart)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets the <code>FeatureType</code> name as a simple string.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setName(java.lang.CharSequence...)" class="member-name-link">setName</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a>... components)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets the <code>FeatureType</code> name as a string in the given scope.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setName(org.opengis.util.GenericName)" class="member-name-link">setName</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/GenericName.html" title="class or interface in org.opengis.util" class="external-link">GenericName</a> name)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets the <code>FeatureType</code> name as a generic name.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setNameSpace(java.lang.CharSequence)" class="member-name-link">setNameSpace</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> ns)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets the namespace of the next names to be created by <code>setName(CharSequence...)</code> method calls.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setSuperTypes(org.apache.sis.feature.DefaultFeatureType...)" class="member-name-link">setSuperTypes</a><wbr>(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a>... parents)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets the parent types (or super-type) from which to inherit properties.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-TypeBuilder">Methods inherited from class <a href="TypeBuilder.html" title="class in org.apache.sis.feature.builder">TypeBuilder</a></h3> |
| <code><a href="TypeBuilder.html#getDefinition()">getDefinition</a>, <a href="TypeBuilder.html#getDescription()">getDescription</a>, <a href="TypeBuilder.html#getDesignation()">getDesignation</a>, <a href="TypeBuilder.html#getLocale()">getLocale</a>, <a href="TypeBuilder.html#getName()">getName</a>, <a href="TypeBuilder.html#isDeprecated()">isDeprecated</a>, <a href="TypeBuilder.html#toString()">toString</a></code></div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-Object">Methods inherited from class <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>FeatureTypeBuilder</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">FeatureTypeBuilder</span>()</div> |
| <div class="block">Creates a new builder instance using the default name factory.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(org.apache.sis.feature.DefaultFeatureType)"> |
| <h3>FeatureTypeBuilder</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">FeatureTypeBuilder</span><wbr><span class="parameters">(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> template)</span></div> |
| <div class="block">Creates a new builder instance using the given feature type as a template. |
| This constructor initializes the list of <a href="#properties()">properties</a>, the |
| <a href="#getSuperTypes()">super types</a> and <a href="#isAbstract()"><code>isAbstract</code></a> flag |
| to values inferred from the given template. The properties list will contain properties |
| declared explicitly in the given template, not including properties inherited from super types. |
| |
| <div class="warning"><b>Warning:</b> |
| The <code>template</code> argument type will be changed to <code>FeatureType</code> if and when such interface |
| will be defined in GeoAPI.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>template</code> - an existing feature type to use as a template, or <code>null</code> if none.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(org.opengis.util.NameFactory,org.apache.sis.setup.GeometryLibrary,java.util.Locale)"> |
| <h3>FeatureTypeBuilder</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">FeatureTypeBuilder</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/NameFactory.html" title="class or interface in org.opengis.util" class="external-link">NameFactory</a> factory, |
| <a href="../../../../../../org.apache.sis.util/org/apache/sis/setup/GeometryLibrary.html" title="enum class in org.apache.sis.setup">GeometryLibrary</a> library, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a> locale)</span></div> |
| <div class="block">Creates a new builder instance using the given name factory, geometry library |
| and locale for formatting error messages.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>factory</code> - the factory to use for creating names, or <code>null</code> for the default factory.</dd> |
| <dd><code>library</code> - the library to use for creating geometric objects, or <code>null</code> for the default.</dd> |
| <dd><code>locale</code> - the locale to use for formatting error messages, or <code>null</code> for the default locale.</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="clear()"> |
| <h3>clear</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">clear</span>()</div> |
| <div class="block">Clears all setting in this builder. After invoking this method, this <code>FeatureTypeBuilder</code> |
| is in same state that after it has been constructed. This method can be invoked for reusing the |
| same builder for creating other <code>FeatureType</code> instances after <a href="#build()"><code>build()</code></a> invocation.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setAll(org.apache.sis.feature.DefaultFeatureType)"> |
| <h3>setAll</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">setAll</span><wbr><span class="parameters">(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> template)</span></div> |
| <div class="block">Sets all properties of this builder to the values of the given feature type. |
| This builder is <a href="#clear()">cleared</a> before the properties of the given type are copied. |
| The copy is performed as documented in the <a href="#%3Cinit%3E(org.apache.sis.feature.DefaultFeatureType)">constructor</a>. |
| |
| <div class="warning"><b>Warning:</b> |
| The <code>template</code> argument type will be changed to <code>FeatureType</code> if and when such interface |
| will be defined in GeoAPI.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>template</code> - an existing feature type to use as a template, or <code>null</code> if none.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isAbstract()"> |
| <h3>isAbstract</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">isAbstract</span>()</div> |
| <div class="block">Returns <code>true</code> if the feature type to create will act as an abstract super-type. |
| Abstract types cannot be <a href="../DefaultFeatureType.html#newInstance()">instantiated</a>.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if the feature type to create will act as an abstract super-type.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="../DefaultFeatureType.html#isAbstract()"><code>DefaultFeatureType.isAbstract()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setAbstract(boolean)"> |
| <h3>setAbstract</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">setAbstract</span><wbr><span class="parameters">(boolean isAbstract)</span></div> |
| <div class="block">Sets whether the feature type to create will be abstract. |
| If this method is not invoked, then the default value is <code>false</code>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>isAbstract</code> - whether the feature type will be abstract.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getSuperTypes()"> |
| <h3>getSuperTypes</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a>[]</span> <span class="element-name">getSuperTypes</span>()</div> |
| <div class="block">Returns the direct parents of the feature type to create. |
| |
| <div class="warning"><b>Warning:</b> |
| The return type will be changed to <code>FeatureType[]</code> if and when such interface |
| will be defined in GeoAPI.</div></div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the parents of the feature type to create, or an empty array if none.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="../DefaultFeatureType.html#getSuperTypes()"><code>DefaultFeatureType.getSuperTypes()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setSuperTypes(org.apache.sis.feature.DefaultFeatureType...)"> |
| <h3>setSuperTypes</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">setSuperTypes</span><wbr><span class="parameters">(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a>... parents)</span></div> |
| <div class="block">Sets the parent types (or super-type) from which to inherit properties. |
| If this method is not invoked, then the default value is no parent. |
| |
| <div class="warning"><b>Warning:</b> |
| The <code>parents</code> argument type will be changed to <code>FeatureType...</code> if and when such interface |
| will be defined in GeoAPI.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>parents</code> - the parent types from which to inherit properties, or an empty array if none. |
| Null elements are ignored.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getNameSpace()"> |
| <h3>getNameSpace</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a></span> <span class="element-name">getNameSpace</span>()</div> |
| <div class="block">Returns the namespace of the names created by <code>setName(CharSequence...)</code> method calls. |
| A <code>null</code> value means that the names are in the |
| <a href="../../../../../../org.apache.sis.metadata/org/apache/sis/util/iso/DefaultNameSpace.html#isGlobal()">global namespace</a>.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the namespace to use when <a href="#setName(java.lang.CharSequence)"><code>setName(CharSequence)</code></a> is invoked, or <code>null</code> if none.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setNameSpace(java.lang.CharSequence)"> |
| <h3>setNameSpace</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">setNameSpace</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> ns)</span></div> |
| <div class="block">Sets the namespace of the next names to be created by <code>setName(CharSequence...)</code> method calls. |
| This method applies only to the next calls to <a href="#setName(java.lang.CharSequence)"><code>setName(CharSequence)</code></a> or |
| <a href="#setName(java.lang.CharSequence...)"><code>setName(CharSequence...)</code></a> methods; the result of all previous calls stay unmodified. |
| Example: |
| |
| |
| <div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../../copy.svg" alt="Copy snippet"></button> |
| <pre class="snippet"><code class="language-java">FeatureTypeBuilder builder = new FeatureTypeBuilder().setNameSpace("MyNameSpace").setName("City"); |
| FeatureType city = builder.build(); |
| |
| System.out.println(city.getName()); // Prints "City" |
| System.out.println(city.getName().toFullyQualifiedName()); // Prints "MyNameSpace:City" |
| </code></pre> |
| </div> |
| |
| |
| There is different conventions about the use of name spaces. ISO 19109 suggests that the namespace of all |
| <code>AttributeType</code> names is the name of the enclosing <code>FeatureType</code>, but this is not mandatory. |
| Users who want to apply this convention can invoke <code>setNameSpace(featureName)</code> after |
| <code><a href="#setName(java.lang.CharSequence)">FeatureTypeBuilder.setName</a>(featureName)</code> but before |
| <code><a href="AttributeTypeBuilder.html#setName(java.lang.CharSequence)">AttributeTypeBuilder.setName</a>(attributeName)</code>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>ns</code> - the new namespace, or <code>null</code> if none.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setName(org.opengis.util.GenericName)"> |
| <h3>setName</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">setName</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/GenericName.html" title="class or interface in org.opengis.util" class="external-link">GenericName</a> name)</span></div> |
| <div class="block">Sets the <code>FeatureType</code> name as a generic name. |
| If another name was defined before this method call, that previous value will be discarded. |
| |
| <h4 id="note-for-subclasses-heading">Note for subclasses</h4> |
| All <code>setName(…)</code> convenience methods in this builder delegate to this method. |
| Consequently, this method can be used as a central place where to control the creation of all names.</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="TypeBuilder.html#setName(org.opengis.util.GenericName)">setName</a></code> in class <code><a href="TypeBuilder.html" title="class in org.apache.sis.feature.builder">TypeBuilder</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - the generic name (cannot be <code>null</code>).</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="TypeBuilder.html#getName()"><code>TypeBuilder.getName()</code></a></li> |
| <li><a href="TypeBuilder.html#setName(java.lang.CharSequence)"><code>TypeBuilder.setName(CharSequence)</code></a></li> |
| <li><a href="../AbstractIdentifiedType.html#NAME_KEY"><code>AbstractIdentifiedType.NAME_KEY</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setName(java.lang.CharSequence)"> |
| <h3>setName</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">setName</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> localPart)</span></div> |
| <div class="block">Sets the <code>FeatureType</code> name as a simple string. |
| The namespace will be the value specified by the last call to <a href="#setNameSpace(java.lang.CharSequence)"><code>setNameSpace(CharSequence)</code></a>, |
| but that namespace will not be visible in the <a href="../../../../../../org.apache.sis.metadata/org/apache/sis/util/iso/DefaultLocalName.html#toString()">string representation</a> unless the <a href="../../../../../../org.apache.sis.metadata/org/apache/sis/util/iso/AbstractName.html#toFullyQualifiedName()">fully qualified name</a> is requested. |
| |
| <p>This convenience method creates a <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/LocalName.html" title="class or interface in org.opengis.util" class="external-link"><code>LocalName</code></a> instance from |
| the given <code>CharSequence</code>, then delegates to <a href="#setName(org.opengis.util.GenericName)"><code>setName(GenericName)</code></a>.</p></div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="TypeBuilder.html#setName(java.lang.CharSequence)">setName</a></code> in class <code><a href="TypeBuilder.html" title="class in org.apache.sis.feature.builder">TypeBuilder</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>localPart</code> - the local part of the generic name as a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a> or <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link"><code>InternationalString</code></a>.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="TypeBuilder.html#getName()"><code>TypeBuilder.getName()</code></a></li> |
| <li><a href="TypeBuilder.html#setName(java.lang.CharSequence...)"><code>TypeBuilder.setName(CharSequence...)</code></a></li> |
| <li><a href="#getNameSpace()"><code>getNameSpace()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setName(java.lang.CharSequence...)"> |
| <h3>setName</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">setName</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a>... components)</span></div> |
| <div class="block">Sets the <code>FeatureType</code> name as a string in the given scope. |
| The <code>components</code> array must contain at least one element. |
| In addition to the path specified by the <code>components</code> array, the name may also contain |
| a namespace specified by the last call to <a href="#setNameSpace(java.lang.CharSequence)"><code>setNameSpace(CharSequence)</code></a>. |
| But contrarily to the specified components, the namespace will not be visible in the name |
| <a href="../../../../../../org.apache.sis.metadata/org/apache/sis/util/iso/AbstractName.html#toString()">string representation</a> unless the |
| <a href="../../../../../../org.apache.sis.metadata/org/apache/sis/util/iso/AbstractName.html#toFullyQualifiedName()">fully qualified name</a> is requested. |
| |
| <p>This convenience method creates a <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/LocalName.html" title="class or interface in org.opengis.util" class="external-link"><code>LocalName</code></a> or <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/ScopedName.html" title="class or interface in org.opengis.util" class="external-link"><code>ScopedName</code></a> |
| instance depending on whether the <code>names</code> array contains exactly 1 element or more than 1 element, then |
| delegates to <a href="#setName(org.opengis.util.GenericName)"><code>setName(GenericName)</code></a>.</p></div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="TypeBuilder.html#setName(java.lang.CharSequence...)">setName</a></code> in class <code><a href="TypeBuilder.html" title="class in org.apache.sis.feature.builder">TypeBuilder</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>components</code> - the name components as an array of <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a> or <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link"><code>InternationalString</code></a> instances.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="TypeBuilder.html#getName()"><code>TypeBuilder.getName()</code></a></li> |
| <li><a href="TypeBuilder.html#setName(java.lang.CharSequence)"><code>TypeBuilder.setName(CharSequence)</code></a></li> |
| <li><a href="#getNameSpace()"><code>getNameSpace()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setDefaultMultiplicity(int,int)"> |
| <h3>setDefaultMultiplicity</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">setDefaultMultiplicity</span><wbr><span class="parameters">(int minimumOccurs, |
| int maximumOccurs)</span></div> |
| <div class="block">Sets the default minimum and maximum number of next attributes and associations to add. |
| Those defaults will applied to newly created attributes or associations, |
| for example in next calls to <a href="#addAttribute(java.lang.Class)"><code>addAttribute(Class)</code></a>. |
| Attributes and associations added before this method call are not modified. |
| |
| <p>If this method is not invoked, then the default multiplicity is [1 … 1].</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>minimumOccurs</code> - new default minimum number of property values.</dd> |
| <dd><code>maximumOccurs</code> - new default maximum number of property values.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt>Since:</dt> |
| <dd>1.0</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="PropertyTypeBuilder.html#setMinimumOccurs(int)"><code>PropertyTypeBuilder.setMinimumOccurs(int)</code></a></li> |
| <li><a href="PropertyTypeBuilder.html#setMaximumOccurs(int)"><code>PropertyTypeBuilder.setMaximumOccurs(int)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setIdentifierDelimiters(java.lang.String,java.lang.String,java.lang.String)"> |
| <h3>setIdentifierDelimiters</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">setIdentifierDelimiters</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> delimiter, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> prefix, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> suffix)</span></div> |
| <div class="block">Sets the prefix, suffix and delimiter to use when formatting a compound identifier made of two or more attributes. |
| The delimiter will be used only if at least two attributes have the <a href="AttributeRole.html#IDENTIFIER_COMPONENT">identifier component role</a>. |
| |
| <p>If this method is not invoked, then the default values are the <code>":"</code> delimiter and no prefix or suffix.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>delimiter</code> - the characters to use as delimiter between each single property value.</dd> |
| <dd><code>prefix</code> - characters to use at the beginning of the concatenated string, or <code>null</code> if none.</dd> |
| <dd><code>suffix</code> - characters to use at the end of the concatenated string, or <code>null</code> if none.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="AttributeRole.html#IDENTIFIER_COMPONENT"><code>AttributeRole.IDENTIFIER_COMPONENT</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="properties()"> |
| <h3>properties</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="PropertyTypeBuilder.html" title="class in org.apache.sis.feature.builder">PropertyTypeBuilder</a>></span> <span class="element-name">properties</span>()</div> |
| <div class="block">Returns a view of all attributes and associations added to the <code>FeatureType</code> to build. |
| This list contains only properties declared explicitly to this builder; |
| it does not include properties inherited from <a href="#getSuperTypes()">super-types</a>. |
| The returned list is <em>live</em>: changes in this builder are reflected in that list and conversely. |
| However, the returned list allows only <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html#remove(java.lang.Object)" title="class or interface in java.util" class="external-link">remove</a> operations; |
| new attributes or associations can be added only by calls to one of the <code>addAttribute(…)</code> |
| or <code>addAssociation(…)</code> methods. Removal operations never affect the super-types.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>a live list over the properties declared to this builder.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="#getProperty(java.lang.String)"><code>getProperty(String)</code></a></li> |
| <li><a href="#addAttribute(java.lang.Class)"><code>addAttribute(Class)</code></a></li> |
| <li><a href="#addAttribute(org.apache.sis.feature.DefaultAttributeType)"><code>addAttribute(DefaultAttributeType)</code></a></li> |
| <li><a href="#addAssociation(org.apache.sis.feature.DefaultFeatureType)"><code>addAssociation(DefaultFeatureType)</code></a></li> |
| <li><a href="#addAssociation(org.opengis.util.GenericName)"><code>addAssociation(GenericName)</code></a></li> |
| <li><a href="#addAssociation(org.apache.sis.feature.DefaultAssociationRole)"><code>addAssociation(DefaultAssociationRole)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isNameUsed(java.lang.String)"> |
| <h3>isNameUsed</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">isNameUsed</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name)</span></div> |
| <div class="block">Returns <code>true</code> if a property of the given name is defined or if the given name is ambiguous. |
| Invoking this method is equivalent to testing if <code>getProperty(name) != null</code> except that this |
| method does not throw exception if the given name is ambiguous.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - the name to test.</dd> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if the given name is used by another property or is ambiguous.</dd> |
| <dt>Since:</dt> |
| <dd>1.0</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getProperty(java.lang.String)"> |
| <h3>getProperty</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="PropertyTypeBuilder.html" title="class in org.apache.sis.feature.builder">PropertyTypeBuilder</a></span> <span class="element-name">getProperty</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name)</span></div> |
| <div class="block">Returns the builder for the property of the given name. The given name does not need to contains all elements |
| of a <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/ScopedName.html" title="class or interface in org.opengis.util" class="external-link"><code>ScopedName</code></a>; it is okay to specify only the tip (for example <code>"myName"</code> |
| instead of <code>"myScope:myName"</code>) provided that ignoring the name head does not create ambiguity.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - name of the property to search.</dd> |
| <dt>Returns:</dt> |
| <dd>property of the given name, or <code>null</code> if none.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if the given name is ambiguous.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addAttribute(java.lang.Class)"> |
| <h3>addAttribute</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><V></span> <span class="return-type"><a href="AttributeTypeBuilder.html" title="class in org.apache.sis.feature.builder">AttributeTypeBuilder</a><V></span> <span class="element-name">addAttribute</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><V> valueClass)</span></div> |
| <div class="block">Creates a new <code>AttributeType</code> builder for values of the given class. |
| The default attribute name is the name of the given type, but callers should invoke one |
| of the <code>AttributeTypeBuilder.setName(…)</code> methods on the returned instance with a better name. |
| |
| <h4 id="usage-example-heading">Usage example</h4> |
| |
| <div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../../copy.svg" alt="Copy snippet"></button> |
| <pre class="snippet"><code class="language-java">builder.addAttribute(String.class).setName("City").setDefaultValue("Metropolis"); |
| </code></pre> |
| </div> |
| |
| |
| The value class cannot be <code>Feature.class</code> since features shall be handled |
| as <a href="#addAssociation(org.apache.sis.feature.DefaultFeatureType)">associations</a> instead of attributes.</div> |
| <dl class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>V</code> - the compile-time value of <code>valueClass</code> argument.</dd> |
| <dt>Parameters:</dt> |
| <dd><code>valueClass</code> - the class of attribute values (cannot be <code>Feature.class</code>).</dd> |
| <dt>Returns:</dt> |
| <dd>a builder for an <code>AttributeType</code>.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="#properties()"><code>properties()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addAttribute(org.apache.sis.feature.DefaultAttributeType)"> |
| <h3>addAttribute</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><V></span> <span class="return-type"><a href="AttributeTypeBuilder.html" title="class in org.apache.sis.feature.builder">AttributeTypeBuilder</a><V></span> <span class="element-name">addAttribute</span><wbr><span class="parameters">(<a href="../DefaultAttributeType.html" title="class in org.apache.sis.feature">DefaultAttributeType</a><V> template)</span></div> |
| <div class="block">Creates a new <code>AttributeType</code> builder initialized to the same characteristics than the given template. |
| If the new attribute duplicates an existing one (for example if the same template is used many times), |
| caller should use the returned builder for modifying some attributes. |
| |
| <div class="warning"><b>Warning:</b> |
| The <code>template</code> argument type will be changed to <code>AttributeType</code> if and when such interface |
| will be defined in GeoAPI.</div></div> |
| <dl class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>V</code> - the compile-time type of values in the <code>template</code> argument.</dd> |
| <dt>Parameters:</dt> |
| <dd><code>template</code> - an existing attribute type to use as a template.</dd> |
| <dt>Returns:</dt> |
| <dd>a builder for an <code>AttributeType</code>, initialized with the values of the given template.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="#properties()"><code>properties()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addAttribute(org.opengis.metadata.acquisition.GeometryType)"> |
| <h3>addAttribute</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="AttributeTypeBuilder.html" title="class in org.apache.sis.feature.builder">AttributeTypeBuilder</a><?></span> <span class="element-name">addAttribute</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/acquisition/GeometryType.html" title="class or interface in org.opengis.metadata.acquisition" class="external-link">GeometryType</a> type)</span></div> |
| <div class="block">Creates a new attribute for geometries of the given type. This method delegates to <a href="#addAttribute(java.lang.Class)"><code>addAttribute(Class)</code></a> |
| with a <code>valueClass</code> argument inferred from the combination of the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/acquisition/GeometryType.html" title="class or interface in org.opengis.metadata.acquisition" class="external-link"><code>GeometryType</code></a> argument given to |
| this method with the <a href="../../../../../../org.apache.sis.util/org/apache/sis/setup/GeometryLibrary.html" title="enum class in org.apache.sis.setup"><code>GeometryLibrary</code></a> argument given at <a href="#%3Cinit%3E(org.opengis.util.NameFactory,org.apache.sis.setup.GeometryLibrary,java.util.Locale)">builder creation time</a>. |
| The geometry type can be: |
| |
| <ul> |
| <li><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/acquisition/GeometryType.html#POINT" title="class or interface in org.opengis.metadata.acquisition" class="external-link"><code>GeometryType.POINT</code></a> for <code>Point</code> or <code>Point2D</code> type.</li> |
| <li><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/acquisition/GeometryType.html#LINEAR" title="class or interface in org.opengis.metadata.acquisition" class="external-link"><code>GeometryType.LINEAR</code></a> for <code>Polyline</code> or <code>LineString</code> type.</li> |
| <li><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/acquisition/GeometryType.html#AREAL" title="class or interface in org.opengis.metadata.acquisition" class="external-link"><code>GeometryType.AREAL</code></a> for <code>Polygon</code> type.</li> |
| </ul> |
| |
| Geometric objects outside the above list can still be used by declaring their type explicitly. |
| However, in this case there is no isolation level between the geometry types and the library that implement them. |
| |
| <h4 id="example-heading">Example</h4> |
| The following code creates an attribute named "MyPoint" with values of class |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/java/awt/geom/Point2D.html" title="class or interface in java.awt.geom" class="external-link"><code>Point2D</code></a> if the library in use is <a href="../../../../../../org.apache.sis.util/org/apache/sis/setup/GeometryLibrary.html#JAVA2D">Java2D</a>. |
| The Coordinate Reference System (CRS) uses (<var>longitude</var>, <var>latitude</var>) axes on the WGS 84 datum. |
| Finally that new attribute is declared the feature <em>default</em> geometry: |
| |
| |
| <div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../../copy.svg" alt="Copy snippet"></button> |
| <pre class="snippet"><code class="language-java">builder.addAttribute(GeometryType.POINT).setName("MyPoint") |
| .setCRS(CommonCRS.WGS84.normalizedGeographic()) |
| .addRole(AttributeRole.DEFAULT_GEOMETRY); |
| </code></pre> |
| </div> |
| |
| |
| If the library in use is JTS or ESRI instead of Java2D, |
| then the <code>Point</code> class of those libraries will be used instead of <code>Point2D</code>. |
| The fully-qualified class names are given in the <a href="../../../../../../org.apache.sis.util/org/apache/sis/setup/GeometryLibrary.html" title="enum class in org.apache.sis.setup"><code>GeometryLibrary</code></a> javadoc.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - kind of geometric object (point, polyline or polygon).</dd> |
| <dt>Returns:</dt> |
| <dd>a builder for an <code>AttributeType</code>.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addAssociation(org.apache.sis.feature.DefaultFeatureType)"> |
| <h3>addAssociation</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="AssociationRoleBuilder.html" title="class in org.apache.sis.feature.builder">AssociationRoleBuilder</a></span> <span class="element-name">addAssociation</span><wbr><span class="parameters">(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> type)</span></div> |
| <div class="block">Creates a new <code>FeatureAssociationRole</code> builder for features of the given type. |
| The default association name is the name of the given type, but callers should invoke one |
| of the <code>AssociationRoleBuilder.setName(…)</code> methods on the returned instance with a better name. |
| |
| <div class="warning"><b>Warning:</b> |
| The <code>type</code> argument type will be changed to <code>FeatureType</code> if and when such interface |
| will be defined in GeoAPI.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the type of feature values.</dd> |
| <dt>Returns:</dt> |
| <dd>a builder for a <code>FeatureAssociationRole</code>.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="#properties()"><code>properties()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addAssociation(org.opengis.util.GenericName)"> |
| <h3>addAssociation</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="AssociationRoleBuilder.html" title="class in org.apache.sis.feature.builder">AssociationRoleBuilder</a></span> <span class="element-name">addAssociation</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/GenericName.html" title="class or interface in org.opengis.util" class="external-link">GenericName</a> type)</span></div> |
| <div class="block">Creates a new <code>FeatureAssociationRole</code> builder for features of a type of the given name. |
| This method can be invoked as an alternative to <code>addAssociation(FeatureType)</code> when the |
| <code>FeatureType</code> instance is not yet available because of cyclic dependency.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the name of the type of feature values.</dd> |
| <dt>Returns:</dt> |
| <dd>a builder for a <code>FeatureAssociationRole</code>.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="#properties()"><code>properties()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addAssociation(org.apache.sis.feature.DefaultAssociationRole)"> |
| <h3>addAssociation</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="AssociationRoleBuilder.html" title="class in org.apache.sis.feature.builder">AssociationRoleBuilder</a></span> <span class="element-name">addAssociation</span><wbr><span class="parameters">(<a href="../DefaultAssociationRole.html" title="class in org.apache.sis.feature">DefaultAssociationRole</a> template)</span></div> |
| <div class="block">Creates a new <code>FeatureAssociationRole</code> builder initialized to the same characteristics |
| than the given template. If the new association duplicates an existing one (for example if the |
| same template is used many times), caller should use the returned builder for modifying some |
| associations. |
| |
| <div class="warning"><b>Warning:</b> |
| The <code>template</code> argument type will be changed to <code>FeatureAssociationRole</code> if and when such interface |
| will be defined in GeoAPI.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>template</code> - an existing feature association to use as a template.</dd> |
| <dt>Returns:</dt> |
| <dd>a builder for an <code>FeatureAssociationRole</code>, initialized with the values of the given template.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="#properties()"><code>properties()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addProperty(org.apache.sis.feature.AbstractIdentifiedType)"> |
| <h3>addProperty</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="PropertyTypeBuilder.html" title="class in org.apache.sis.feature.builder">PropertyTypeBuilder</a></span> <span class="element-name">addProperty</span><wbr><span class="parameters">(<a href="../AbstractIdentifiedType.html" title="class in org.apache.sis.feature">AbstractIdentifiedType</a> template)</span></div> |
| <div class="block">Adds the given property in the feature type properties. |
| The given property shall be an instance of one of the following types: |
| |
| <ul> |
| <li><code>AttributeType</code>, in which case this method delegate to <code>addAttribute(AttributeType)</code>.</li> |
| <li><code>FeatureAssociationRole</code>, in which case this method delegate to <code>addAssociation(FeatureAssociationRole)</code>.</li> |
| <li><code>Operation</code>, in which case the given operation object will be added verbatim in the <code>FeatureType</code>; |
| this builder does not create new operations.</li> |
| </ul> |
| |
| This method does not verify if the given property duplicates an existing property. |
| If the same template is used many times, then the caller should use the returned builder |
| for modifying some properties. |
| |
| <div class="warning"><b>Warning:</b> In a future SIS version, the argument type may be changed to the |
| <code>org.opengis.feature.PropertyType</code> interface. This change is pending GeoAPI revision.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>template</code> - the property to add to the feature type.</dd> |
| <dt>Returns:</dt> |
| <dd>a builder initialized to the given template. |
| In the <code>Operation</code> case, the builder is a read-only accessor on the operation properties.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="#properties()"><code>properties()</code></a></li> |
| <li><a href="#getProperty(java.lang.String)"><code>getProperty(String)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setDefinition(java.lang.CharSequence)"> |
| <h3>setDefinition</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">setDefinition</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> definition)</span></div> |
| <div class="block">Sets a concise definition of the element.</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="TypeBuilder.html#setDefinition(java.lang.CharSequence)">setDefinition</a></code> in class <code><a href="TypeBuilder.html" title="class in org.apache.sis.feature.builder">TypeBuilder</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>definition</code> - a concise definition of the element, or <code>null</code> if none.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="TypeBuilder.html#getDefinition()"><code>TypeBuilder.getDefinition()</code></a></li> |
| <li><a href="../AbstractIdentifiedType.html#DEFINITION_KEY"><code>AbstractIdentifiedType.DEFINITION_KEY</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setDesignation(java.lang.CharSequence)"> |
| <h3>setDesignation</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">setDesignation</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> designation)</span></div> |
| <div class="block">Sets a natural language designator for the element. |
| This can be used as an alternative to the <a href="TypeBuilder.html#getName()">name</a> in user interfaces.</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="TypeBuilder.html#setDesignation(java.lang.CharSequence)">setDesignation</a></code> in class <code><a href="TypeBuilder.html" title="class in org.apache.sis.feature.builder">TypeBuilder</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>designation</code> - a natural language designator for the element, or <code>null</code> if none.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="TypeBuilder.html#getDesignation()"><code>TypeBuilder.getDesignation()</code></a></li> |
| <li><a href="../AbstractIdentifiedType.html#DESIGNATION_KEY"><code>AbstractIdentifiedType.DESIGNATION_KEY</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setDescription(java.lang.CharSequence)"> |
| <h3>setDescription</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">setDescription</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> description)</span></div> |
| <div class="block">Sets optional information beyond that required for concise definition of the element. |
| The description may assist in understanding the feature scope and application. |
| If the type <a href="TypeBuilder.html#isDeprecated()">is deprecated</a>, then the description should |
| give indication about the replacement (e.g. <cite>"superceded by …"</cite>).</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="TypeBuilder.html#setDescription(java.lang.CharSequence)">setDescription</a></code> in class <code><a href="TypeBuilder.html" title="class in org.apache.sis.feature.builder">TypeBuilder</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>description</code> - information beyond that required for concise definition of the element, or <code>null</code> if none.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="TypeBuilder.html#getDescription()"><code>TypeBuilder.getDescription()</code></a></li> |
| <li><a href="../AbstractIdentifiedType.html#DESCRIPTION_KEY"><code>AbstractIdentifiedType.DESCRIPTION_KEY</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setDeprecated(boolean)"> |
| <h3>setDeprecated</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></span> <span class="element-name">setDeprecated</span><wbr><span class="parameters">(boolean deprecated)</span></div> |
| <div class="block">Sets whether the type is deprecated. |
| If the type is deprecated, then the <a href="TypeBuilder.html#setDescription(java.lang.CharSequence)">description</a> |
| should be set to an indication about the replacement (e.g. <cite>"superceded by …"</cite>).</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="TypeBuilder.html#setDeprecated(boolean)">setDeprecated</a></code> in class <code><a href="TypeBuilder.html" title="class in org.apache.sis.feature.builder">TypeBuilder</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>deprecated</code> - whether this type is deprecated.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="TypeBuilder.html#isDeprecated()"><code>TypeBuilder.isDeprecated()</code></a></li> |
| <li><a href="../AbstractIdentifiedType.html#DEPRECATED_KEY"><code>AbstractIdentifiedType.DEPRECATED_KEY</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="build()"> |
| <h3>build</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a></span> <span class="element-name">build</span>() |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></span></div> |
| <div class="block">Builds the feature type from the information and properties specified to this builder. |
| One of the <code>setName(…)</code> methods must have been invoked before this <code>build()</code> method (mandatory). |
| All other methods are optional, but some calls to a <code>add</code> method are usually needed. |
| |
| <div class="warning"><b>Warning:</b> In a future SIS version, the return type may be changed to the |
| <code>org.opengis.feature.FeatureType</code> interface. This change is pending GeoAPI revision.</div> |
| |
| <p>If a feature type has already been built and this builder state has not changed since the |
| feature type creation, then the previously created <code>FeatureType</code> instance is returned.</p></div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="TypeBuilder.html#build()">build</a></code> in class <code><a href="TypeBuilder.html" title="class in org.apache.sis.feature.builder">TypeBuilder</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>the feature type.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if the builder contains inconsistent information.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="#clear()"><code>clear()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |