| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 --> |
| <title>FeatureTypeBuilder (Apache SIS 1.0 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2019-09-20"> |
| <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="setDefaultCardinality()"> |
| <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="../../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../../jquery/jquery-3.3.1.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jquery-migrate-3.0.1.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="FeatureTypeBuilder (Apache SIS 1.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":42,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../../"; |
| var useModuleDirectories = false; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/FeatureTypeBuilder.html">Use</a></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">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <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="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.sis.feature.builder</a></div> |
| <h2 title="Class FeatureTypeBuilder" class="title">Class FeatureTypeBuilder</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="TypeBuilder.html" title="class in org.apache.sis.feature.builder">TypeBuilder</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>FeatureTypeBuilder</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="../../util/Localized.html" title="interface in org.apache.sis.util">Localized</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public class <span class="typeNameLabel">FeatureTypeBuilder</span> |
| extends <a href="TypeBuilder.html" title="class in org.apache.sis.feature.builder">TypeBuilder</a></pre> |
| <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: |
| |
| <blockquote><pre>FeatureTypeBuilder builder; |
| |
| <i><font color="gray">// Create a feature type for a city, which contains a name and a population.</font></i> |
| builder = <font color="green">new</font> <b>FeatureTypeBuilder</b>() .<b>setName</b>(<font color="orangered">"City"</font>); |
| builder.<b>addAttribute</b>(String.<font color="green">class</font>) .<b>setName</b>(<font color="orangered">"name"</font>).<b>setDefaultValue</b>(<font color="orangered">"Utopia"</font>); |
| builder.<b>addAttribute</b>(Integer.<font color="green">class</font>).<b>setName</b>(<font color="orangered">"population"</font>); |
| FeatureType city = builder.<b>build</b>();</pre></blockquote> |
| |
| A call to <code>System.out.println(city)</code> prints the following table: |
| |
| <blockquote><pre>City |
| ┌────────────┬─────────┬──────────────┬───────────────┐ |
| │ Name │ Type │ Multiplicity │ Default value │ |
| ├────────────┼─────────┼──────────────┼───────────────┤ |
| │ name │ String │ [1 … 1] │ Utopia │ |
| │ population │ Integer │ [1 … 1] │ │ |
| └────────────┴─────────┴──────────────┴───────────────┘</pre></blockquote> |
| |
| <p><code>FeatureTypeBuilder</code> instances should be short lived. |
| After the <code>FeatureType</code> has been created, the builder should be discarded.</p></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../parameter/ParameterBuilder.html" title="class in org.apache.sis.parameter"><code>ParameterBuilder</code></a></dd> |
| |
| <p><font size="-1">Defined in the <code>sis-feature</code> module</font></p> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">FeatureTypeBuilder</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new builder instance using the default name factory.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sis.feature.DefaultFeatureType)">FeatureTypeBuilder</a></span>​(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> template)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new builder instance using the given feature type as a template.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.opengis.util.NameFactory,org.apache.sis.setup.GeometryLibrary,java.util.Locale)">FeatureTypeBuilder</a></span>​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/NameFactory.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">NameFactory</a> factory, |
| <a href="../../setup/GeometryLibrary.html" title="enum in org.apache.sis.setup">GeometryLibrary</a> library, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a> locale)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new builder instance using the given name factory, geometry library |
| and locale for formatting error messages.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><a href="AssociationRoleBuilder.html" title="class in org.apache.sis.feature.builder">AssociationRoleBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addAssociation(org.apache.sis.feature.DefaultAssociationRole)">addAssociation</a></span>​(<a href="../DefaultAssociationRole.html" title="class in org.apache.sis.feature">DefaultAssociationRole</a> template)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new <code>FeatureAssociationRole</code> builder initialized to the same characteristics |
| than the given template.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="AssociationRoleBuilder.html" title="class in org.apache.sis.feature.builder">AssociationRoleBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addAssociation(org.apache.sis.feature.DefaultFeatureType)">addAssociation</a></span>​(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> type)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new <code>FeatureAssociationRole</code> builder for features of the given type.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="AssociationRoleBuilder.html" title="class in org.apache.sis.feature.builder">AssociationRoleBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addAssociation(org.opengis.util.GenericName)">addAssociation</a></span>​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/GenericName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">GenericName</a> type)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new <code>FeatureAssociationRole</code> builder for features of a type of the given name.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><V> <a href="AttributeTypeBuilder.html" title="class in org.apache.sis.feature.builder">AttributeTypeBuilder</a><V></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addAttribute(java.lang.Class)">addAttribute</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><V> valueClass)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new <code>AttributeType</code> builder for values of the given class.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><V> <a href="AttributeTypeBuilder.html" title="class in org.apache.sis.feature.builder">AttributeTypeBuilder</a><V></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addAttribute(org.apache.sis.feature.DefaultAttributeType)">addAttribute</a></span>​(<a href="../DefaultAttributeType.html" title="class in org.apache.sis.feature">DefaultAttributeType</a><V> template)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new <code>AttributeType</code> builder initialized to the same characteristics than the given template.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="AttributeTypeBuilder.html" title="class in org.apache.sis.feature.builder">AttributeTypeBuilder</a><?></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addAttribute(org.opengis.metadata.acquisition.GeometryType)">addAttribute</a></span>​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/acquisition/GeometryType.html?is-external=true" title="class or interface in org.opengis.metadata.acquisition" class="externalLink">GeometryType</a> type)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new attribute for geometries of the given type.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="PropertyTypeBuilder.html" title="class in org.apache.sis.feature.builder">PropertyTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addProperty(org.apache.sis.feature.AbstractIdentifiedType)">addProperty</a></span>​(<a href="../AbstractIdentifiedType.html" title="class in org.apache.sis.feature">AbstractIdentifiedType</a> template)</code></th> |
| <td class="colLast"> |
| <div class="block">Adds the given property in the feature type properties.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#build()">build</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Builds the feature type from the information and properties specified to this builder.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clear()">clear</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Clears all setting in this builder.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNameSpace()">getNameSpace</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the namespace of the names created by <code>setName(CharSequence...)</code> method calls.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="PropertyTypeBuilder.html" title="class in org.apache.sis.feature.builder">PropertyTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getProperty(java.lang.String)">getProperty</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the builder for the property of the given name.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code><a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a>[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSuperTypes()">getSuperTypes</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the direct parents of the feature type to create.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAbstract()">isAbstract</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if the feature type to create will act as an abstract super-type.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isNameUsed(java.lang.String)">isNameUsed</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if a property of the given name is defined or if the given name is ambiguous.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="PropertyTypeBuilder.html" title="class in org.apache.sis.feature.builder">PropertyTypeBuilder</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#properties()">properties</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a view of all attributes and associations added to the <code>FeatureType</code> to build.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAbstract(boolean)">setAbstract</a></span>​(boolean isAbstract)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets whether the feature type to create will be abstract.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAll(org.apache.sis.feature.DefaultFeatureType)">setAll</a></span>​(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> template)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets all properties of this builder to the values of the given feature type.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDefaultCardinality(int,int)">setDefaultCardinality</a></span>​(int minimumOccurs, |
| int maximumOccurs)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Renamed <a href="#setDefaultMultiplicity(int,int)"><code>setDefaultMultiplicity(int, int)</code></a>.</div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDefaultMultiplicity(int,int)">setDefaultMultiplicity</a></span>​(int minimumOccurs, |
| int maximumOccurs)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the default minimum and maximum number of next attributes and associations to add.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDefinition(java.lang.CharSequence)">setDefinition</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> definition)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets a concise definition of the element.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDeprecated(boolean)">setDeprecated</a></span>​(boolean deprecated)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets whether the type is deprecated.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDescription(java.lang.CharSequence)">setDescription</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> description)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets optional information beyond that required for concise definition of the element.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDesignation(java.lang.CharSequence)">setDesignation</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> designation)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets a natural language designator for the element.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setIdentifierDelimiters(java.lang.String,java.lang.String,java.lang.String)">setIdentifierDelimiters</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> delimiter, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> prefix, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> suffix)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the prefix, suffix and delimiter to use when formatting a compound identifier made of two or more attributes.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setName(java.lang.CharSequence)">setName</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> localPart)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the <code>FeatureType</code> name as a simple string.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setName(java.lang.CharSequence...)">setName</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a>... components)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the <code>FeatureType</code> name as a string in the given scope.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setName(org.opengis.util.GenericName)">setName</a></span>​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/GenericName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">GenericName</a> name)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the <code>FeatureType</code> name as a generic name.</div> |
| </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setNameSpace(java.lang.CharSequence)">setNameSpace</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> ns)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the namespace of the next names to be created by <code>setName(CharSequence...)</code> method calls.</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code><a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSuperTypes(org.apache.sis.feature.DefaultFeatureType...)">setSuperTypes</a></span>​(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a>... parents)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the parent types (or super-type) from which to inherit properties.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.TypeBuilder"> |
| <!-- --> |
| </a> |
| <h3>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></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FeatureTypeBuilder</h4> |
| <pre>public FeatureTypeBuilder()</pre> |
| <div class="block">Creates a new builder instance using the default name factory.</div> |
| </li> |
| </ul> |
| <a id="<init>(org.apache.sis.feature.DefaultFeatureType)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FeatureTypeBuilder</h4> |
| <pre>public FeatureTypeBuilder​(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> template)</pre> |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>template</code> - an existing feature type to use as a template, or <code>null</code> if none.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="<init>(org.opengis.util.NameFactory,org.apache.sis.setup.GeometryLibrary,java.util.Locale)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>FeatureTypeBuilder</h4> |
| <pre>public FeatureTypeBuilder​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/NameFactory.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">NameFactory</a> factory, |
| <a href="../../setup/GeometryLibrary.html" title="enum in org.apache.sis.setup">GeometryLibrary</a> library, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a> locale)</pre> |
| <div class="block">Creates a new builder instance using the given name factory, geometry library |
| and locale for formatting error messages.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></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> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="clear()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>clear</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> clear()</pre> |
| <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> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setAll(org.apache.sis.feature.DefaultFeatureType)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAll</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setAll​(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> template)</pre> |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>template</code> - an existing feature type to use as a template, or <code>null</code> if none.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isAbstract()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isAbstract</h4> |
| <pre class="methodSignature">public boolean isAbstract()</pre> |
| <div class="block">Returns <code>true</code> if the feature type to create will act as an abstract super-type. |
| Abstract types can not be <a href="../DefaultFeatureType.html#newInstance()">instantiated</a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the feature type to create will act as an abstract super-type.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../DefaultFeatureType.html#isAbstract()"><code>DefaultFeatureType.isAbstract()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setAbstract(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAbstract</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setAbstract​(boolean isAbstract)</pre> |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>isAbstract</code> - whether the feature type will be abstract.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getSuperTypes()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSuperTypes</h4> |
| <pre class="methodSignature">public <a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a>[] getSuperTypes()</pre> |
| <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> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the parents of the feature type to create, or an empty array if none.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../DefaultFeatureType.html#getSuperTypes()"><code>DefaultFeatureType.getSuperTypes()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setSuperTypes(org.apache.sis.feature.DefaultFeatureType...)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSuperTypes</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setSuperTypes​(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a>... parents)</pre> |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getNameSpace()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNameSpace</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> getNameSpace()</pre> |
| <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="../../util/iso/DefaultNameSpace.html#isGlobal()">global namespace</a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></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> |
| </li> |
| </ul> |
| <a id="setNameSpace(java.lang.CharSequence)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setNameSpace</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setNameSpace​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> ns)</pre> |
| <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: |
| |
| <blockquote><pre>FeatureTypeBuilder builder = <font color="green">new</font> <b>FeatureTypeBuilder</b>().<b>setNameSpace</b>(<font color="orangered">"MyNameSpace"</font>).<b>setName</b>(<font color="orangered">"City"</font>); |
| FeatureType city = builder.<b>build</b>(); |
| |
| System.out.<b>println</b>(city.<b>getName</b>()); <i><font color="gray">// Prints "City"</font></i> |
| System.out.<b>println</b>(city.<b>getName</b>().<b>toFullyQualifiedName</b>()); <i><font color="gray">// Prints "MyNameSpace:City"</font></i></pre></blockquote> |
| |
| 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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>ns</code> - the new namespace, or <code>null</code> if none.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setName(org.opengis.util.GenericName)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setName</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setName​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/GenericName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">GenericName</a> name)</pre> |
| <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. |
| |
| <div class="note"><b>Note for subclasses:</b> |
| 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></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></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><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the generic name (can not be <code>null</code>).</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="TypeBuilder.html#getName()"><code>TypeBuilder.getName()</code></a>, |
| <a href="TypeBuilder.html#setName(java.lang.CharSequence)"><code>TypeBuilder.setName(CharSequence)</code></a>, |
| <a href="../AbstractIdentifiedType.html#NAME_KEY"><code>AbstractIdentifiedType.NAME_KEY</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setName(java.lang.CharSequence)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setName</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setName​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> localPart)</pre> |
| <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="../../util/iso/DefaultLocalName.html#toString()">string representation</a> unless the <a href="../../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/util/LocalName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><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> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></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><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>localPart</code> - the local part of the generic name as a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>String</code></a> or <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/InternationalString.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>InternationalString</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="TypeBuilder.html#getName()"><code>TypeBuilder.getName()</code></a>, |
| <a href="TypeBuilder.html#setName(java.lang.CharSequence...)"><code>TypeBuilder.setName(CharSequence...)</code></a>, |
| <a href="#getNameSpace()"><code>getNameSpace()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setName(java.lang.CharSequence...)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setName</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setName​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a>... components)</pre> |
| <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="../../util/iso/AbstractName.html#toString()">string representation</a> unless the |
| <a href="../../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/util/LocalName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>LocalName</code></a> or <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/ScopedName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><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> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></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><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>components</code> - the name components as an array of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>String</code></a> or <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/InternationalString.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>InternationalString</code></a> instances.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="TypeBuilder.html#getName()"><code>TypeBuilder.getName()</code></a>, |
| <a href="TypeBuilder.html#setName(java.lang.CharSequence)"><code>TypeBuilder.setName(CharSequence)</code></a>, |
| <a href="#getNameSpace()"><code>getNameSpace()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setDefaultCardinality(int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDefaultCardinality</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang" class="externalLink">@Deprecated</a> |
| public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setDefaultCardinality​(int minimumOccurs, |
| int maximumOccurs)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Renamed <a href="#setDefaultMultiplicity(int,int)"><code>setDefaultMultiplicity(int, int)</code></a>. A cardinality is the actual number of elements |
| in a set, while multiplicity is the range of cardinality that a set can have.</div> |
| </div> |
| </li> |
| </ul> |
| <a id="setDefaultMultiplicity(int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDefaultMultiplicity</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setDefaultMultiplicity​(int minimumOccurs, |
| int maximumOccurs)</pre> |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="PropertyTypeBuilder.html#setMinimumOccurs(int)"><code>PropertyTypeBuilder.setMinimumOccurs(int)</code></a>, |
| <a href="PropertyTypeBuilder.html#setMaximumOccurs(int)"><code>PropertyTypeBuilder.setMaximumOccurs(int)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setIdentifierDelimiters(java.lang.String,java.lang.String,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setIdentifierDelimiters</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setIdentifierDelimiters​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> delimiter, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> prefix, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> suffix)</pre> |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="AttributeRole.html#IDENTIFIER_COMPONENT"><code>AttributeRole.IDENTIFIER_COMPONENT</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="properties()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>properties</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="PropertyTypeBuilder.html" title="class in org.apache.sis.feature.builder">PropertyTypeBuilder</a>> properties()</pre> |
| <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 <cite>live</cite>: changes in this builder are reflected in that list and conversely. |
| However the returned list allows only <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util" class="externalLink">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> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a live list over the properties declared to this builder.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#getProperty(java.lang.String)"><code>getProperty(String)</code></a>, |
| <a href="#addAttribute(java.lang.Class)"><code>addAttribute(Class)</code></a>, |
| <a href="#addAttribute(org.apache.sis.feature.DefaultAttributeType)"><code>addAttribute(DefaultAttributeType)</code></a>, |
| <a href="#addAssociation(org.apache.sis.feature.DefaultFeatureType)"><code>addAssociation(DefaultFeatureType)</code></a>, |
| <a href="#addAssociation(org.opengis.util.GenericName)"><code>addAssociation(GenericName)</code></a>, |
| <a href="#addAssociation(org.apache.sis.feature.DefaultAssociationRole)"><code>addAssociation(DefaultAssociationRole)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isNameUsed(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isNameUsed</h4> |
| <pre class="methodSignature">public boolean isNameUsed​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name)</pre> |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name to test.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the given name is used by another property or is ambiguous.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getProperty(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getProperty</h4> |
| <pre class="methodSignature">public <a href="PropertyTypeBuilder.html" title="class in org.apache.sis.feature.builder">PropertyTypeBuilder</a> getProperty​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name)</pre> |
| <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/util/ScopedName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - name of the property to search.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>property of the given name, or <code>null</code> if none.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the given name is ambiguous.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addAttribute(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addAttribute</h4> |
| <pre class="methodSignature">public <V> <a href="AttributeTypeBuilder.html" title="class in org.apache.sis.feature.builder">AttributeTypeBuilder</a><V> addAttribute​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><V> valueClass)</pre> |
| <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. |
| |
| <p>Usage example:</p> |
| <blockquote><pre>builder.<b>addAttribute</b>(String.<font color="green">class</font>).<b>setName</b>(<font color="orangered">"City"</font>).<b>setDefaultValue</b>(<font color="orangered">"Metropolis"</font>);</pre></blockquote> |
| |
| The value class can not be <code>Feature.class</code> since features shall be handled |
| as <a href="#addAssociation(org.apache.sis.feature.DefaultFeatureType)">associations</a> instead than attributes.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>V</code> - the compile-time value of <code>valueClass</code> argument.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>valueClass</code> - the class of attribute values (can not be <code>Feature.class</code>).</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a builder for an <code>AttributeType</code>.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#properties()"><code>properties()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addAttribute(org.apache.sis.feature.DefaultAttributeType)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addAttribute</h4> |
| <pre class="methodSignature">public <V> <a href="AttributeTypeBuilder.html" title="class in org.apache.sis.feature.builder">AttributeTypeBuilder</a><V> addAttribute​(<a href="../DefaultAttributeType.html" title="class in org.apache.sis.feature">DefaultAttributeType</a><V> template)</pre> |
| <div class="block">Creates a new <code>AttributeType</code> builder initialized to the same characteristics than the given template. |
| |
| <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> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>V</code> - the compile-time type of values in the <code>template</code> argument.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>template</code> - an existing attribute type to use as a template.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a builder for an <code>AttributeType</code>, initialized with the values of the given template.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#properties()"><code>properties()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addAttribute(org.opengis.metadata.acquisition.GeometryType)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addAttribute</h4> |
| <pre class="methodSignature">public <a href="AttributeTypeBuilder.html" title="class in org.apache.sis.feature.builder">AttributeTypeBuilder</a><?> addAttribute​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/acquisition/GeometryType.html?is-external=true" title="class or interface in org.opengis.metadata.acquisition" class="externalLink">GeometryType</a> type)</pre> |
| <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/metadata/acquisition/GeometryType.html?is-external=true" title="class or interface in org.opengis.metadata.acquisition" class="externalLink"><code>GeometryType</code></a> argument given to |
| this method with the <a href="../../setup/GeometryLibrary.html" title="enum 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/metadata/acquisition/GeometryType.html?is-external=true#POINT" title="class or interface in org.opengis.metadata.acquisition" class="externalLink"><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/metadata/acquisition/GeometryType.html?is-external=true#LINEAR" title="class or interface in org.opengis.metadata.acquisition" class="externalLink"><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/metadata/acquisition/GeometryType.html?is-external=true#AREAL" title="class or interface in org.opengis.metadata.acquisition" class="externalLink"><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. |
| |
| <div class="note"><b>Example:</b> |
| the following code creates an attribute named "MyPoint" with values of class |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/geom/Point2D.html?is-external=true" title="class or interface in java.awt.geom" class="externalLink"><code>Point2D</code></a> if the library in use is <a href="../../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: |
| |
| <blockquote><pre>builder.<b>addAttribute</b>(GeometryType.POINT).<b>setName</b>(<font color="orangered">"MyPoint"</font>) |
| .<b>setCRS</b>(CommonCRS.WGS84.<b>normalizedGeographic</b>()) |
| .<b>addRole</b>(AttributeRole.DEFAULT_GEOMETRY);</pre></blockquote> |
| |
| If the library in use is JTS or ESRI instead than 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="../../setup/GeometryLibrary.html" title="enum in org.apache.sis.setup"><code>GeometryLibrary</code></a> javadoc.</div></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - kind of geometric object (point, polyline or polygon).</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a builder for an <code>AttributeType</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addAssociation(org.apache.sis.feature.DefaultFeatureType)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addAssociation</h4> |
| <pre class="methodSignature">public <a href="AssociationRoleBuilder.html" title="class in org.apache.sis.feature.builder">AssociationRoleBuilder</a> addAssociation​(<a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> type)</pre> |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - the type of feature values.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a builder for a <code>FeatureAssociationRole</code>.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#properties()"><code>properties()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addAssociation(org.opengis.util.GenericName)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addAssociation</h4> |
| <pre class="methodSignature">public <a href="AssociationRoleBuilder.html" title="class in org.apache.sis.feature.builder">AssociationRoleBuilder</a> addAssociation​(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/GenericName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">GenericName</a> type)</pre> |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - the name of the type of feature values.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a builder for a <code>FeatureAssociationRole</code>.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#properties()"><code>properties()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addAssociation(org.apache.sis.feature.DefaultAssociationRole)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addAssociation</h4> |
| <pre class="methodSignature">public <a href="AssociationRoleBuilder.html" title="class in org.apache.sis.feature.builder">AssociationRoleBuilder</a> addAssociation​(<a href="../DefaultAssociationRole.html" title="class in org.apache.sis.feature">DefaultAssociationRole</a> template)</pre> |
| <div class="block">Creates a new <code>FeatureAssociationRole</code> builder initialized to the same characteristics |
| than the given template. |
| |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>template</code> - an existing feature association to use as a template.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a builder for an <code>FeatureAssociationRole</code>, initialized with the values of the given template.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#properties()"><code>properties()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addProperty(org.apache.sis.feature.AbstractIdentifiedType)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addProperty</h4> |
| <pre class="methodSignature">public <a href="PropertyTypeBuilder.html" title="class in org.apache.sis.feature.builder">PropertyTypeBuilder</a> addProperty​(<a href="../AbstractIdentifiedType.html" title="class in org.apache.sis.feature">AbstractIdentifiedType</a> template)</pre> |
| <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> |
| |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>template</code> - the property to add to the feature type.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a builder initialized to the given builder. |
| In the <code>Operation</code> case, the builder is a read-only accessor on the operation properties.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#properties()"><code>properties()</code></a>, |
| <a href="#getProperty(java.lang.String)"><code>getProperty(String)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setDefinition(java.lang.CharSequence)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDefinition</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setDefinition​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> definition)</pre> |
| <div class="block">Sets a concise definition of the element.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></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><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>definition</code> - a concise definition of the element, or <code>null</code> if none.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="TypeBuilder.html#getDefinition()"><code>TypeBuilder.getDefinition()</code></a>, |
| <a href="../AbstractIdentifiedType.html#DEFINITION_KEY"><code>AbstractIdentifiedType.DEFINITION_KEY</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setDesignation(java.lang.CharSequence)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDesignation</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setDesignation​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> designation)</pre> |
| <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> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></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><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>designation</code> - a natural language designator for the element, or <code>null</code> if none.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="TypeBuilder.html#getDesignation()"><code>TypeBuilder.getDesignation()</code></a>, |
| <a href="../AbstractIdentifiedType.html#DESIGNATION_KEY"><code>AbstractIdentifiedType.DESIGNATION_KEY</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setDescription(java.lang.CharSequence)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDescription</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setDescription​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> description)</pre> |
| <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> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></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><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>description</code> - information beyond that required for concise definition of the element, or <code>null</code> if none.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="TypeBuilder.html#getDescription()"><code>TypeBuilder.getDescription()</code></a>, |
| <a href="../AbstractIdentifiedType.html#DESCRIPTION_KEY"><code>AbstractIdentifiedType.DESCRIPTION_KEY</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setDeprecated(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDeprecated</h4> |
| <pre class="methodSignature">public <a href="FeatureTypeBuilder.html" title="class in org.apache.sis.feature.builder">FeatureTypeBuilder</a> setDeprecated​(boolean deprecated)</pre> |
| <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> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></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><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>deprecated</code> - whether this type is deprecated.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for allowing method calls chaining.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="TypeBuilder.html#isDeprecated()"><code>TypeBuilder.isDeprecated()</code></a>, |
| <a href="../AbstractIdentifiedType.html#DEPRECATED_KEY"><code>AbstractIdentifiedType.DEPRECATED_KEY</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="build()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>build</h4> |
| <pre class="methodSignature">public <a href="../DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> build() |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalStateException</a></pre> |
| <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></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><span class="returnLabel">Returns:</span></dt> |
| <dd>the feature type.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalStateException</a></code> - if the builder contains inconsistent information.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#clear()"><code>clear()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/FeatureTypeBuilder.html">Use</a></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">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <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="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2010–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |