blob: a793bc3379aa897b77d45e086c34e69530bbc5f2 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 -->
<title>DefaultRecordType (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.util.iso.DefaultRecordType class">
<meta name="keywords" content="castOrCopy()">
<meta name="keywords" content="getTypeName()">
<meta name="keywords" content="getContainer()">
<meta name="keywords" content="getMemberTypes()">
<meta name="keywords" content="getMembers()">
<meta name="keywords" content="locate()">
<meta name="keywords" content="isInstance()">
<meta name="keywords" content="equals()">
<meta name="keywords" content="hashCode()">
<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="DefaultRecordType (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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/DefaultRecordType.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&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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">&nbsp;</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>&nbsp;<a href="package-summary.html">org.apache.sis.util.iso</a></div>
<h2 title="Class DefaultRecordType" class="title">Class DefaultRecordType</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>DefaultRecordType</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></code>, <code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Record­Type</a></code>, <code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/Type.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Type</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">DefaultRecordType</span>
extends <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>
implements <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">RecordType</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></pre>
<div class="block">An immutable definition of the type of a <a href="DefaultRecord.html" title="class in org.apache.sis.util.iso">record</a>.
A <code>Record­Type</code> is identified by a <a href="#getTypeName()">type name</a> and contains an
arbitrary amount of <a href="#getMembers()">members</a> as (<var>name</var>, <var>type</var>) pairs.
A <code>Record­Type</code> may therefore contain another <code>Record­Type</code> as a member.
<div class="note"><b>Comparison with Java reflection:</b>
<code>Record­Type</code> instances can be though as equivalent to instances of the Java <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"><code>Class</code></a> class.
The set of members in a <code>Record­Type</code> can be though as equivalent to the set of fields in a class.
</div>
<div class="section">Instantiation</div>
The easiest way to create <code>Default­Record­Type</code> instances is to use the
<a href="DefaultRecordSchema.html#createRecordType(java.lang.CharSequence,java.util.Map)"><code>Default­Record­Schema​.create­Record­Type(Char­Sequence, Map)</code></a> method.
Example:
<div class="note">
<blockquote><pre>DefaultRecordSchema schema = <font color="green">new</font> <b>DefaultRecordSchema</b>(<font color="green">null</font>, <font color="green">null</font>, <font color="orangered">"MySchema"</font>);
<i><font color="gray">// The same instance can be reused for all records to create in that schema.</font></i>
Map&lt;CharSequence,Class&lt;?&gt;&gt; members = <font color="green">new</font> LinkedHashMap&lt;&gt;();
members.<b>put</b>(<font color="orangered">"city"</font>, String .<font color="green">class</font>);
members.<b>put</b>(<font color="orangered">"latitude"</font>, Double .<font color="green">class</font>);
members.<b>put</b>(<font color="orangered">"longitude"</font>, Double .<font color="green">class</font>);
members.<b>put</b>(<font color="orangered">"population"</font>, Integer.<font color="green">class</font>);
RecordType record = schema.<b>createRecordType</b>(<font color="orangered">"MyRecordType"</font>, members);</pre></blockquote>
</div>
<div class="section">Immutability and thread safety</div>
This class is immutable and thus inherently thread-safe if the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/TypeName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>Type­Name</code></a>, the <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordSchema.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>Record­Schema</code></a>
and all (<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/MemberName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>Member­Name</code></a>, <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/Type.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>Type</code></a>) entries in the map given to the constructor are also immutable.
Subclasses shall make sure that any overridden methods remain safe to call from multiple threads and do not change
any public <code>Record­Type</code> state.
<div class="section">Serialization</div>
This class is serializable if all elements given to the constructor are also serializable.
Note in particular that <a href="DefaultRecordSchema.html" title="class in org.apache.sis.util.iso"><code>Default­Record­Schema</code></a> is currently <strong>not</strong> serializable,
so users wanting serialization may need to provide their own schema.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.3</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="DefaultRecord.html" title="class in org.apache.sis.util.iso"><code>Default­Record</code></a>,
<a href="DefaultRecordSchema.html" title="class in org.apache.sis.util.iso"><code>Default­Record­Schema</code></a>,
<a href="DefaultMemberName.html" title="class in org.apache.sis.util.iso"><code>Default­Member­Name</code></a>,
<a href="../../../../../serialized-form.html#org.apache.sis.util.iso.DefaultRecordType">Serialized Form</a></dd>
<p><font size="-1">Defined in the <code>sis-metadata</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">&nbsp;</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(org.opengis.util.RecordType)">DefaultRecordType</a></span>&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">RecordType</a>&nbsp;other)</code></th>
<td class="colLast">
<div class="block">Creates a new record with the same names and members than the given one.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.opengis.util.TypeName,org.opengis.util.RecordSchema,java.util.Map)">DefaultRecordType</a></span>&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/TypeName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">TypeName</a>&nbsp;typeName,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordSchema.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">RecordSchema</a>&nbsp;container,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;? extends <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/MemberName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">MemberName</a>,&#8203;? extends <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/Type.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Type</a>&gt;&nbsp;members)</code></th>
<td class="colLast">
<div class="block">Creates a new record in the given schema.</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">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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>static <a href="DefaultRecordType.html" title="class in org.apache.sis.util.iso">DefaultRecordType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#castOrCopy(org.opengis.util.RecordType)">castOrCopy</a></span>&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">RecordType</a>&nbsp;other)</code></th>
<td class="colLast">
<div class="block">Returns a SIS implementation with the name and members of the given arbitrary implementation.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equals(java.lang.Object)">equals</a></span>&#8203;(<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>&nbsp;other)</code></th>
<td class="colLast">
<div class="block">Compares the given object with this <code>Record­Type</code> for equality.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordSchema.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">RecordSchema</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getContainer()">getContainer</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the schema that contains this record type.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/MemberName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">MemberName</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMembers()">getMembers</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the set of attribute names defined in this <code>Record­Type</code>'s dictionary.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/MemberName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">MemberName</a>,&#8203;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/Type.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Type</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMemberTypes()">getMemberTypes</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the dictionary of all (<var>name</var>, <var>type</var>) pairs in this record type.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/TypeName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">TypeName</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTypeName()">getTypeName</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the name that identifies this record type.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode()">hashCode</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a hash code value for this <code>Record­Type</code>.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isInstance(org.opengis.util.Record)">isInstance</a></span>&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/Record.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Record</a>&nbsp;record)</code></th>
<td class="colLast">
<div class="block">Determines if the given record is compatible with this record type.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/TypeName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">TypeName</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#locate(org.opengis.util.MemberName)">locate</a></span>&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/MemberName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">MemberName</a>&nbsp;memberName)</code></th>
<td class="colLast">
<div class="block">Returns the type associated to the given attribute name, or <code>null</code> if none.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><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></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a string representation of this object.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<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#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">get­Class</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">notify­All</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="&lt;init&gt;(org.opengis.util.RecordType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DefaultRecordType</h4>
<pre>public&nbsp;DefaultRecordType&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">RecordType</a>&nbsp;other)</pre>
<div class="block">Creates a new record with the same names and members than the given one.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>other</code> - the <code>Record­Type</code> to copy.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.opengis.util.TypeName,org.opengis.util.RecordSchema,java.util.Map)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DefaultRecordType</h4>
<pre>public&nbsp;DefaultRecordType&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/TypeName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">TypeName</a>&nbsp;typeName,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordSchema.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">RecordSchema</a>&nbsp;container,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;? extends <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/MemberName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">MemberName</a>,&#8203;? extends <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/Type.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Type</a>&gt;&nbsp;members)</pre>
<div class="block">Creates a new record in the given schema.
It is caller responsibility to add the new <code>Record­Type</code> in the container
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordSchema.html?is-external=true#getDescription()" title="class or interface in org.opengis.util" class="externalLink">description</a> map, if desired.
<p>This constructor is provided mostly for developers who want to create <code>Default­Record­Type</code>
instances in their own <code>Record­Schema</code> implementation. Otherwise if the default record schema
implementation is sufficient, the <a href="DefaultRecordSchema.html#createRecordType(java.lang.CharSequence,java.util.Map)"><code>Default­Record­Schema​.create­Record­Type(Char­Sequence, Map)</code></a>
method provides an easier alternative.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type­Name</code> - the name that identifies this record type.</dd>
<dd><code>container</code> - the schema that contains this record type.</dd>
<dd><code>members</code> - the name and type of the members to be included in this record type.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="DefaultRecordSchema.html#createRecordType(java.lang.CharSequence,java.util.Map)"><code>Default­Record­Schema​.create­Record­Type(Char­Sequence, Map)</code></a></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="castOrCopy(org.opengis.util.RecordType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>castOrCopy</h4>
<pre class="methodSignature">public static&nbsp;<a href="DefaultRecordType.html" title="class in org.apache.sis.util.iso">DefaultRecordType</a>&nbsp;castOrCopy&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">RecordType</a>&nbsp;other)</pre>
<div class="block">Returns a SIS implementation with the name and members of the given arbitrary implementation.
This method performs the first applicable action in the following choices:
<ul>
<li>If the given object is <code>null</code>, then this method returns <code>null</code>.</li>
<li>Otherwise if the given object is already an instance of <code>Default­Record­Type</code>,
then it is returned unchanged.</li>
<li>Otherwise a new <code>Default­Record­Type</code> instance is created using the
<a href="#%3Cinit%3E(org.opengis.util.RecordType)">copy constructor</a> and returned.
Note that this is a shallow copy operation, since the members contained
in the given object are not recursively copied.</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>other</code> - the object to get as a SIS implementation, or <code>null</code> if none.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a SIS implementation containing the members of the given object
(may be the given object itself), or <code>null</code> if the argument was <code>null</code>.</dd>
</dl>
</li>
</ul>
<a id="getTypeName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTypeName</h4>
<pre class="methodSignature">public&nbsp;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/TypeName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">TypeName</a>&nbsp;getTypeName()</pre>
<div class="block">Returns the name that identifies this record type. If this <code>Record­Type</code> is contained in a
<a href="DefaultRecordSchema.html" title="class in org.apache.sis.util.iso">record schema</a>, then the record type name shall be valid in the
<a href="DefaultNameSpace.html" title="class in org.apache.sis.util.iso">name space</a> of the record schema:
<blockquote><pre>NameSpace namespace = <b>getContainer</b>().<b>getSchemaName</b>().<b>scope</b>()</pre></blockquote>
<div class="note"><b>Comparison with Java reflection:</b>
If we think about this <code>Record­Type</code> as equivalent to a <code>Class</code> instance,
then this method can be think as the equivalent of the Java <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#getName()" title="class or interface in java.lang" class="externalLink"><code>Class​.get­Name()</code></a> method.
</div></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true#getTypeName()" title="class or interface in org.opengis.util" class="externalLink">get­Type­Name</a></code>&nbsp;in interface&nbsp;<code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Record­Type</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/Type.html?is-external=true#getTypeName()" title="class or interface in org.opengis.util" class="externalLink">get­Type­Name</a></code>&nbsp;in interface&nbsp;<code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/Type.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Type</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the name that identifies this record type.</dd>
</dl>
</li>
</ul>
<a id="getContainer()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContainer</h4>
<pre class="methodSignature">public&nbsp;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordSchema.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">RecordSchema</a>&nbsp;getContainer()</pre>
<div class="block">Returns the schema that contains this record type.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true#getContainer()" title="class or interface in org.opengis.util" class="externalLink">get­Container</a></code>&nbsp;in interface&nbsp;<code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Record­Type</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the schema that contains this record type.</dd>
</dl>
</li>
</ul>
<a id="getMemberTypes()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMemberTypes</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/MemberName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">MemberName</a>,&#8203;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/Type.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Type</a>&gt;&nbsp;getMemberTypes()</pre>
<div class="block">Returns the dictionary of all (<var>name</var>, <var>type</var>) pairs in this record type.
The returned map is unmodifiable.
<div class="note"><b>Comparison with Java reflection:</b>
If we think about this <code>Record­Type</code> as equivalent to a <code>Class</code> instance, then
this method can be though as the related to the Java <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#getFields()" title="class or interface in java.lang" class="externalLink"><code>Class​.get­Fields()</code></a> method.
</div></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true#getMemberTypes()" title="class or interface in org.opengis.util" class="externalLink">get­Member­Types</a></code>&nbsp;in interface&nbsp;<code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Record­Type</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the dictionary of (<var>name</var>, <var>type</var>) pairs, or an empty map if none.</dd>
</dl>
</li>
</ul>
<a id="getMembers()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMembers</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/MemberName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">MemberName</a>&gt;&nbsp;getMembers()</pre>
<div class="block">Returns the set of attribute names defined in this <code>Record­Type</code>'s dictionary.
This method is functionally equivalent to:
<blockquote><pre><b>getMemberTypes</b>().<b>keySet</b>();</pre></blockquote></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true#getMembers()" title="class or interface in org.opengis.util" class="externalLink">get­Members</a></code>&nbsp;in interface&nbsp;<code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Record­Type</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the set of attribute names, or an empty set if none.</dd>
</dl>
</li>
</ul>
<a id="locate(org.opengis.util.MemberName)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>locate</h4>
<pre class="methodSignature">public&nbsp;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/TypeName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">TypeName</a>&nbsp;locate&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/MemberName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">MemberName</a>&nbsp;memberName)</pre>
<div class="block">Returns the type associated to the given attribute name, or <code>null</code> if none.
This method is functionally equivalent to (omitting the check for null value):
<blockquote><pre><b>getMemberTypes</b>().<b>get</b>(memberName).<b>getTypeName</b>();</pre></blockquote>
<div class="note"><b>Comparison with Java reflection:</b>
If we think about this <code>Record­Type</code> as equivalent to a <code>Class</code> instance, then
this method can be though as related to the Java <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#getField(java.lang.String)" title="class or interface in java.lang" class="externalLink"><code>Class​.get­Field(String)</code></a> method.
</div></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true#locate(org.opengis.util.MemberName)" title="class or interface in org.opengis.util" class="externalLink">locate</a></code>&nbsp;in interface&nbsp;<code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Record­Type</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>member­Name</code> - the attribute name for which to get the associated type name.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the associated type name, or <code>null</code> if none.</dd>
</dl>
</li>
</ul>
<a id="isInstance(org.opengis.util.Record)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isInstance</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isInstance&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/Record.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Record</a>&nbsp;record)</pre>
<div class="block">Determines if the given record is compatible with this record type. This method returns <code>true</code>
if the given <code>record</code> argument is non-null and the following condition holds:
<blockquote><pre>Set&lt;MemberName&gt; attributeNames = record.<b>getAttributes</b>().<b>keySet</b>();
<font color="green">boolean</font> isInstance = <b>getMembers</b>().<b>containsAll</b>(attributeNames);</pre></blockquote>
<div class="note"><b>Implementation note:</b>
We do not require that <code>record​.get­Record­Type() == this</code> in order to allow record
"sub-types" to define additional fields, in a way similar to Java sub-classing.</div></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true#isInstance(org.opengis.util.Record)" title="class or interface in org.opengis.util" class="externalLink">is­Instance</a></code>&nbsp;in interface&nbsp;<code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/RecordType.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">Record­Type</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>record</code> - the record to test for compatibility.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the given record is compatible with this <code>Record­Type</code>.</dd>
</dl>
</li>
</ul>
<a id="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;equals&#8203;(<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>&nbsp;other)</pre>
<div class="block">Compares the given object with this <code>Record­Type</code> for equality.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>other</code> - the object to compare with this <code>Record­Type</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if both objects are equal.</dd>
</dl>
</li>
</ul>
<a id="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;hashCode()</pre>
<div class="block">Returns a hash code value for this <code>Record­Type</code>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><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">hash­Code</a></code>&nbsp;in class&nbsp;<code><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></code></dd>
</dl>
</li>
</ul>
<a id="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public&nbsp;<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>&nbsp;toString()</pre>
<div class="block">Returns a string representation of this object.
The string representation is for debugging purpose and may change in any future SIS version.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">to­String</a></code>&nbsp;in class&nbsp;<code><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></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a string representation of this record type.</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/DefaultRecordType.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&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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 &#169; 2010&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>