public class Utility
extends java.lang.Object
Constructor and Description |
---|
Utility() |
Modifier and Type | Method and Description |
---|---|
static java.io.File |
createOutputFile(java.io.File file,
java.io.File outputDir,
java.lang.String format) |
static java.io.File |
createOutputFile(java.io.File file,
java.io.File outputDir,
java.lang.String format,
int index) |
static void |
exec(java.io.File program,
java.lang.String[] args) |
static void |
generate(java.io.File target,
java.io.File outputFile,
java.lang.String templateName) |
static void |
generate(java.io.File target,
java.io.File outputFile,
java.lang.String templateName,
java.util.List<java.lang.String> includePaths) |
static java.lang.String |
getDateTime()
Get the current date time.
|
static gov.nasa.arc.pds.xml.generated.FileAreaObservational |
getFileArea(java.io.File pds4Label,
java.lang.String dataFile) |
static java.util.List<gov.nasa.arc.pds.xml.generated.FileAreaObservational> |
getFileAreas(java.io.File pds4Label) |
static java.util.List<gov.nasa.arc.pds.xml.generated.FileAreaObservational> |
getFileAreas(java.net.URL pds4Label) |
static java.io.File |
getFileFromURL(java.net.URL url,
java.io.File outputDir) |
static int |
getHDUIndex(java.io.File fitsFile,
int index)
Gets the HDU index that corresponds to the given index.
|
static ImageProperties |
getImageProperties(java.io.File pds4Label)
Gets image properties associated with the given PDS4 label.
|
static ImageProperties |
getImageProperties(java.net.URL pds4Label) |
static java.net.URL |
getParent(java.net.URL url) |
static java.util.List<gov.nasa.arc.pds.xml.generated.Array> |
getSupportedImages(java.util.List<gov.nasa.arc.pds.xml.generated.Array> arrays)
Returns a list of supported image objects.
|
static gov.nasa.pds.tools.label.Label |
parsePds3Label(java.io.File label) |
static gov.nasa.pds.tools.label.Label |
parsePds3Label(java.net.URL label) |
static java.net.URL |
toURL(java.lang.String s)
Convert a string to a URL.
|
static java.lang.String |
toWellFormedURI(java.lang.String s)
Convert a string to a URI.
|
public static java.net.URL toURL(java.lang.String s) throws java.net.MalformedURLException
s
- The string to convertjava.net.MalformedURLException
public static java.lang.String toWellFormedURI(java.lang.String s)
s
- The string to convert.public static java.lang.String getDateTime()
public static gov.nasa.pds.tools.label.Label parsePds3Label(java.io.File label) throws java.lang.Exception
java.lang.Exception
public static gov.nasa.pds.tools.label.Label parsePds3Label(java.net.URL label) throws java.lang.Exception
java.lang.Exception
public static java.util.List<gov.nasa.arc.pds.xml.generated.FileAreaObservational> getFileAreas(java.io.File pds4Label) throws gov.nasa.pds.objectAccess.ParseException, java.net.MalformedURLException, java.net.URISyntaxException
gov.nasa.pds.objectAccess.ParseException
java.net.MalformedURLException
java.net.URISyntaxException
public static java.util.List<gov.nasa.arc.pds.xml.generated.FileAreaObservational> getFileAreas(java.net.URL pds4Label) throws gov.nasa.pds.objectAccess.ParseException, java.net.MalformedURLException, java.net.URISyntaxException, java.io.IOException
gov.nasa.pds.objectAccess.ParseException
java.net.MalformedURLException
java.net.URISyntaxException
java.io.IOException
public static gov.nasa.arc.pds.xml.generated.FileAreaObservational getFileArea(java.io.File pds4Label, java.lang.String dataFile) throws gov.nasa.pds.objectAccess.ParseException, java.net.MalformedURLException, java.net.URISyntaxException
gov.nasa.pds.objectAccess.ParseException
java.net.MalformedURLException
java.net.URISyntaxException
public static java.io.File createOutputFile(java.io.File file, java.io.File outputDir, java.lang.String format)
public static java.io.File createOutputFile(java.io.File file, java.io.File outputDir, java.lang.String format, int index)
public static void exec(java.io.File program, java.lang.String[] args) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public static void generate(java.io.File target, java.io.File outputFile, java.lang.String templateName) throws java.lang.Exception
java.lang.Exception
public static void generate(java.io.File target, java.io.File outputFile, java.lang.String templateName, java.util.List<java.lang.String> includePaths) throws java.lang.Exception
java.lang.Exception
public static int getHDUIndex(java.io.File fitsFile, int index) throws nom.tam.fits.FitsException, java.io.IOException
fitsFile
- The FITS file to look for HDUs.index
- The desired index.nom.tam.fits.FitsException
- If an error occurred reading the FITS file.java.io.IOException
- If the FITS file cannot be read.public static java.util.List<gov.nasa.arc.pds.xml.generated.Array> getSupportedImages(java.util.List<gov.nasa.arc.pds.xml.generated.Array> arrays)
arrays
- A list of Array objects to filter.public static ImageProperties getImageProperties(java.io.File pds4Label) throws java.lang.Exception
pds4Label
- A pds4 label to parse.java.lang.Exception
- If an error occurred during the parsing
process.public static ImageProperties getImageProperties(java.net.URL pds4Label) throws java.lang.Exception
java.lang.Exception
public static java.io.File getFileFromURL(java.net.URL url, java.io.File outputDir) throws java.lang.Exception
java.lang.Exception
public static java.net.URL getParent(java.net.URL url) throws java.net.MalformedURLException, java.net.URISyntaxException
java.net.MalformedURLException
java.net.URISyntaxException
Copyright © 2010-2019 Planetary Data System. All Rights Reserved.