abc.parser
Class TuneParser

java.lang.Object
  extended byabc.parser.AbcParserAbstract
      extended byabc.parser.TuneParser
Direct Known Subclasses:
AsynchronousTuneParser

public class TuneParser
extends AbcParserAbstract

This class provides String parsing for tunes in abc notation.


Constructor Summary
TuneParser()
          Constructs a new tune parser.
 
Method Summary
 void addListener(TuneParserListenerInterface listener)
          Adds a listener to catch events thrwon by the parser durin tune parsing.
 Tune parse(java.io.Reader abcCharStream)
          Parses the abc stream and returns the tune corresponding to the notation.
 Tune parse(java.lang.String tuneNotation)
          Parses the given string and returns the tune corresponding to the notation.
 Tune parseHeader(java.io.Reader abcCharStream)
          Parse the given stream and creates a Tune object with no score as parsing result.
 Tune parseHeader(java.lang.String tuneNotation)
          Parses the tune notation and returns only header information.
 void removeListener(TuneParserListenerInterface listener)
          Removes a listener from this parser.
 
Methods inherited from class abc.parser.AbcParserAbstract
getScanner
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TuneParser

public TuneParser()
Constructs a new tune parser.

Method Detail

parse

public Tune parse(java.lang.String tuneNotation)
Parses the given string and returns the tune corresponding to the notation.

Overrides:
parse in class AbcParserAbstract
Parameters:
tuneNotation - A tune written using ABC notation.
Returns:
The tune corresponding to the given notation.

parse

public Tune parse(java.io.Reader abcCharStream)
Parses the abc stream and returns the tune corresponding to the notation.

Overrides:
parse in class AbcParserAbstract
Parameters:
abcCharStream - An abc stream.
Returns:
The tune corresponding to the given notation.

parseHeader

public Tune parseHeader(java.lang.String tuneNotation)
Parses the tune notation and returns only header information.

Overrides:
parseHeader in class AbcParserAbstract
Parameters:
tuneNotation - A tune written using ABC notation.
Returns:
Header information corresponding to the given notation.

parseHeader

public Tune parseHeader(java.io.Reader abcCharStream)
Parse the given stream and creates a Tune object with no score as parsing result. This purpose of this method method is to provide a faster parsing when just abc header fields are needed.

Overrides:
parseHeader in class AbcParserAbstract
Parameters:
abcCharStream - A stream in abc Notation.
Returns:
An object representation with no score of the abc stream.

addListener

public void addListener(TuneParserListenerInterface listener)
Adds a listener to catch events thrwon by the parser durin tune parsing.

Overrides:
addListener in class AbcParserAbstract
Parameters:
listener - Object that implements the TuneParserListenerInterface.
See Also:
removeListener(abc.parser.TuneParserListenerInterface)

removeListener

public void removeListener(TuneParserListenerInterface listener)
Removes a listener from this parser.

Overrides:
removeListener in class AbcParserAbstract
Parameters:
listener - The listener to be removed.
See Also:
addListener(abc.parser.TuneParserListenerInterface)