gov.nasa.pds.transform.util
Class Utility

java.lang.Object
  extended by gov.nasa.pds.transform.util.Utility

public class Utility
extends Object

Utility class.


Constructor Summary
Utility()
           
 
Method Summary
static File createOutputFile(File file, File outputDir, String format)
           
static void exec(File program, String[] args)
           
static void generate(File target, File outputFile, String templateName)
           
static String getDateTime()
          Get the current date time.
static List<gov.nasa.arc.pds.xml.generated.FileAreaObservational> getFileAreas(File pds4Label)
           
static gov.nasa.pds.tools.label.Label parsePds3Label(File label)
           
static URL toURL(String s)
          Convert a string to a URL.
static String toWellFormedURI(String s)
          Convert a string to a URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utility

public Utility()
Method Detail

toURL

public static URL toURL(String s)
                 throws MalformedURLException
Convert a string to a URL.

Parameters:
s - The string to convert
Returns:
A URL of the input string
Throws:
MalformedURLException

toWellFormedURI

public static String toWellFormedURI(String s)
Convert a string to a URI.

Parameters:
s - The string to convert.
Returns:
A well-formed URI.

getDateTime

public static String getDateTime()
Get the current date time.

Returns:
A date time.

parsePds3Label

public static gov.nasa.pds.tools.label.Label parsePds3Label(File label)
                                                     throws Exception
Throws:
Exception

getFileAreas

public static List<gov.nasa.arc.pds.xml.generated.FileAreaObservational> getFileAreas(File pds4Label)
                                                                               throws gov.nasa.pds.objectAccess.ParseException
Throws:
gov.nasa.pds.objectAccess.ParseException

createOutputFile

public static File createOutputFile(File file,
                                    File outputDir,
                                    String format)

exec

public static void exec(File program,
                        String[] args)
                 throws IOException,
                        InterruptedException
Throws:
IOException
InterruptedException

generate

public static void generate(File target,
                            File outputFile,
                            String templateName)
                     throws Exception
Throws:
Exception


Copyright © 2010–2014 Planetary Data System. All rights reserved.