org.geotoolkit.io.wkt
Class Parser

Object
  extended by Parser
Direct Known Subclasses:
MathTransformParser

public abstract class Parser
extends Object

Parses Well Known Text (WKT). Parsers are the converse of Formatter. Like the later, a parser is constructed with a given set of symbols. Parsers also need a set of factories to be used for instantiating the parsed objects.

In current version, parsers are usually not intended to be subclassed outside this package. A few exceptions exist, for example ReferencingParser.alterProperties(java.util.Map) is one of the few hooks provided for overriding.

Parsers are not synchronized. It is recommended to create separate parser instances for each thread. If multiple threads access a parser concurrently, it must be synchronized externally.

Since:
2.0
Version:
3.00
Author:
Rémi Eve (IRD), Martin Desruisseaux (IRD)
Module:
referencing/geotk-referencing (download)    View source code for this class

Method Summary
 Object parseObject(String text)
          Parses a Well Know Text (WKT).
 Object parseObject(String text, ParsePosition position)
          Parses a Well Know Text (WKT).
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseObject

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

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

parseObject

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

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


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