jpl.mipl.mars.viewer.image
Class RdrImageContentFactory

java.lang.Object
  extended byjpl.mipl.mars.viewer.image.RdrImageContentFactory

public class RdrImageContentFactory
extends Object

Purpose: Factory class for vending RdrImageContent objects. Supported special types: disp, xyz, xxx, yyy, zzz, rough, reach, normal, range, mask, I-Over-P, slope, solar energy, solar energy, sloper rover, slope magnitude, slope heading, and approximate versions of above. All other formats return the default type.

   Copyright 2004, California Institute of Technology.
   ALL RIGHTS RESERVED.
   U.S. Government Sponsorship acknowledge. 2004.
   
 ============================================================================
 Modification History :
 ----------------------

 Date              Who         What
 ----------------------------------------------------------------------------
 08/27/2003        Nick        Initial Release
 12/05/2003        Nick        Added Mask file type
 12/09/2003        Nick        Added create method which takes a 
                               reference to a pre-existing RenderedOp
                               instead of a filename. 
 04/07/2004        Nick        Added methods for XXX, YYY, and ZZZ type.
                               Added: Range-ARG,ARL;    XYZ-AXZ,AXL;
                               Normal-AUW,AUL;   New-IOF,IOL,IWF,IWL;
                               New-IEP,IEL,AEP,AEL.
 05/07/2004        Nick        New type: Slope - SLP,SLL,SLT,SLN    
 07/17/2004        Nick        New type: Solar Energy - SEP,SEL,SET,SEN  
 07/19/2004        Nick        New type: Slope Rover  - SRD,SRD,SRT,SRN
 11/11/2004        Nick        New type: Slope Magnitude - SMP,SML,SMT,SMN  
 11/11/2004        Nick        New type: Slope Heading  - SHP,SHL,SHT,SHN
 ============================================================================
 

Version:
$Id: RdrImageContentFactory.java,v 1.2 2005/01/27 01:24:52 ntt Exp $
Author:
Nicholas Toole (Nicholas.T.Toole@jpl.nasa.gov)

Constructor Summary
RdrImageContentFactory()
           
 
Method Summary
static RdrImageContent create(RenderedOp loadedImage, String name, String type, MarsImageViewModel model)
          Factory method, returns an instance of RdrImageContent using the RDR type to determine the approrpiate subclass.
static RdrImageContent create(String filename, String type, MarsImageViewModel model)
          Factory method, returns an instance of RdrImageContent using the RDR type to determine the approrpiate subclass.
protected static boolean isDispType(String type)
          Disp type includes following types: DIS, DIL, DIT, DIN, DSS, DSL, DST, DSN, DLS, DLL, DLT, DLN.
protected static boolean isIepType(String type)
          Iep type includes following types: IEP, IEL, AEP, AEL.
protected static boolean isIffType(String type)
          Iof type includes following types: IFF, IFL, IFT, IFN.
protected static boolean isMaskType(String type)
          Mask type includes following types: MSK, MSL, MST, MSN.
protected static boolean isNormalType(String type)
          Normal type includes following types: UVW, UVL, UVT, UVN, UUU, UUL, UUT, UUN, VVV, VVL, VVT, VVN, WWW, WWL, WWT, WWN.
protected static boolean isRangeType(String type)
          Range type includes following types: RNG, RNL, RNT, RNN.
protected static boolean isReachType(String type)
          Reach type includes following types: IDD, IDL, IDT, IDN.
protected static boolean isRoughType(String type)
          Rough type includes following types: RUF, RUL, RUT, RUN.
protected static boolean isSlopeHeadingType(String type)
          Slope Heading type includes following types: SHP, SHL, SHT, SHN.
protected static boolean isSlopeMagnitudeType(String type)
          Slope Magnitude type includes following types: SMP, SML, SMT, SMN.
protected static boolean isSlopeRoverType(String type)
          Slope Rover type includes following types: SRD, SRL, SRT, SRN.
protected static boolean isSlopeType(String type)
          Slope type includes following types: SLP,SLL,SLT,SLN.
protected static boolean isSolarType(String type)
          Solar Energy type includes following types: SEP,SEL,SET,SEN.
