y.io.gml
Class GMLTokenizer.EncoderCallback

java.lang.Object
  |
  +--y.io.gml.GMLTokenizer.EncoderCallback
All Implemented Interfaces:
GMLTokenizer.Callback
Enclosing class:
GMLTokenizer

public static final class GMLTokenizer.EncoderCallback
extends Object
implements GMLTokenizer.Callback

An implementation of the callback, which will call the appropriate methods on an encoder. Can be used for transcoding purposes


Constructor Summary
GMLTokenizer.EncoderCallback(GMLEncoder enc)
          constructs a new Transcoder
 
Method Summary
 void attribute(String key, Number value)
          invoked when a numeric attribute was encountered
 void attribute(String key, String value)
          invoked when a string attributes was encountered
 void beginScope(String scopeName)
          called when a new gml scope begins '['
 void endScope(String scopeName)
          called when a scope is left
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GMLTokenizer.EncoderCallback

public GMLTokenizer.EncoderCallback(GMLEncoder enc)
constructs a new Transcoder

Parameters:
enc - the encoder
Method Detail

beginScope

public void beginScope(String scopeName)
Description copied from interface: GMLTokenizer.Callback
called when a new gml scope begins '['

Specified by:
beginScope in interface GMLTokenizer.Callback
Parameters:
scopeName - the name of the scope

endScope

public void endScope(String scopeName)
Description copied from interface: GMLTokenizer.Callback
called when a scope is left

Specified by:
endScope in interface GMLTokenizer.Callback
Parameters:
scopeName - the name of the scope which was left

attribute

public void attribute(String key,
                      String value)
Description copied from interface: GMLTokenizer.Callback
invoked when a string attributes was encountered

Specified by:
attribute in interface GMLTokenizer.Callback
Parameters:
key - the key of the attribute value pair
value - the string value

attribute

public void attribute(String key,
                      Number value)
Description copied from interface: GMLTokenizer.Callback
invoked when a numeric attribute was encountered

Specified by:
attribute in interface GMLTokenizer.Callback
Parameters:
key - the key of the attribute value pair
value - the numeric value

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

2003