y.io.gml
Class GMLEncoder

java.lang.Object
  |
  +--y.io.gml.GMLEncoder

public class GMLEncoder
extends Object

This class is a utility class for writing valid GML to a Writer


Constructor Summary
GMLEncoder(Writer writer)
          Creates a new instance of GMLEncoder
 
Method Summary
 void addAttribute(String key, boolean value)
           
 void addAttribute(String key, double value)
           
 void addAttribute(String key, int value)
           
 void addAttribute(String key, Number value)
           
 void addAttribute(String key, Object value)
           
 void addAttribute(String key, String value)
           
 void addAttributes(String key, String itemName, Collection items)
           
 void beginSection(String sectionName)
           
 void endSection()
           
 int getLevel()
          Getter for property level.
protected  String sanatize(String s)
           
protected  void writeAttribute(String key, String value)
           
protected  void writeIndentation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GMLEncoder

public GMLEncoder(Writer writer)
Creates a new instance of GMLEncoder

Method Detail

writeIndentation

protected void writeIndentation()
                         throws IOException
IOException

beginSection

public void beginSection(String sectionName)
                  throws IOException
IOException

writeAttribute

protected void writeAttribute(String key,
                              String value)
                       throws IOException
IOException

addAttribute

public void addAttribute(String key,
                         double value)
                  throws IOException
IOException

addAttribute

public void addAttribute(String key,
                         int value)
                  throws IOException
IOException

addAttribute

public void addAttribute(String key,
                         Number value)
                  throws IOException
IOException

addAttribute

public void addAttribute(String key,
                         boolean value)
                  throws IOException
IOException

addAttribute

public void addAttribute(String key,
                         String value)
                  throws IOException
IOException

addAttribute

public void addAttribute(String key,
                         Object value)
                  throws IOException
IOException

addAttributes

public void addAttributes(String key,
                          String itemName,
                          Collection items)
                   throws IOException
IOException

sanatize

protected String sanatize(String s)

endSection

public void endSection()
                throws IOException
IOException

getLevel

public int getLevel()
Getter for property level.

Returns:
Value of property level.

© Copyright 2000-2003,
yWorks GmbH.
All rights reserved.

2003