protected static boolean isXxxType(String type)
          XXX type includes following types: XXX, XXL, XXT, XXN, XAX, XAL.
protected static boolean isXyzType(String type)
          XYZ type includes following types: XYZ, XYL, XYT, XYN.
protected static boolean isYyyType(String type)
          YYY type includes following types: YYY, YYL, YYT, YYN, YAX, YAL.
protected static boolean isZzzType(String type)
          ZZZ type includes following types: ZZZ, ZZL, ZZT, ZZN, ZAX, ZAL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RdrImageContentFactory

public RdrImageContentFactory()
Method Detail

create

public static RdrImageContent create(String filename,
                                     String type,
                                     MarsImageViewModel model)
Factory method, returns an instance of RdrImageContent using the RDR type to determine the approrpiate subclass.

Parameters:
filename - Complete filepath of the RDR image
type - Type of the RDR image
model - Instance of current session model
Throws:
IllegalArgumentException - if file referenced by filename does not exist.

create

public static RdrImageContent create(RenderedOp loadedImage,
                                     String name,
                                     String type,
                                     MarsImageViewModel model)
Factory method, returns an instance of RdrImageContent using the RDR type to determine the approrpiate subclass.

Parameters:
loadedImage - RenderedOp of image to be encapsulated
name - Name, path, or other identifer of the original image
type - Type of the RDR image
model - Instance of current session model
Throws:
IllegalArgumentException - if loadedImage is null.

isXyzType

protected static boolean isXyzType(String type)
XYZ type includes following types: XYZ, XYL, XYT, XYN. Update: Added AXZ, AXL, AXT, AXN (4.7.04)


isXxxType

protected static boolean isXxxType(String type)
XXX type includes following types: XXX, XXL, XXT, XXN, XAX, XAL.


isYyyType

protected static boolean isYyyType(String type)
YYY type includes following types: YYY, YYL, YYT, YYN, YAX, YAL.


isZzzType

protected static boolean isZzzType(String type)
ZZZ type includes following types: ZZZ, ZZL, ZZT, ZZN, ZAX, ZAL.


isRangeType

protected static boolean isRangeType(String type)
Range type includes following types: RNG, RNL, RNT, RNN. Update: Added ARG, ARL (4.7.04)


isDispType

protected static boolean isDispType(String type)
Disp type includes following types: DIS, DIL, DIT, DIN, DSS, DSL, DST, DSN, DLS, DLL, DLT, DLN.


isNormalType

protected static boolean isNormalType(String type)
Normal type includes following types: UVW, UVL, UVT, UVN, UUU, UUL, UUT, UUN, VVV, VVL, VVT, VVN, WWW, WWL, WWT, WWN. Update: Added AUW, AUL, AUT, AUN (4.7.04)


isRoughType

protected static boolean isRoughType(String type)
Rough type includes following types: RUF, RUL, RUT, RUN.


isReachType

protected static boolean isReachType(String type)
Reach type includes following types: IDD, IDL, IDT, IDN.


isMaskType

protected static boolean isMaskType(String type)
Mask type includes following types: MSK, MSL, MST, MSN.


isIepType

protected static boolean isIepType(String type)
Iep type includes following types: IEP, IEL, AEP, AEL. IET, IEN, AET, AEN.


isIffType

protected static boolean isIffType(String type)
Iof type includes following types: IFF, IFL, IFT, IFN.


isSlopeType

protected static boolean isSlopeType(String type)
Slope type includes following types: SLP,SLL,SLT,SLN.


isSolarType

protected static boolean isSolarType(String type)
Solar Energy type includes following types: SEP,SEL,SET,SEN.


isSlopeRoverType

protected static boolean isSlopeRoverType(String type)
Slope Rover type includes following types: SRD, SRL, SRT, SRN.


isSlopeMagnitudeType

protected static boolean isSlopeMagnitudeType(String type)
Slope Magnitude type includes following types: SMP, SML, SMT, SMN.


isSlopeHeadingType

protected static boolean isSlopeHeadingType(String type)
Slope Heading type includes following types: SHP, SHL, SHT, SHN.