gov.nasa.pds.citool.util
Class Utility

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

public class Utility
extends Object


Constructor Summary
Utility()
           
 
Method Summary
static String filterString(String value)
           
static String getDateTime()
          Get the current date time.
static boolean isNull(String value)
          Determines whether a value is null as defined by the PDS.
static String printDiff(String indent, List<DiffRecord> records)
           
static List<String> removeQuotes(List<String> list)
           
static String replaceChars(String strToReplace)
           
static String stripNewLines(String value)
           
static String stripOnlyWhitespaceAndNewLine(String value)
          Strips only newline characters and extra whitespaces.
static String stripWhitespace(String value)
           
static URL toURL(String s)
          Convert a string to a URL.
static String trimString(String value, int length)
           
 
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

stripWhitespace

public static String stripWhitespace(String value)

stripNewLines

public static String stripNewLines(String value)

filterString

public static String filterString(String value)

trimString

public static String trimString(String value,
                                int length)

stripOnlyWhitespaceAndNewLine

public static String stripOnlyWhitespaceAndNewLine(String value)
Strips only newline characters and extra whitespaces.

Parameters:
value - A string value.
Returns:
The filtered value.

isNull

public static boolean isNull(String value)
Determines whether a value is null as defined by the PDS.

Parameters:
value - The value in question
Returns:
true if the value is null, false otherwise.

removeQuotes

public static List<String> removeQuotes(List<String> list)

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

getDateTime

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

Returns:
A date time.

printDiff

public static String printDiff(String indent,
                               List<DiffRecord> records)

replaceChars

public static String replaceChars(String strToReplace)


Copyright © 2010-2013 Planetary Data System. All Rights Reserved.