org.geotoolkit.io.wkt
Class Symbols

Object
  extended by Symbols
All Implemented Interfaces:
Serializable

@Immutable
public class Symbols
extends Object
implements Serializable

The set of symbols to use for Well Known Text (WKT) parsing and formatting. The default setting in new Symbols objects is to format WKT elements with square brackets, as in DATUM["WGS84"]. However the WKT specification permits also curly brackets as in DATUM("WGS84").

Since:
2.1
Version:
3.00
Author:
Martin Desruisseaux (IRD)
See Also:
Serialized Form
Module:
referencing/geotk-referencing (download)    View source code for this class

Field Summary
static Symbols CURLY_BRACKETS
          A set of symbols with parameters between parentheses, like DATUM("WGS84").
static Symbols DEFAULT
          The default set of symbols.
static Symbols SQUARE_BRACKETS
          A set of symbols with parameters between square brackets, like DATUM["WGS84"].
 
Constructor Summary
Symbols(Locale locale)
          Creates a new set of symbols for the specified locale.
 
Method Summary
 boolean containsAxis(CharSequence wkt)
          Returns true if the specified WKT contains at least one AXIS[...] element.
 char[] getClosingBrackets()
          Returns the list of caracters acceptable as closing bracket.
 char[] getOpeningBrackets()
          Returns the list of caracters acceptable as opening bracket.
 char getQuote()
          Returns the character used for quoting texts.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SQUARE_BRACKETS

public static final Symbols SQUARE_BRACKETS
A set of symbols with parameters between square brackets, like DATUM["WGS84"]. This is the most frequent WKT format.


CURLY_BRACKETS

public static final Symbols CURLY_BRACKETS
A set of symbols with parameters between parentheses, like DATUM("WGS84"). This is a less frequent but legal WKT format.


DEFAULT

public static final Symbols DEFAULT
The default set of symbols.

Constructor Detail

Symbols

public Symbols(Locale locale)
Creates a new set of symbols for the specified locale.

Parameters:
locale - The locale for number formatting.
Method Detail

getOpeningBrackets

public final char[] getOpeningBrackets()
Returns the list of caracters acceptable as opening bracket. The closing bracket must be the character in the closingBrackets array at the same index than the opening bracket.

Returns:
The characters acceptable as opening bracket.
Since:
3.00

getClosingBrackets

public final char[] getClosingBrackets()
Returns the list of caracters acceptable as closing bracket. The opening bracket must be the character in the openingBrackets array at the same index than the closing bracket.

Returns:
The characters acceptable as closing bracket.
Since:
3.00

getQuote

public final char getQuote()
Returns the character used for quoting texts. This is usually '"'.

Returns:
The character used for quoting texts
Since:
3.00

containsAxis

public boolean containsAxis(CharSequence wkt)
Returns true if the specified WKT contains at least one AXIS[...] element. This method tries to make a quick check taking in account a minimal set of WKT syntax rules.

Parameters:
wkt - The WKT to inspect.
Returns:
true if the given WKT contains at least one AXIS element.
Since:
2.4


Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.