HiRISE

HiRISE.libHiRISE
Class Data_Location

java.lang.Object
  extended by HiRISE.libHiRISE.Data_Location

public class Data_Location
extends Object

A utility class for generating HiROC-specific pathnames based on observation IDs.

This utility's methods return a pathname as a string for given information or will return null if no pathname could be parsed from the given information. The pathname returned is not an absolute pathname. The format of the returned pathname is shown below.

Mission-Phase/Prefix_Orbit-Range

Version:
2.1
Author:
Sean Whitsitt, UA/PIRL/HiROC
See Also:
Observation_ID

Field Summary
static String CRU_DIRECTORY_NAME_PREFIX
          The directory name prefix for input found to be in the CRU phase.
static int CRU_ORBITS_PER_DIRECTORY
          Orbits per directory for the cruise (CRU) phase.
static String DEFAULT_DIRECTORY_NAME_PREFIX
          The default directory name prefix and is used if no other directory name prefix is found or specified.
static int DEFAULT_ORBITS_PER_DIRECTORY
          Default orbits per directory.
static String ID
          Class identification with revision number.
static String YYMM_DIRECTORY_NAME_PREFIX
          The directory name prefix for a datetime format.
 
Method Summary
static String getPathSegment(Observation_ID id)
          Generates a pathname segment from a given observation ID.
static String getPathSegment(Observation_ID id, int orbitsPerDirectory, String prefix)
          Generates a pathname segment from a given observaton ID, number of orbits per directory, and pathname prefix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class identification with revision number.

See Also:
Constant Field Values

DEFAULT_ORBITS_PER_DIRECTORY

public static final int DEFAULT_ORBITS_PER_DIRECTORY
Default orbits per directory. Used if the number of orbits per directory is not specified and another source is not found. Value = 100.

See Also:
Constant Field Values

CRU_ORBITS_PER_DIRECTORY

public static final int CRU_ORBITS_PER_DIRECTORY
Orbits per directory for the cruise (CRU) phase. Used if the number of orbits per directory is not specified and the phase is found to be CRU. Value = 10.

See Also:
Constant Field Values

YYMM_DIRECTORY_NAME_PREFIX

public static final String YYMM_DIRECTORY_NAME_PREFIX
The directory name prefix for a datetime format. It is used if another prefix is not specified and the input is a datetime format.

See Also:
Constant Field Values

CRU_DIRECTORY_NAME_PREFIX

public static final String CRU_DIRECTORY_NAME_PREFIX
The directory name prefix for input found to be in the CRU phase. It is used when no other directory name prefix is specified and the input is in the CRU phase.

See Also:
Constant Field Values

DEFAULT_DIRECTORY_NAME_PREFIX

public static final String DEFAULT_DIRECTORY_NAME_PREFIX
The default directory name prefix and is used if no other directory name prefix is found or specified.

See Also:
Constant Field Values
Method Detail

getPathSegment

public static String getPathSegment(Observation_ID id)
Generates a pathname segment from a given observation ID. The default number of orbits per directory is used, and the pathname prefix is derived from the observation ID.

Parameters:
id - the observation ID from which the pathname segment is derived.
Returns:
the pathname segment corresponding to the observation ID or null if not pathname can be determined.
See Also:
DEFAULT_ORBITS_PER_DIRECTORY

getPathSegment

public static String getPathSegment(Observation_ID id,
                                    int orbitsPerDirectory,
                                    String prefix)
Generates a pathname segment from a given observaton ID, number of orbits per directory, and pathname prefix. If orbitsPerDirectory is non-positive, the default number of orbits per directory is used. If prefix is null, the prefix is derived from the observation ID.

Parameters:
id - the observation ID from which the pathname segment is derived.
orbitsPerDirectory - the number of orbits to use per directory; if non-positive, a default number is used.
prefix - the pathname segment prefix; if null, the prefix is derived from the observation ID.
Returns:
the pathname segment corresponding to the observation ID or null if not pathname can be determined.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona