|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjpl.mipl.mars.viewer.finder.AbstractMarsImageFileFinder
public abstract class AbstractMarsImageFileFinder
Purpose: Abstract class used to find RDR's related to a particular EDR. Subclasses implement different heirarchical organizations of the file system.
Copyright 2003, California Institute of Technology. ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledge. 2003.
============================================================================ Modification History : ---------------------- Date Who What ---------------------------------------------------------------------------- 08/23/2003 Nick Initial Release 12/01/2003 Nick Added getType() method. 11/21/2005 Nick Removed propChange(), filterProducts ============================================================================
| Field Summary | |
|---|---|
protected Comparator |
_comparator
|
protected GroupIdentifier |
_groupIdentifier
|
protected List |
_solRange
|
protected File |
_treeRoot
|
protected String |
_treeRootStr
Reference to the root of the directory structure |
protected static String |
SOL_NOT_APPLICABLE
|
| Fields inherited from interface jpl.mipl.mars.viewer.finder.MarsImageFileFinder |
|---|
SLASH |
| Constructor Summary | |
|---|---|
AbstractMarsImageFileFinder(String newRoot)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
Returns true if this object and other is of same class type and have the same root. |
abstract String |
extractEyeType(String imgPath,
short type)
Returns the camera eye type as denoted by the file organization and the imgPath parameter. |
String |
extractFilename(String path)
Returns the basename of a filepath, ie returns filename from filepath |
abstract String |
extractImageType(String imgPath,
short type)
Returns the image type as denoted by the file organization and the imgPath parameter. |
abstract List |
extractImageTypes(List imgPaths,
short type)
Returns the image types as denoted by the file organization and the imgPath parameters. |
abstract String |
extractInstrument(String imgPath,
short type)
Returns the instrument type as denoted by the file organization and the imgPath parameter. |
String |
formatSol(int sol)
Formats the SOL as a string based on the directory structure |
String[] |
getCameraEyeTypes()
Returns a String array of camera eye types. |
abstract String |
getEdrThumbnail(String edrPath)
Given a complete path to an EDR, returns the associated thumbnail path, if it exists. |
String |
getGroupId(String imagePath)
Many file finders have images that form a set through some special relationship (i.e. |
Comparator |
getImageComparator()
Returns file finders instance of a comparator for sorting files according to some set of rules. |
String |
getInitialSol()
Returns a list of the SOL range of a given file finder. |
String[] |
getInstrumentTypes()
Returns a String array of instrument names. |
String[] |
getRdrTypes()
Returns a String array of RDR types. |
String |
getRoot()
Returns string of the root of the file organization. |
File |
getRootFile()
Returns File of the root of the file organization. |
List |
getSolRange()
Returns a list of the SOL range of a given file finder. |
abstract String |
getSourceProductPath(String rdrPath)
Returns the path of the source EDR for nominal RDR products, or the path of the linearized version of that EDR for linearized RDR products. |
abstract String |
getType()
Returns string identifier of the image file finder type. |
protected void |
initSolRange()
|
abstract boolean |
isThumbnail(String imgFile)
Determines if image represented by imgFile is a thumbnail. |
abstract boolean |
isThumbnailType(String type)
Determines if product type represented by type is a thumbnail. |
abstract boolean |
isTypeNominal(String type)
Returns true if the type parameter is raw, false otherwise (e.g. |
abstract boolean |
isTypeSource(String type)
Returns true if the type parameter is source. |
abstract EdrResult |
queryEdrs(EdrQuery request)
Returns an EdrResult containing image files found according to file heirarchy. |
abstract RdrResult |
queryRdrs(RdrQuery request)
Returns an RdrResult containing RDR paths found according to file heirarchy based on the request. |
List |
removeThumbnails(List inImages)
Given a vector of image file names, uses isThumbnail method to determine if file should be included in the returned List. |
void |
setRoot(String newRoot)
Sets the root of the file organization. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jpl.mipl.mars.viewer.finder.MissionSpecFileInfo |
|---|
extractSclk, extractVersion, isProductNameFormatted, isStereoPair |
| Field Detail |
|---|
protected static final String SOL_NOT_APPLICABLE
protected String _treeRootStr
protected File _treeRoot
protected List _solRange
protected Comparator _comparator
protected GroupIdentifier _groupIdentifier
| Constructor Detail |
|---|
public AbstractMarsImageFileFinder(String newRoot)
throws FileFinderException
newRoot - Root of the file organization
FileFinderException - If directory specified by newRoot
parameter does not exist or cannot be read.| Method Detail |
|---|
public void setRoot(String newRoot)
throws FileFinderException
setRoot in interface MarsImageFileFindernewRoot - Path of the root.
FileFinderException - If directory specified by newRoot
parameter does not exist or cannot be read.public abstract String getType()
getType in interface MarsImageFileFinderpublic String getRoot()
getRoot in interface MarsImageFileFinderpublic File getRootFile()
getRootFile in interface MarsImageFileFinder
public abstract EdrResult queryEdrs(EdrQuery request)
throws FileFinderException
queryEdrs in interface MarsImageFileFinderEdrQuery - Request object with query parameters.
FileFinderException - if file finder error occurs
public abstract RdrResult queryRdrs(RdrQuery request)
throws FileFinderException
queryRdrs in interface MarsImageFileFinderRdrQuery - Request object with query parameters.
FileFinderException - if file finder error occurspublic String extractFilename(String path)
extractFilename in interface MissionSpecFileInfopath - Filepath of the file whose name is to be extracted.
public abstract String extractInstrument(String imgPath,
short type)
extractInstrument in interface MissionSpecFileInfoimgPath - Complete path of the edr file.type - Type of file (choose from MarsImageFileFinder.EDR_TYPE,
MarsImageFileFinder.RDR_TYPE)
public abstract String extractImageType(String imgPath,
short type)
extractImageType in interface MissionSpecFileInfoimgPath - Complete path of the edr file.type - Type of file (choose from MarsImageFileFinder.EDR_TYPE,
MarsImageFileFinder.RDR_TYPE)
public abstract List extractImageTypes(List imgPaths,
short type)
extractImageTypes in interface MissionSpecFileInfoimgPaths - List of paths of the edr file.type - Type of file (choose from MarsImageFileFinder.EDR_TYPE,
MarsImageFileFinder.RDR_TYPE)
public abstract String extractEyeType(String imgPath,
short type)
extractEyeType in interface MissionSpecFileInfoimgPath - Complete path of the edr file.type - Type of file (choose from MarsImageFileFinder.EDR_TYPE,
MarsImageFileFinder.RDR_TYPE)
public abstract boolean isThumbnail(String imgFile)
isThumbnail in interface MissionSpecFileInfoimgFile - Filename of the image.
public abstract boolean isThumbnailType(String type)
isThumbnailType in interface MissionSpecFileInfotype - Product type.
public String[] getInstrumentTypes()
getInstrumentTypes in interface MissionSpecFileInfopublic String[] getRdrTypes()
getRdrTypes in interface MissionSpecFileInfopublic String[] getCameraEyeTypes()
getCameraEyeTypes in interface MissionSpecFileInfopublic List removeThumbnails(List inImages)
removeThumbnails in interface MarsImageFileFinderinImages - List of image pathnames
public boolean equals(Object other)
equals in interface MissionSpecFileInfoequals in class Objectother - MarsImageFileFinder object to be compared to
public String formatSol(int sol)
formatSol in interface MarsImageFileFinderSol - day as integer
public abstract String getSourceProductPath(String rdrPath)
throws FileFinderException
getSourceProductPath in interface MarsImageFileFinderrdrPath - Path of the RDR product.
FileFinderExceptionpublic abstract boolean isTypeNominal(String type)
isTypeNominal in interface MissionSpecFileInfoProduct - type of the image
public abstract boolean isTypeSource(String type)
isTypeSource in interface MissionSpecFileInfoProduct - type of the image
protected void initSolRange()
public List getSolRange()
getSolRange in interface MarsImageFileFinderpublic String getInitialSol()
getInitialSol in interface MarsImageFileFinderpublic abstract String getEdrThumbnail(String edrPath)
getEdrThumbnail in interface MarsImageFileFinderedrPath - Absolute path of EDR file
public Comparator getImageComparator()
getImageComparator in interface MissionSpecFileInfopublic String getGroupId(String imagePath)
getGroupId in interface MissionSpecFileInfoPath - to an image file
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||