congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Formatter.getLocale
Code IndexAdd Tabnine to your IDE (free)

How to use
getLocale
method
in
org.apache.sis.io.wkt.Formatter

Best Java code snippets using org.apache.sis.io.wkt.Formatter.getLocale (Showing top 7 results out of 315)

origin: apache/sis

  /** Formats the sub-element. */
  @Override
  protected String formatTo(final Formatter formatter) {
    formatter.append(value != null ? value.toString(formatter.getLocale()) : null, null);
    return name;
  }
}
origin: org.apache.sis.core/sis-referencing

/**
 * Appends the name of the given object to the formatter.
 *
 * @param  object     the object from which to get the name.
 * @param  formatter  the formatter where to append the name.
 * @param  type       the key of colors to apply if syntax colors are enabled.
 */
public static void appendName(final IdentifiedObject object, final Formatter formatter, final ElementKind type) {
  String name = IdentifiedObjects.getName(object, formatter.getNameAuthority());
  if (name == null) {
    name = IdentifiedObjects.getName(object, null);
    if (name == null) {
      name = Vocabulary.getResources(formatter.getLocale()).getString(Vocabulary.Keys.Unnamed);
    }
  }
  formatter.append(name, (type != null) ? type : ElementKind.NAME);
}
origin: apache/sis

/**
 * Appends the name of the given object to the formatter.
 *
 * @param  object     the object from which to get the name.
 * @param  formatter  the formatter where to append the name.
 * @param  type       the key of colors to apply if syntax colors are enabled.
 */
public static void appendName(final IdentifiedObject object, final Formatter formatter, final ElementKind type) {
  String name = IdentifiedObjects.getName(object, formatter.getNameAuthority());
  if (name == null) {
    name = IdentifiedObjects.getName(object, null);
    if (name == null) {
      name = Vocabulary.getResources(formatter.getLocale()).getString(Vocabulary.Keys.Unnamed);
    }
  }
  formatter.append(name, (type != null) ? type : ElementKind.NAME);
}
origin: org.apache.sis.core/sis-referencing

  /**
   * Formats this formula as a pseudo-<cite>Well Known Text</cite> element.
   *
   * <div class="note"><b>Compatibility note:</b>
   * ISO 19162 does not define a WKT representation for {@code Formula} objects.
   * The text formatted by this method is SIS-specific and causes the text to be
   * flagged as {@linkplain Formatter#setInvalidWKT(Class, Exception) invalid WKT}.
   * The WKT content of this element may change in any future SIS version.</div>
   *
   * @return {@code "Formula"}.
   */
  @Override
  protected String formatTo(final Formatter formatter) {
    InternationalString text = null;
    final Citation citation = getCitation();    // Gives to users a chance to override properties.
    if (citation != null) {
      text = citation.getTitle();
    }
    if (text == null) {
      text = getFormula();
    }
    if (text != null) {
      formatter.append(text.toString(formatter.getLocale()), ElementKind.REMARKS);
    }
    formatter.setInvalidWKT(Formula.class, null);
    return WKTKeywords.Formula;
  }
}
origin: apache/sis

  /**
   * Formats this formula as a pseudo-<cite>Well Known Text</cite> element.
   *
   * <div class="note"><b>Compatibility note:</b>
   * ISO 19162 does not define a WKT representation for {@code Formula} objects.
   * The text formatted by this method is SIS-specific and causes the text to be
   * flagged as {@linkplain Formatter#setInvalidWKT(Class, Exception) invalid WKT}.
   * The WKT content of this element may change in any future SIS version.</div>
   *
   * @return {@code "Formula"}.
   */
  @Override
  protected String formatTo(final Formatter formatter) {
    InternationalString text = null;
    final Citation citation = getCitation();    // Gives to users a chance to override properties.
    if (citation != null) {
      text = citation.getTitle();
    }
    if (text == null) {
      text = getFormula();
    }
    if (text != null) {
      formatter.append(text.toString(formatter.getLocale()), ElementKind.REMARKS);
    }
    formatter.setInvalidWKT(Formula.class, null);
    return WKTKeywords.Formula;
  }
}
origin: org.apache.sis.core/sis-referencing

name = IdentifiedObjects.getName(this, null);
if (name == null) {
  name = Vocabulary.getResources(formatter.getLocale()).getString(Vocabulary.Keys.Unnamed);
origin: apache/sis

name = IdentifiedObjects.getName(this, null);
if (name == null) {
  name = Vocabulary.getResources(formatter.getLocale()).getString(Vocabulary.Keys.Unnamed);
org.apache.sis.io.wktFormattergetLocale

Javadoc

Returns the locale to use for localizing InternationalString instances. This is not the locale for formatting dates and numbers.

Popular methods of Formatter

  • append
    Appends rows of numbers. Each number is separated by a space, and each row is separated by a comma.
  • newLine
    Request a line separator before the next element to format. Invoking this method before any append(…
  • <init>
    Creates a new formatter instance with the specified convention, symbols and indentation.
  • appendAny
    Appends an object or an array of objects. This method performs the following choices: * If the given
  • getConvention
    Returns the convention to use for formatting the WKT. The default is Convention#WKT2.
  • getEnclosingElement
    Returns the enclosing WKT element, or null if element being formatted is the root. This method can b
  • indent
    Increases or decreases the indentation. A value of +1 increases the indentation by the amount of spa
  • setInvalidWKT
    Marks the current WKT representation of the given object as not strictly compliant with the WKT spec
  • toWKT
    Returns the WKT formatted by this object.
  • addContextualUnit
    Adds a unit to use for the next measurements of the quantity Q. The given unit will apply to all WKT
  • appendComplement
    Appends the optional complementary attributes common to many IdentifiedObject subtypes. Those attrib
  • appendElement
    Tries to append an object of the KEYWORD[something] form. The given value is typically, but not nece
  • appendComplement,
  • appendElement,
  • appendExact,
  • appendForSubtypes,
  • appendOnNewLine,
  • appendPreset,
  • appendSeparator,
  • appendTemporalExtent,
  • appendValue

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • JCheckBox (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now