com.softsynth.jmsl.score
Class ScoreXMLLoader

java.lang.Object
  extended by com.softsynth.jmsl.score.ScoreXMLLoader
All Implemented Interfaces:
NewXMLObjectListener, XMLListener

public class ScoreXMLLoader
extends java.lang.Object
implements XMLListener, NewXMLObjectListener

Author:
Nick Didkovsky, copyright 2000 Nick Didkovsky, all rights reserved

Field Summary
static boolean verbose
           
 
Constructor Summary
ScoreXMLLoader()
           
 
Method Summary
 void addScoreLoaderListener(ScoreLoaderListener listener)
           
 void beginElement(java.lang.String tag, java.util.Hashtable attributes, boolean ifEmpty)
          Handles the start of an element.
 void endElement(java.lang.String tag)
          Handles the end of an element.
 void foundContent(java.lang.String content)
          Handles the content of an element.
 void handleNewXMLObject(java.lang.String tag, java.lang.Object obj)
           
 Score loadXML(java.io.InputStream stream)
           
 Score loadXML(java.lang.String fileName)
           
 Score loadXML(java.net.URL url)
           
 Score loadXMLFromZip(java.io.InputStream inputStream)
          Read a score file from a zip archive.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

verbose

public static boolean verbose
Constructor Detail

ScoreXMLLoader

public ScoreXMLLoader()
Method Detail

addScoreLoaderListener

public void addScoreLoaderListener(ScoreLoaderListener listener)

loadXML

public Score loadXML(java.lang.String fileName)
              throws java.io.IOException
Throws:
java.io.IOException

loadXML

public Score loadXML(java.net.URL url)
              throws java.io.IOException
Throws:
java.io.IOException

loadXMLFromZip

public Score loadXMLFromZip(java.io.InputStream inputStream)
                     throws java.io.IOException
Read a score file from a zip archive. InputStream points to that zip archive.

Throws:
java.io.IOException

loadXML

public Score loadXML(java.io.InputStream stream)
              throws java.io.IOException
Throws:
java.io.IOException

beginElement

public void beginElement(java.lang.String tag,
                         java.util.Hashtable attributes,
                         boolean ifEmpty)
Description copied from interface: XMLListener
Handles the start of an element. The flag ifEmpty if there is no content or endTag.

Specified by:
beginElement in interface XMLListener

foundContent

public void foundContent(java.lang.String content)
Description copied from interface: XMLListener
Handles the content of an element.

Specified by:
foundContent in interface XMLListener

endElement

public void endElement(java.lang.String tag)
Description copied from interface: XMLListener
Handles the end of an element.

Specified by:
endElement in interface XMLListener

handleNewXMLObject

public void handleNewXMLObject(java.lang.String tag,
                               java.lang.Object obj)
Specified by:
handleNewXMLObject in interface NewXMLObjectListener

main

public static void main(java.lang.String[] args)