Class PortfolioParser

  extended by org.opensha.sra.gui.portfolioeal.PortfolioParser

public class PortfolioParser
extends java.lang.Object

This class parses a well-formatted portfolio file and turns it in to Asset objects. These Assets in turn are used by the PortfolioEALCalculatorController to make EAL calculations. A standard portfolio file should be a csv file. Each value may also have one set of quotations, to allow for slightly different formats.

Jeremy Leakakos
See Also:
Asset, Portfolio

Constructor Summary
          The default constructor for the class.
Method Summary
 java.util.ArrayList<Asset> scanFile( portfolioFile)
          This method scans and parses the file in the portfolio.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public PortfolioParser()
The default constructor for the class.

Method Detail


public java.util.ArrayList<Asset> scanFile( portfolioFile)
                                    throws java.lang.NumberFormatException
This method scans and parses the file in the portfolio. It breaks the file up by line, with each line being a separate Asset. The first line defines the parameters that will be stored in each asset. The Clone() method defined in Asset is used to allow for easy creation of assets with arbitrary parameters.