gov.nasa.pds.search.core.util
Class PDSDateConvert
java.lang.Object
gov.nasa.pds.search.core.util.PDSDateConvert
public class PDSDateConvert
- extends Object
The DateTimeConverter class is necessary to convert PDS4-compliant date/time
strings into Solr-Compliant date/time Strings
The Solr DateField, which is necessary for performing time queries, is ISO
8601 standard-compliant format, while PDS4 uses a variable number of ASCII
date/time formats.
- Author:
- jpadams
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PDSDateConvert
public PDSDateConvert()
convert
public static String convert(String name,
String input)
throws InvalidDatetimeException
- Converts PDS4-Compliant Datetime Strings into Solr-Compliant Datetime
Strings.
- Parameters:
dateTime
-
- Returns:
-
- Throws:
ParseException
InvalidDatetimeException
getDefaultTime
public static String getDefaultTime(String name)
- Get a default time depending on the name of the field. "start" fields
will receive an "early" default, while remaining fields will receive a
default in the future.
- Parameters:
name
-
- Returns:
Copyright © 2010-2013 Planetary Data System. All Rights Reserved.