Java Doc for Parser.java in  » GIS » GeoTools-2.4.1 » org » geotools » referencing » wkt » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.referencing.wkt 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.geotools.referencing.wkt.AbstractParser
   org.geotools.referencing.wkt.MathTransformParser
      org.geotools.referencing.wkt.Parser

Parser
public class Parser extends MathTransformParser (Code)
Parser for Well Known Text (WKT). This parser can parse objects as well, which is part of the WKT's FITTED_CS element.
since:
   2.0
version:
   $Id: Parser.java 27520 2007-10-16 19:00:52Z desruisseaux $
author:
   Remi Eve
author:
   Martin Desruisseaux
See Also:    Well Know Text specification
See Also:    OGC WKT Coordinate System Issues


Field Summary
final protected  CRSFactorycrsFactory
     The factory to use for creating .
final protected  CSFactorycsFactory
     The factory to use for creating .
final protected  DatumFactorydatumFactory
     The factory to use for creating .

Constructor Summary
public  Parser()
     Constructs a parser using the default set of symbols and factories.
public  Parser(Symbols symbols)
     Constructs a parser for the specified set of symbols using default factories.
public  Parser(Symbols symbols, ReferencingFactoryContainer factories)
     Constructs a parser for the specified set of symbols using the specified set of factories.
public  Parser(Symbols symbols, DatumFactory datumFactory, CSFactory csFactory, CRSFactory crsFactory, MathTransformFactory mtFactory)
     Constructs a parser for the specified set of symbols using the specified factories.

Method Summary
protected  MapalterProperties(Map properties)
     Returns the properties to be given to the parsed object.
public static  ClassgetClassOf(String element)
     Returns the class of the specified WKT element.
public static  StringgetNameOf(Class type)
     Returns the WKT name of the specified object type.
public static  voidmain(String[] args)
     Read WKT strings from the and reformat them to the .
protected  Objectparse(Element element)
     Parses the next element in the specified Well Know Text (WKT) tree.
Parameters:
  element - The element to be parsed.
public  CoordinateReferenceSystemparseCoordinateReferenceSystem(String text)
     Parses a coordinate reference system element.
Parameters:
  text - The text to be parsed.

Field Detail
crsFactory
final protected CRSFactory crsFactory(Code)
The factory to use for creating .



csFactory
final protected CSFactory csFactory(Code)
The factory to use for creating .



datumFactory
final protected DatumFactory datumFactory(Code)
The factory to use for creating .




Constructor Detail
Parser
public Parser()(Code)
Constructs a parser using the default set of symbols and factories.



Parser
public Parser(Symbols symbols)(Code)
Constructs a parser for the specified set of symbols using default factories.
Parameters:
  symbols - The symbols for parsing and formatting numbers.



Parser
public Parser(Symbols symbols, ReferencingFactoryContainer factories)(Code)
Constructs a parser for the specified set of symbols using the specified set of factories.
Parameters:
  symbols - The symbols for parsing and formatting numbers.
Parameters:
  factories - The factories to use.



Parser
public Parser(Symbols symbols, DatumFactory datumFactory, CSFactory csFactory, CRSFactory crsFactory, MathTransformFactory mtFactory)(Code)
Constructs a parser for the specified set of symbols using the specified factories.
Parameters:
  symbols - The symbols for parsing and formatting numbers.
Parameters:
  datumFactory - The factory to use for creating .
Parameters:
  csFactory - The factory to use for creating .
Parameters:
  crsFactory - The factory to use for creating .
Parameters:
  mtFactory - The factory to use for creating objects.




Method Detail
alterProperties
protected Map alterProperties(Map properties)(Code)
Returns the properties to be given to the parsed object. This method is invoked automatically by the parser for the only. This method expect on input the properties parsed from the AUTHORITY element, and returns on output the properties to give to the object to be created. The default implementation returns the properties map unchanged. Subclasses may override this method in order to add or change properties.

Example: if a subclass want to add automatically an authority code when no AUTHORITY element was explicitly set in the WKT, then it may test for the IdentifiedObject.IDENTIFIERS_KEY key and add automatically an entry if this key was missing.
Parameters:
  properties - The properties parsed from the WKT file. Entries can be added, removedor modified directly in this map. The properties to be given to the parsed object. This is usually properties (maybe after modifications), but could also be a new map.
since:
   2.3




getClassOf
public static Class getClassOf(String element)(Code)
Returns the class of the specified WKT element. For example this method returns .class for element " PROJCS ".
Parameters:
  element - The WKT element name. The GeoAPI class of the specified element, or null if unknow.



getNameOf
public static String getNameOf(Class type)(Code)
Returns the WKT name of the specified object type. For example this method returns " PROJCS " for type .class.
Parameters:
  type - The GeoAPI class of the specified element. The WKT element name, or null if unknow.
since:
   2.4



main
public static void main(String[] args)(Code)
Read WKT strings from the and reformat them to the . The input is read until it reach the end-of-file ( [Ctrl-Z] if reading from the keyboard), or until an unparsable WKT has been hit. Optional arguments are:
-authority <name>  The authority to prefer when choosing WKT entities names.
-indentation <value>  Set the indentation (0 for output on a single line)
-encoding <code>  Set the character encoding
-locale <language>  Set the language for the output (e.g. "fr" for French)



parse
protected Object parse(Element element) throws ParseException(Code)
Parses the next element in the specified Well Know Text (WKT) tree.
Parameters:
  element - The element to be parsed. The object.
throws:
  ParseException - if the element can't be parsed. switch



parseCoordinateReferenceSystem
public CoordinateReferenceSystem parseCoordinateReferenceSystem(String text) throws ParseException(Code)
Parses a coordinate reference system element.
Parameters:
  text - The text to be parsed. The coordinate reference system.
throws:
  ParseException - if the string can't be parsed.



Fields inherited from org.geotools.referencing.wkt.MathTransformParser
final protected MathTransformFactory mtFactory(Code)(Java Doc)

Methods inherited from org.geotools.referencing.wkt.MathTransformParser
final OperationMethod getOperationMethod()(Code)(Java Doc)
protected Object parse(Element element) throws ParseException(Code)(Java Doc)
public MathTransform parseMathTransform(String text) throws ParseException(Code)(Java Doc)
final MathTransform parseMathTransform(Element element, boolean required) throws ParseException(Code)(Java Doc)

Fields inherited from org.geotools.referencing.wkt.AbstractParser
final Symbols symbols(Code)(Java Doc)

Methods inherited from org.geotools.referencing.wkt.AbstractParser
public StringBuffer format(Object object, StringBuffer toAppendTo, FieldPosition pos)(Code)(Java Doc)
public Citation getAuthority()(Code)(Java Doc)
final protected Element getTree(String text, ParsePosition position) throws ParseException(Code)(Java Doc)
public String getWarning()(Code)(Java Doc)
public boolean isColorEnabled()(Code)(Java Doc)
abstract protected Object parse(Element element) throws ParseException(Code)(Java Doc)
final Number parseNumber(String text, ParsePosition position)(Code)(Java Doc)
final public Object parseObject(String text) throws ParseException(Code)(Java Doc)
final public Object parseObject(String text, ParsePosition position)(Code)(Java Doc)
public void reformat(BufferedReader in, Writer out, PrintWriter err) throws IOException(Code)(Java Doc)
static void reportError(PrintWriter err, String line, int errorOffset)(Code)(Java Doc)
public void setAuthority(Citation authority)(Code)(Java Doc)
public void setColorEnabled(boolean enabled)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.