| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 --> |
| <title>FormattableObject (Apache SIS 1.4 API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2023-10-05"> |
| <meta name="description" content="declaration: module: org.apache.sis.referencing, package: org.apache.sis.io.wkt, class: FormattableObject"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.io.wkt.FormattableObject class"> |
| <meta name="keywords" content="toWKT()"> |
| <meta name="keywords" content="toString()"> |
| <meta name="keywords" content="print()"> |
| <meta name="keywords" content="formatTo()"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../sis.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../../script-dir/jquery-3.6.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var pathtoroot = "../../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span></button> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../../index.html">Overview</a></li> |
| <li><a href="../../../../../module-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| <ul class="sub-nav-list-small"> |
| <li> |
| <p>Summary:</p> |
| <ul> |
| <li>Nested</li> |
| <li>Field</li> |
| <li><a href="#constructor-summary">Constr</a></li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| </li> |
| <li> |
| <p>Detail:</p> |
| <ul> |
| <li>Field</li> |
| <li><a href="#constructor-detail">Constr</a></li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div id="navbar-sub-list"> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor-detail">Constr</a> | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><a href="../../../../../../search.html">SEARCH</a> |
| <input type="text" id="search-input" disabled placeholder="Search"> |
| <input type="reset" id="reset-button" disabled value="reset"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="module-label-in-type">Module</span> <a href="../../../../../module-summary.html">org.apache.sis.referencing</a></div> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.sis.io.wkt</a></div> |
| <h1 title="Class FormattableObject" class="title">Class FormattableObject</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| <div class="inheritance">FormattableObject</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="../../geometry/AbstractDirectPosition.html" title="class in org.apache.sis.geometry">AbstractDirectPosition</a></code>, <code><a href="../../geometry/AbstractEnvelope.html" title="class in org.apache.sis.geometry">AbstractEnvelope</a></code>, <code><a href="../../referencing/AbstractIdentifiedObject.html" title="class in org.apache.sis.referencing">AbstractIdentifiedObject</a></code>, <code><a href="../../referencing/operation/transform/AbstractMathTransform.html" title="class in org.apache.sis.referencing.operation.transform">AbstractMathTransform</a></code>, <code><a href="../../referencing/datum/BursaWolfParameters.html" title="class in org.apache.sis.referencing.datum">BursaWolfParameters</a></code>, <code><a href="../../referencing/operation/DefaultFormula.html" title="class in org.apache.sis.referencing.operation">DefaultFormula</a></code>, <code><a href="../../referencing/DefaultObjectDomain.html" title="class in org.apache.sis.referencing">DefaultObjectDomain</a></code>, <code><a href="../../parameter/DefaultParameterValue.html" title="class in org.apache.sis.parameter">DefaultParameterValue</a></code>, <code><a href="../../referencing/ImmutableIdentifier.html" title="class in org.apache.sis.referencing">ImmutableIdentifier</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">FormattableObject</span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div> |
| <div class="block">Base class for objects that can be formatted as <cite>Well Known Text</cite> (WKT). |
| <a href="WKTFormat.html" title="class in org.apache.sis.io.wkt"><code>WKTFormat</code></a> checks for this class at formatting time for each element to format. |
| When a <code>FormattableObject</code> element is found, its <a href="#formatTo(org.apache.sis.io.wkt.Formatter)"><code>formatTo(Formatter)</code></a> method |
| is invoked for allowing the element to control its formatting. |
| |
| <p>This class provides two methods for getting a default <cite>Well Known Text</cite> |
| representation of this object:</p> |
| |
| <ul> |
| <li><a href="#toWKT()"><code>toWKT()</code></a> tries to return a strictly compliant WKT or throws <a href="UnformattableObjectException.html" title="class in org.apache.sis.io.wkt"><code>UnformattableObjectException</code></a> |
| if this object contains elements not defined by the ISO 19162 standard.</li> |
| <li><a href="#toString()"><code>toString()</code></a> returns a WKT with some redundant information omitted and some constraints relaxed. |
| This method never throw <code>UnformattableObjectException</code>; |
| it will rather use non-standard representation if necessary.</li> |
| </ul> |
| |
| <h2 id="syntax-coloring-heading">Syntax coloring</h2> |
| A convenience <a href="#print()"><code>print()</code></a> method is provided, which is roughly equivalent to |
| <code>System.out.println(this)</code> except that syntax coloring is automatically applied |
| if the terminal seems to support the ANSI escape codes. |
| |
| <h2 id="non-standard-wkt-heading">Non-standard WKT</h2> |
| If this object cannot be formatted without violating some WKT constraints, |
| then the behavior depends on the method invoked: |
| |
| <ul> |
| <li><a href="#toWKT()"><code>toWKT()</code></a> will throw a <a href="UnformattableObjectException.html" title="class in org.apache.sis.io.wkt"><code>UnformattableObjectException</code></a>.</li> |
| <li><a href="#toString()"><code>toString()</code></a> will ignore the problem and uses non-standard elements if needed.</li> |
| <li><a href="#print()"><code>print()</code></a> will show the non-standard elements in red if syntax coloring is enabled.</li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.4</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html">WKT 2 specification</a></li> |
| <li><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/doc-files/WKT.html">Legacy WKT 1</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier</div> |
| <div class="table-header col-second">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>protected </code></div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">FormattableObject</a>()</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Default constructor.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>protected abstract <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#formatTo(org.apache.sis.io.wkt.Formatter)" class="member-name-link">formatTo</a><wbr>(<a href="Formatter.html" title="class in org.apache.sis.io.wkt">Formatter</a> formatter)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Formats the inner part of this <cite>Well Known Text</cite> (WKT) element into the given formatter.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#print()" class="member-name-link">print</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Prints a string representation of this object to the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/System.html#out" title="class or interface in java.lang" class="external-link">standard output stream</a>.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns a <cite>Well Known Text</cite> (WKT) or an alternative text representation for this object.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString(org.apache.sis.io.wkt.Convention)" class="member-name-link">toString</a><wbr>(<a href="Convention.html" title="enum class in org.apache.sis.io.wkt">Convention</a> convention)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns a <cite>Well Known Text</cite> (WKT) for this object using the specified convention.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toWKT()" class="member-name-link">toWKT</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns a strictly compliant <cite>Well Known Text</cite> (WKT) using the default convention, |
| symbols and indentation.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-Object">Methods inherited from class <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>FormattableObject</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="element-name">FormattableObject</span>()</div> |
| <div class="block">Default constructor.</div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="toWKT()"> |
| <h3>toWKT</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">toWKT</span>() |
| throws <span class="exceptions"><a href="UnformattableObjectException.html" title="class in org.apache.sis.io.wkt">UnformattableObjectException</a></span></div> |
| <div class="block">Returns a strictly compliant <cite>Well Known Text</cite> (WKT) using the default convention, |
| symbols and indentation. If this object cannot be represented in a standard way, then this |
| method throws an <a href="UnformattableObjectException.html" title="class in org.apache.sis.io.wkt"><code>UnformattableObjectException</code></a>. |
| |
| <p>By default this method formats this object according the <a href="Convention.html#WKT2"><code>Convention.WKT2</code></a> rules.</p></div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the default Well Know Text representation of this object.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="UnformattableObjectException.html" title="class in org.apache.sis.io.wkt">UnformattableObjectException</a></code> - if this object cannot be formatted as a standard WKT.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/IdentifiedObject.html#toWKT()" title="class or interface in org.opengis.referencing" class="external-link"><code>IdentifiedObject.toWKT()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toString()"> |
| <h3>toString</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">toString</span>()</div> |
| <div class="block">Returns a <cite>Well Known Text</cite> (WKT) or an alternative text representation for this object. |
| If this object cannot be represented in a standard way, then this method may fallback on non-standard |
| representation, or leave unformattable elements empty and append warnings after the WKT. |
| |
| <p>By default this method formats this object according the <a href="Convention.html#WKT2_SIMPLIFIED"><code>Convention.WKT2_SIMPLIFIED</code></a> rules, |
| except that Unicode characters are kept <i>as-is</i> (they are not converted to ASCII). |
| Consequently, the WKT is not guaranteed to be ISO 19162 compliant. |
| For stricter conformance, use <a href="#toWKT()"><code>toWKT()</code></a> instead.</p></div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a></code> in class <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>the Well Known Text (WKT) or an alternative representation of this object.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toString(org.apache.sis.io.wkt.Convention)"> |
| <h3>toString</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">toString</span><wbr><span class="parameters">(<a href="Convention.html" title="enum class in org.apache.sis.io.wkt">Convention</a> convention)</span></div> |
| <div class="block">Returns a <cite>Well Known Text</cite> (WKT) for this object using the specified convention. |
| Unicode characters are kept <i>as-is</i> (they are not converted to ASCII). |
| The returned string may contain non-standard elements or warnings |
| if this object cannot be formatted according the given convention. |
| |
| <p>For stricter conformance to ISO 19162 standard, use <a href="#toWKT()"><code>toWKT()</code></a> or <a href="WKTFormat.html" title="class in org.apache.sis.io.wkt"><code>WKTFormat</code></a> instead.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>convention</code> - the WKT convention to use.</dd> |
| <dt>Returns:</dt> |
| <dd>the Well Known Text (WKT) or a pseudo-WKT representation of this object.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="print()"> |
| <h3>print</h3> |
| <div class="member-signature"><span class="annotations"><a href="../../../../../../org.apache.sis.util/org/apache/sis/util/Debug.html" title="annotation interface in org.apache.sis.util">@Debug</a> |
| </span><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">print</span>()</div> |
| <div class="block">Prints a string representation of this object to the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/System.html#out" title="class or interface in java.lang" class="external-link">standard output stream</a>. |
| If a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Console.html" title="class or interface in java.io" class="external-link">console</a> is attached to the running JVM (i.e. if the application is run |
| from the command-line and the output is not redirected to a file) and if Apache SIS thinks that |
| the console supports the ANSI escape codes (a.k.a. X3.64), then a syntax coloring will be applied. |
| |
| <p>This is a convenience method for debugging purpose and for console applications.</p></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="formatTo(org.apache.sis.io.wkt.Formatter)"> |
| <h3>formatTo</h3> |
| <div class="member-signature"><span class="modifiers">protected abstract</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">formatTo</span><wbr><span class="parameters">(<a href="Formatter.html" title="class in org.apache.sis.io.wkt">Formatter</a> formatter)</span></div> |
| <div class="block">Formats the inner part of this <cite>Well Known Text</cite> (WKT) element into the given formatter. |
| This method is automatically invoked by <a href="WKTFormat.html" title="class in org.apache.sis.io.wkt"><code>WKTFormat</code></a> when a formattable element is found. |
| |
| <p>Keywords, opening and closing brackets shall not be formatted here. |
| For example if this formattable element is for a <code>GeodeticCRS[…]</code> element, |
| then this method shall write the content starting at the insertion point shown below:</p> |
| |
| <pre class="text"> |
| GeodeticCRS[ ] |
| ↑ |
| (insertion point)</pre> |
| |
| <h4 id="formatting-non-standard-wkt-heading">Formatting non-standard WKT</h4> |
| If the implementation cannot represent this object without violating some WKT constraints, |
| it can uses its own (non-standard) keywords but shall declare that it did so by invoking one |
| of the <code>Formatter.setInvalidWKT(…)</code> |
| methods. |
| |
| <p>Alternatively, the implementation may also have no WKT keyword for this object. |
| This happen frequently when an abstract class defines a base implementation, |
| while the keyword needs to be defined by the concrete subclasses. |
| In such case, the method in the abstract class shall return <code>null</code>.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>formatter</code> - the formatter where to format the inner content of this WKT element.</dd> |
| <dt>Returns:</dt> |
| <dd>the <a href="KeywordCase.html#CAMEL_CASE">CamelCase</a> keyword for the WKT element, or <code>null</code> if unknown.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="#toWKT()"><code>toWKT()</code></a></li> |
| <li><a href="#toString()"><code>toString()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |