Java Doc for Formatter.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) 


java.lang.Object
   org.geotools.referencing.wkt.Formatter

Formatter
public class Formatter (Code)
Format Formattable objects as Well Known Text (WKT). A formatter is constructed with a specified set of symbols. The associated with the symbols is used for querying .
since:
   2.0
version:
   $Id: Formatter.java 25477 2007-05-10 13:01:00Z desruisseaux $
author:
   Martin Desruisseaux
See Also:    Well Know Text specification
See Also:    OGC WKT Coordinate System Issues


Field Summary
 Citationauthority
     The preferred authority for object or parameter names.
 StringBufferbuffer
     The buffer in which to format.
 intbufferBase
     The starting point in the buffer.
 booleancolorEnabled
     Whatever we allow syntax coloring on ANSI X3.64 compatible terminal.
final  intindentation
     The amount of space to use in indentation, or 0 if indentation is disabled.
 Stringwarning
     Warning that may be produced during WKT formatting, or null if none.

Constructor Summary
public  Formatter()
     Creates a new instance of the formatter with the default symbols.
public  Formatter(Symbols symbols)
     Creates a new instance of the formatter.
public  Formatter(Symbols symbols, int indentation)
     Creates a new instance of the formatter with the specified indentation width. The WKT will be formatted on many lines, and the indentation width will have the value specified to this constructor.
 Formatter(Symbols symbols, NumberFormat numberFormat)
     Constructor for private use by AbstractParser.format only.

Method Summary
public  voidappend(Formattable formattable)
     Append the specified Formattable object.
public  voidappend(IdentifiedObject info)
     Append the specified OpenGIS's IdentifiedObject object.
public  voidappend(MathTransform transform)
     Append the specified math transform.
public  voidappend(CodeList code)
     Append a code list to the WKT.
public  voidappend(GeneralParameterValue parameter)
     Append a in WKT form.
public  voidappend(int number)
     Append an integer number.
public  voidappend(double number)
     Append a floating point number.
public  voidappend(Unit unit)
     Appends a unit in WKT form.
public  voidappend(String text)
     Append a character string.
public  voidclear()
     Clear this formatter.
public  UnitgetAngularUnit()
     The angular unit for formatting measures, or null for the "natural" unit of each WKT element.
public  IdentifiergetIdentifier(IdentifiedObject info)
     Returns the preferred identifier for the specified object.
public  UnitgetLinearUnit()
     The linear unit for formatting measures, or null for the "natural" unit of each WKT element. The unit for measure.
public  StringgetName(IdentifiedObject info)
     Returns the preferred name for the specified object.
final  ClassgetUnformattableClass()
     Returns the class declared by the last call to Formatter.setInvalidWKT .
public  booleanisInvalidWKT()
     Returns true if the WKT in this formatter is not strictly compliant to the WKT specification.
public static  voidmain(String[] args)
     Set the preferred indentation from the command line.
public  voidsetAngularUnit(Unit unit)
     Set the angular unit for formatting measures.
public  voidsetInvalidWKT(Class unformattable)
     Set a flag marking the current WKT as not strictly compliant to the WKT specification.
public  voidsetInvalidWKT()
     Set a flag marking the current WKT as not strictly compliant to the WKT specification.
public  voidsetLinearUnit(Unit unit)
     Set the unit for formatting linear measures.
public  StringtoString()
     Returns the WKT in its current state.

Field Detail
authority
Citation authority(Code)
The preferred authority for object or parameter names.
See Also:   AbstractParser.getAuthority
See Also:   AbstractParser.setAuthority



buffer
StringBuffer buffer(Code)
The buffer in which to format. Consider this field as private final; the only method to set the buffer to a new value is AbstractParser.format .



bufferBase
int bufferBase(Code)
The starting point in the buffer. Always 0, except when used by AbstractParser.format .



colorEnabled
boolean colorEnabled(Code)
Whatever we allow syntax coloring on ANSI X3.64 compatible terminal.
See Also:   AbstractParser.isColorEnabled
See Also:   AbstractParser.setColorEnabled



indentation
final int indentation(Code)
The amount of space to use in indentation, or 0 if indentation is disabled.



warning
String warning(Code)
Warning that may be produced during WKT formatting, or null if none.




Constructor Detail
Formatter
public Formatter()(Code)
Creates a new instance of the formatter with the default symbols.



Formatter
public Formatter(Symbols symbols)(Code)
Creates a new instance of the formatter. The whole WKT will be formatted on a single line.
Parameters:
  symbols - The symbols.



Formatter
public Formatter(Symbols symbols, int indentation)(Code)
Creates a new instance of the formatter with the specified indentation width. The WKT will be formatted on many lines, and the indentation width will have the value specified to this constructor. If the specified indentation is 0, then the whole WKT will be formatted on a single line.
Parameters:
  symbols - The symbols.
Parameters:
  indentation - The amount of spaces to use in indentation. Typical values are 2 or 4.



Formatter
Formatter(Symbols symbols, NumberFormat numberFormat)(Code)
Constructor for private use by AbstractParser.format only. This constructor help to share some objects with AbstractParser .




Method Detail
append
public void append(Formattable formattable)(Code)
Append the specified Formattable object. This method will automatically append the keyword (e.g. "GEOCS"), the name and the authority code, and will invokes formattable. (this) for completing the inner part of the WKT.
Parameters:
  formattable - The formattable object to append to the WKT.



append
public void append(IdentifiedObject info)(Code)
Append the specified OpenGIS's IdentifiedObject object.
Parameters:
  info - The info object to append to the WKT.



append
public void append(MathTransform transform)(Code)
Append the specified math transform.
Parameters:
  transform - The transform object to append to the WKT.



append
public void append(CodeList code)(Code)
Append a code list to the WKT.



append
public void append(GeneralParameterValue parameter)(Code)
Append a in WKT form. If the supplied parameter is actually a , all parameters will be inlined.



append
public void append(int number)(Code)
Append an integer number. A comma (or any other element separator) will be written before the number if needed.



append
public void append(double number)(Code)
Append a floating point number. A comma (or any other element separator) will be written before the number if needed.



append
public void append(Unit unit)(Code)
Appends a unit in WKT form. For example, append(SI.KILOMETER) can append "UNIT["km", 1000]" to the WKT.



append
public void append(String text)(Code)
Append a character string. The string will be written between quotes. A comma (or any other element separator) will be written before the string if needed.



clear
public void clear()(Code)
Clear this formatter. All properties (including and are reset to their default value. After this method call, this Formatter object is ready for formatting a new object.



getAngularUnit
public Unit getAngularUnit()(Code)
The angular unit for formatting measures, or null for the "natural" unit of each WKT element. This value is set for example by "GEOGCS", which force its enclosing "PRIMEM" to take the same units than itself. The unit for measure. Default value is null .



getIdentifier
public Identifier getIdentifier(IdentifiedObject info)(Code)
Returns the preferred identifier for the specified object. If the specified object contains an identifier from the preferred authority (usually ), then this identifier is returned. Otherwise, the first identifier is returned. If the specified object contains no identifier, then this method returns null .
Parameters:
  info - The object to looks for a preferred identifier. The preferred identifier, or null if none.
since:
   2.3



getLinearUnit
public Unit getLinearUnit()(Code)
The linear unit for formatting measures, or null for the "natural" unit of each WKT element. The unit for measure. Default value is null .



getName
public String getName(IdentifiedObject info)(Code)
Returns the preferred name for the specified object. If the specified object contains a name from the preferred authority (usually ), then this name is returned. Otherwise, the first name found is returned.
Parameters:
  info - The object to looks for a preferred name. The preferred name.



getUnformattableClass
final Class getUnformattableClass()(Code)
Returns the class declared by the last call to Formatter.setInvalidWKT .



isInvalidWKT
public boolean isInvalidWKT()(Code)
Returns true if the WKT in this formatter is not strictly compliant to the WKT specification. This method returns true if Formatter.setInvalidWKT has been invoked at least once. The action to take regarding invalid WKT is caller-dependant. For example Formattable.toString will accepts loose WKT formatting and ignore this flag, while Formattable.toWKT requires strict WKT formatting and will thrown an exception if this flag is set.



main
public static void main(String[] args)(Code)
Set the preferred indentation from the command line. This indentation is used by Formattable.toWKT when no indentation were explicitly requested. This method can be invoked from the command line using the following syntax:
java org.geotools.referencing.wkt.Formatter -indentation= <preferred indentation>



setAngularUnit
public void setAngularUnit(Unit unit)(Code)
Set the angular unit for formatting measures.
Parameters:
  unit - The new unit, or null .



setInvalidWKT
public void setInvalidWKT(Class unformattable)(Code)
Set a flag marking the current WKT as not strictly compliant to the WKT specification. This method is invoked by Formattable.formatWKT methods when the object to format is more complex than what the WKT specification allows. For example this method is invoked when an uses different unit for each axis, An application can tests Formatter.isInvalidWKT later for checking WKT validity.
Parameters:
  unformattable - The type of the component that can't be formatted,for example org.opengis.referencing.crs.EngineeringCRS.
See Also:   UnformattableObjectException.getUnformattableClass
since:
   2.4



setInvalidWKT
public void setInvalidWKT()(Code)
Set a flag marking the current WKT as not strictly compliant to the WKT specification. Formatter.setInvalidWKT(Class)



setLinearUnit
public void setLinearUnit(Unit unit)(Code)
Set the unit for formatting linear measures.
Parameters:
  unit - The new unit, or null .



toString
public String toString()(Code)
Returns the WKT in its current state.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.