Search this API

y.io.gml
Class GMLTokenizer.EncoderCallback

java.lang.Object
  extended by y.io.gml.GMLTokenizer.EncoderCallback
All Implemented Interfaces:
GMLTokenizer.Callback
Enclosing class:
GMLTokenizer

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

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

 
Your browser does not support SVG content.

Constructor Summary
GMLTokenizer.EncoderCallback(GMLEncoder enc)
          constructs a new Transcoder
 
Method Summary
 void attribute(java.lang.String key, java.lang.Number value)
          invoked when a numeric attribute was encountered
 void attribute(java.lang.String key, java.lang.String value)
          invoked when a string attributes was encountered
 void beginScope(java.lang.String scopeName)
          called when a new gml scope begins '['
 void endScope(java.lang.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(java.lang.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(java.lang.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(java.lang.String key,
                      java.lang.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(java.lang.String key,
                      java.lang.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-2022,
yWorks GmbH.
All rights reserved.