org.geotools.resources
Class WKTFormat

java.lang.Object
  extended byjava.text.Format
      extended byorg.geotools.resources.WKTFormat
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

Deprecated. Rempaced by org.geotools.referencing.wkt.AbstractFormat.

public abstract class WKTFormat
extends java.text.Format

The base class for Well Know Text (WKT) parser and formatter. This base class contains information about the symbols to use (opening and closing bracket, element separator, etc.). This is a relatively light object compared to their subclasses and can be used when parsing are not needed.

Version:
$Id: WKTFormat.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Remi Eve, Martin Desruisseaux
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.text.Format
java.text.Format.Field
 
Field Summary
 char closingBracket
          Deprecated. The character to use for closing element's parameters.
 char elementSeparator
          Deprecated. The character to use as an element separator.
 java.util.Locale locale
          Deprecated. The locale for number parsing and formatting.
 java.text.NumberFormat number
          Deprecated. The object to use for parsing and formatting numbers.
 char openingBracket
          Deprecated. The character to use for openining element's parameters.
 char textDelimitor
          Deprecated. The character to use as text delimitor.
 
Constructor Summary
WKTFormat(java.util.Locale locale)
          Deprecated. Construct a format for the specified locale.
 
Method Summary
protected  WKTElement getTree(java.lang.String text, java.text.ParsePosition position)
          Deprecated. Returns a tree of WKTElement for the specified text.
protected abstract  java.lang.Object parse(WKTElement element)
          Deprecated. Parses the next element in the specified Well Know Text (WKT) tree.
 java.lang.Object parseObject(java.lang.String text)
          Deprecated. Parses a Well Know Text (WKT).
 java.lang.Object parseObject(java.lang.String text, java.text.ParsePosition position)
          Deprecated. Parses a Well Know Text (WKT).
 
Methods inherited from class java.text.Format
clone, format, format, formatToCharacterIterator
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locale

public final java.util.Locale locale
Deprecated. 
The locale for number parsing and formatting.


number

public final java.text.NumberFormat number
Deprecated. 
The object to use for parsing and formatting numbers. Note: NumberFormat object are usually not thread safe. Consider using this format in a synchronized block if thread safe behavior is wanted.


elementSeparator

public final char elementSeparator
Deprecated. 
The character to use as an element separator. This is usually the coma ','.


textDelimitor

public final char textDelimitor
Deprecated. 
The character to use as text delimitor. This is usually the quote '"'.

See Also:
Constant Field Values

openingBracket

public final char openingBracket
Deprecated. 
The character to use for openining element's parameters. This is usually '[' or '('. This character is used for formatting WKT.

See Also:
Constant Field Values

closingBracket

public final char closingBracket
Deprecated. 
The character to use for closing element's parameters. This is usually ']' or ')'. This character is used for formatting WKT.

See Also:
Constant Field Values
Constructor Detail

WKTFormat

public WKTFormat(java.util.Locale locale)
Deprecated. 
Construct a format for the specified locale.

Parameters:
locale - The locale for parsing and formatting numbers.
Method Detail

getTree

protected final WKTElement getTree(java.lang.String text,
                                   java.text.ParsePosition position)
                            throws java.text.ParseException
Deprecated. 
Returns a tree of WKTElement for the specified text.

Parameters:
text - The text to parse.
position - In input, the position where to start parsing from. In output, the first character after the separator.
Throws:
java.text.ParseException

parse

protected abstract java.lang.Object parse(WKTElement element)
                                   throws java.text.ParseException
Deprecated. 
Parses the next element in the specified Well Know Text (WKT) tree.

Parameters:
element - The element to be parsed.
Returns:
The object.
Throws:
java.text.ParseException - if the element can't be parsed.

parseObject

public final java.lang.Object parseObject(java.lang.String text)
                                   throws java.text.ParseException
Deprecated. 
Parses a Well Know Text (WKT).

Parameters:
text - The text to be parsed.
Returns:
The object.
Throws:
java.text.ParseException - if the string can't be parsed.

parseObject

public final java.lang.Object parseObject(java.lang.String text,
                                          java.text.ParsePosition position)
Deprecated. 
Parses a Well Know Text (WKT).

Parameters:
text - The text to be parsed.
position - The position to start parsing from.
Returns:
The object.


Copyright © GeoTools. All Rights Reserved.