|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.gsfc.drl.rtstps.core.output.hdf5.NPOESSFilename
public class NPOESSFilename
Creates legal NPOESS (JPSS) filenames. The format is to mission specification.
Field Summary | |
---|---|
private java.util.Date |
creationDateAndTime
|
private static char |
creationDateCode
|
private java.lang.String |
creationDateTimeStr
|
private static java.lang.String |
delimiter
|
private static FileCreationDateFormat |
dfCreation
|
private static DomainDescription |
drlDomain
|
private static FilenameTimefieldFormat |
eTime
|
private static java.lang.String |
extension
|
private java.lang.String |
filename
|
private int |
orbit
|
private static char |
orbitCode
|
private java.lang.String |
orbitStr
|
private Origin |
origin
|
private java.util.List<ProductIdentifiers> |
productIds
|
private static java.lang.String |
productNameDelimiter
|
private SpacecraftId |
spacecraftId
|
private static char |
startDateCode
|
private java.lang.String |
startDateStr
|
private java.util.Date |
startDateTime
|
private java.lang.String |
startTimeStr
|
private java.util.Date |
stopTime
|
private java.lang.String |
stopTimeStr
|
private static FilenameTimefieldFormat |
tTime
|
private static java.lang.String |
usageStr
|
Constructor Summary | |
---|---|
NPOESSFilename(java.util.List<ProductIdentifiers> productIds,
java.util.Date startDateTime,
java.util.Date stopTime,
java.util.Date creationDateAndTime,
SpacecraftId spacecraftId,
int orbit,
Origin origin)
Create an NPOESS filename from a list of product identifiers (e.g. |
|
NPOESSFilename(java.util.List<RDR> rdrs,
PDSDate startDateTime,
PDSDate stopTime,
java.util.Date creationDateAndTime,
SpacecraftId spacecraftId,
int orbit,
Origin origin)
Create an filename from several RDRs (sensors). |
|
NPOESSFilename(ProductIdentifiers productId,
java.util.Date startDateTime,
java.util.Date stopTime,
java.util.Date creationDateAndTime,
SpacecraftId spacecraftId,
int orbit,
Origin origin)
Create an NPOESS filename from a product identifier (e.g. |
|
NPOESSFilename(ProductIdentifiers productId,
PDSDate startDateTime,
PDSDate stopTime,
java.util.Date creationDateAndTime,
SpacecraftId spacecraftId,
int orbit,
Origin origin)
Create an NPOESS filename from a product identifier (e.g. |
|
NPOESSFilename(java.lang.String filename)
De-construct a string into it constituent parts that is supposed to have a valid NPOESS filename. |
Method Summary | |
---|---|
void |
addProductIdentifier(ProductIdentifiers productId)
Add a product identifier to the name after the initial constructor has been issued |
private void |
buildFilename()
build the filename -- this must be called once the item is updated and the string must be produced as it stands now it is lazily called in toString... |
private void |
commonInit(java.util.Date startDateTime,
java.util.Date stopTime,
java.util.Date creationDateAndTime,
SpacecraftId spacecraftId,
int orbit,
Origin origin)
A common method for initializing the key fields in the class |
java.util.Date |
getCreationDateAndTime()
Return the clock creation date and time |
int |
getOrbit()
Return the orbit of the pass this file is associated with |
Origin |
getOrigin()
Return the origin of the packets associated with this file |
java.util.List<ProductIdentifiers> |
getProductIdentifiers()
Get the product identifiers associated with this filename |
SpacecraftId |
getSpacecraftId()
Return the spacecraft identifier |
java.util.Date |
getStartDateTime()
Return the start date and time |
java.util.Date |
getStopTime()
Return the stop date and time |
private void |
parseCreationDate(java.lang.String creationDateStr)
Parse the creation date |
private void |
parseDomainDescription(java.lang.String domainStr)
Parse the domain (e.g. |
private void |
parseExtension(java.lang.String extensionStr)
Parse the extension (e.g. |
private void |
parseOrbitNumber(java.lang.String orbitStr)
Parse the orbit sub-field |
private void |
parseOrigin(java.lang.String originStr)
Parse the origin (e.g. |
private void |
parseProductIds(java.lang.String productIdsStr)
Parse the product identifier(s) (e.g. |
private void |
parseSpacecraftId(java.lang.String spacecraftIdStr)
Parse the spacecraft identifier (e.g. |
private void |
parseStartDateTime(java.lang.String startDateStr,
java.lang.String startTimeStr)
Parse the date and time |
private void |
parseStopTime(java.lang.String stopTimeStr)
Parse the stop time |
private java.lang.String |
productIdsToString()
make the list of product IDs into a ID0-ID1 style string maybe there's a better way to do this...? |
static java.lang.String |
productIdsToString(java.util.List<RDR> rdrs)
make the list of product IDs into a ID0-ID1 style string maybe there's a better way to do this...? |
void |
setCreationDateAndTime(java.util.Date creationDateAndTime)
Set the creation date and time for the file |
void |
setOrbit(int orbit)
Set the orbit number |
void |
setOrigin(Origin origen)
Set the origen |
void |
setSpacecraftId(SpacecraftId spacecraftId)
Set the spacecraft identifier |
void |
setStartDateTime(java.util.Date startDateTime)
Set the start date and time |
void |
setStopTime(java.util.Date stopTime)
Set the stop time |
java.lang.String |
toString()
Once the filename is constructed it can be retrieved as a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static FilenameTimefieldFormat eTime
private static FilenameTimefieldFormat tTime
private static FileCreationDateFormat dfCreation
private java.util.List<ProductIdentifiers> productIds
private java.util.Date startDateTime
private java.util.Date stopTime
private java.util.Date creationDateAndTime
private java.lang.String startDateStr
private java.lang.String startTimeStr
private java.lang.String stopTimeStr
private java.lang.String creationDateTimeStr
private SpacecraftId spacecraftId
private int orbit
private Origin origin
private java.lang.String orbitStr
private java.lang.String filename
private static final java.lang.String delimiter
private static final java.lang.String productNameDelimiter
private static final DomainDescription drlDomain
private static final java.lang.String extension
private static final char creationDateCode
private static final char orbitCode
private static final char startDateCode
private static final java.lang.String usageStr
Constructor Detail |
---|
public NPOESSFilename(java.util.List<RDR> rdrs, PDSDate startDateTime, PDSDate stopTime, java.util.Date creationDateAndTime, SpacecraftId spacecraftId, int orbit, Origin origin)
rdrs
- one or more RDRs (sensors) are in the RDR filestartDateTime
- the first time of the first packetstopTime
- the last time of the last packetcreationDateAndTime
- the clock timespacecraftId
- the spacecraft identifier such as NPP, etc...orbit
- the orbit of the pass the packets are fromorigin
- the origin of the information (DRL)public NPOESSFilename(ProductIdentifiers productId, PDSDate startDateTime, PDSDate stopTime, java.util.Date creationDateAndTime, SpacecraftId spacecraftId, int orbit, Origin origin)
productId
- a product identifier (e.g. RATMS)startDateTime
- the first packet's time in PDSDate
format.stopTime
- the last packet's timecreationDateAndTime
- the clock timespacecraftId
- the spacecraft identifier such as NPP, etc...orbit
- the orbit of the pass the packets are fromorigin
- the origin of the information (DRL)public NPOESSFilename(ProductIdentifiers productId, java.util.Date startDateTime, java.util.Date stopTime, java.util.Date creationDateAndTime, SpacecraftId spacecraftId, int orbit, Origin origin)
productId
- a product identifier (e.g. RATMS)startDateTime
- the first packet's time in Date
format.stopTime
- the last packet's timecreationDateAndTime
- the clock timespacecraftId
- the spacecraft identifier such as NPP, etc...orbit
- the orbit of the pass the packets are fromorigin
- the origin of the information (DRL)public NPOESSFilename(java.util.List<ProductIdentifiers> productIds, java.util.Date startDateTime, java.util.Date stopTime, java.util.Date creationDateAndTime, SpacecraftId spacecraftId, int orbit, Origin origin)
productIds
- a product identifier (e.g. RATMS, RNSCA_NPP)startDateTime
- the first packet's time in Date
format.stopTime
- the last packet's timecreationDateAndTime
- the clock timespacecraftId
- the spacecraft identifier such as NPP, etc...orbit
- the orbit of the pass the packets are fromorigin
- the origin of the information (DRL)public NPOESSFilename(java.lang.String filename) throws RtStpsException
filename
- the string containing the NPOESS filename
java.text.ParseException
- throws except for certain failures in parsing the name
RtStpsException
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<ProductIdentifiers> getProductIdentifiers()
ProductIdentifiers
public java.util.Date getStartDateTime()
public java.util.Date getStopTime()
public java.util.Date getCreationDateAndTime()
public SpacecraftId getSpacecraftId()
SpacecraftId
public int getOrbit()
int
public Origin getOrigin()
Origin
public void addProductIdentifier(ProductIdentifiers productId)
productId
- the ProductIdentifiers
of interestpublic void setStartDateTime(java.util.Date startDateTime)
startDateTime
- a Date containing the new date/timepublic void setStopTime(java.util.Date stopTime)
stopTime
- a Date containing the new time (any date information is ignored)public void setCreationDateAndTime(java.util.Date creationDateAndTime)
creationDateAndTime
- a Date containing the new date/timepublic void setSpacecraftId(SpacecraftId spacecraftId)
spacecraftId
- the new SpacecraftId
public void setOrbit(int orbit)
orbit
- the orbit in an int
public void setOrigin(Origin origen)
origen
- the new Origin
private void commonInit(java.util.Date startDateTime, java.util.Date stopTime, java.util.Date creationDateAndTime, SpacecraftId spacecraftId, int orbit, Origin origin)
startDateTime
- stopTime
- creationDateAndTime
- spacecraftId
- orbit
- origin
- private void parseExtension(java.lang.String extensionStr) throws RtStpsException
extensionStr
-
java.text.ParseException
RtStpsException
private void parseDomainDescription(java.lang.String domainStr) throws RtStpsException
domainStr
-
java.text.ParseException
RtStpsException
private void parseOrigin(java.lang.String originStr) throws RtStpsException
originStr
-
java.text.ParseException
RtStpsException
private void parseCreationDate(java.lang.String creationDateStr) throws RtStpsException
creationDateStr
-
java.text.ParseException
RtStpsException
private void parseOrbitNumber(java.lang.String orbitStr) throws RtStpsException
orbitStr
-
java.text.ParseException
RtStpsException
private void parseStopTime(java.lang.String stopTimeStr) throws RtStpsException
stopTimeStr
-
java.text.ParseException
RtStpsException
private void parseStartDateTime(java.lang.String startDateStr, java.lang.String startTimeStr) throws RtStpsException
startDateStr
- startTimeStr
-
java.text.ParseException
RtStpsException
private void parseSpacecraftId(java.lang.String spacecraftIdStr) throws RtStpsException
spacecraftIdStr
-
java.text.ParseException
RtStpsException
private void parseProductIds(java.lang.String productIdsStr) throws RtStpsException
productIdsStr
-
java.text.ParseException
RtStpsException
private void buildFilename()
private java.lang.String productIdsToString()
public static java.lang.String productIdsToString(java.util.List<RDR> rdrs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |