org.opensha.sha.calc.hazardMap.components
Class AsciiFileCurveArchiver
java.lang.Object
org.opensha.sha.calc.hazardMap.components.AsciiFileCurveArchiver
- All Implemented Interfaces:
- XMLSaveable, CurveResultsArchiver
public class AsciiFileCurveArchiver
- extends Object
- implements CurveResultsArchiver
This class writes hazard curves to simple output files.
- Author:
- kevin
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XML_METADATA_NAME
public static final String XML_METADATA_NAME
- See Also:
- Constant Field Values
AsciiFileCurveArchiver
public AsciiFileCurveArchiver(String outputDir,
boolean binByLat,
boolean binByLon)
throws IOException
- Parameters:
outputDir - - directory where curves will be storedbinByLat - - if true, curves will be put in subdirectories for each
latitude value. This prevents directories from getting too large
(storing too many files) for big calculatoinsbinByLon - - same as binByLat but for longitude
- Throws:
IOException
archiveCurve
public void archiveCurve(ArbitrarilyDiscretizedFunc curve,
CurveMetadata meta)
throws IOException
- Description copied from interface:
CurveResultsArchiver
- This stores the curve for the given site.
- Specified by:
archiveCurve in interface CurveResultsArchiver
- Parameters:
curve - - the curve itselfmeta - - curve metadata
- Throws:
IOException
getOutputDir
public String getOutputDir()
setOutputDir
public void setOutputDir(String outputDir)
throws IOException
- Throws:
IOException
toXMLMetadata
public Element toXMLMetadata(Element root)
- Specified by:
toXMLMetadata in interface XMLSaveable
fromXMLMetadata
public static AsciiFileCurveArchiver fromXMLMetadata(Element archiverEl)
throws IOException
- Throws:
IOException
isCurveCalculated
public boolean isCurveCalculated(CurveMetadata meta,
ArbitrarilyDiscretizedFunc xVals)
- Description copied from interface:
CurveResultsArchiver
- Returns true if the given curve has already been calculated and archived
- Specified by:
isCurveCalculated in interface CurveResultsArchiver
- Returns:
getStoreDir
public File getStoreDir()
- Description copied from interface:
CurveResultsArchiver
- Return the store dir if applicable (null otherwise) for this archiver.
- Specified by:
getStoreDir in interface CurveResultsArchiver
- Returns: