|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.io.gml.GMLEncoder
public class GMLEncoder
This class is a utility class for writing valid GML to a Writer
Constructor Summary | |
---|---|
GMLEncoder(java.io.Writer writer)
Creates a new instance of GMLEncoder |
Method Summary | |
---|---|
void |
addAttribute(java.lang.String key,
boolean value)
Writes a key value pair, where the value is a boolean value. |
void |
addAttribute(java.lang.String key,
double value)
Writes a key value pair, where the value is a double. |
void |
addAttribute(java.lang.String key,
int value)
Writes a key value pair, where the value is an integer. |
void |
addAttribute(java.lang.String key,
java.lang.Number value)
Writes a key value pair, where the value is a Number in String format. |
void |
addAttribute(java.lang.String key,
java.lang.Object value)
Writes a key value pair, where the value is an object. |
void |
addAttribute(java.lang.String key,
java.lang.String value)
Writes a key value pair, where the value is a string. |
void |
addAttributes(java.lang.String key,
java.lang.String itemName,
java.util.Collection items)
Writes a named collection to the file by calling addAttribute(String, Object)
for each entry in items . |
void |
beginSection(java.lang.String sectionName)
Writes the start tag for a given section. |
void |
endSection()
Writes the closing tag for a section opened with beginSection(String) |
int |
getLevel()
Getter for property level. |
protected java.lang.String |
sanatize(java.lang.String s)
Encodes the string to be valid GML, escaping invalid characters accordingly. |
protected void |
writeAttribute(java.lang.String key,
java.lang.String value)
Writes a key value pair, where the value is a string. |
protected void |
writeIndentation()
Writes the current indentation to the writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GMLEncoder(java.io.Writer writer)
Method Detail |
---|
protected void writeIndentation() throws java.io.IOException
java.io.IOException
public void beginSection(java.lang.String sectionName) throws java.io.IOException
java.io.IOException
protected void writeAttribute(java.lang.String key, java.lang.String value) throws java.io.IOException
java.io.IOException
public void addAttribute(java.lang.String key, double value) throws java.io.IOException
java.io.IOException
public void addAttribute(java.lang.String key, int value) throws java.io.IOException
java.io.IOException
public void addAttribute(java.lang.String key, java.lang.Number value) throws java.io.IOException
java.io.IOException
public void addAttribute(java.lang.String key, boolean value) throws java.io.IOException
java.io.IOException
public void addAttribute(java.lang.String key, java.lang.String value) throws java.io.IOException
java.io.IOException
public void addAttribute(java.lang.String key, java.lang.Object value) throws java.io.IOException
java.io.IOException
public void addAttributes(java.lang.String key, java.lang.String itemName, java.util.Collection items) throws java.io.IOException
addAttribute(String, Object)
for each entry in items
.
java.io.IOException
protected java.lang.String sanatize(java.lang.String s)
public void endSection() throws java.io.IOException
beginSection(String)
java.io.IOException
public int getLevel()
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |