ptolemy.hsif
Class HSIFUtilities

java.lang.Object
  extended byptolemy.hsif.HSIFUtilities

public class HSIFUtilities
extends java.lang.Object

Utilities methods for operating on HSIF files. These methods are in a separate non-graphical class so that we can test them as part of the nightly build, or provide non-graphical tools that use these methods

Since:
Ptolemy II 2.2
Version:
$Id: HSIFUtilities.java,v 1.18 2004/04/25 20:32:56 cxh Exp $
Author:
Christopher Hylands
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (eal)

Method Summary
static void HSIFToMoML(java.lang.String input, java.io.FileWriter fileWriter)
          Read in an HSIF file, transform it into MoML and write the output to a FileWriter.
static void HSIFToMoML(java.lang.String input, java.lang.String output)
          Read in an HSIF file, transform it into MoML and generate an output file.
static void main(java.lang.String[] args)
          Convert the first argument from a HSIF file into a MoML file named by the second argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

HSIFToMoML

public static void HSIFToMoML(java.lang.String input,
                              java.io.FileWriter fileWriter)
                       throws java.lang.Exception
Read in an HSIF file, transform it into MoML and write the output to a FileWriter.

Parameters:
input - HSIF file to be read in.
fileWriter - A FileWriter that will write to the MoML file.
Throws:
java.lang.Exception - If there is a problem with the transformation.

HSIFToMoML

public static void HSIFToMoML(java.lang.String input,
                              java.lang.String output)
                       throws java.lang.Exception
Read in an HSIF file, transform it into MoML and generate an output file. Note that if the output file exists, then it is overwritten.

Parameters:
input - HSIF file to be read in
output - The MoMLFile to be generated.
Throws:
java.lang.Exception - If there is a problem with the transformation.

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Convert the first argument from a HSIF file into a MoML file named by the second argument. For example
  java -classpath $PTII ptolemy.hsif.HSIFUtilities \
       $PTII/ptolemy/hsif/demo/SwimmingPool/SwimmingPool.xml \
       /tmp/SwimmingPool_moml.xml
  
will read in SwimmingPool.xml and create SwimmingPool_moml.xml

Throws:
java.lang.Exception