HiRISE

HiRISE.HiPlan.PTF
Class PTF_Record_Table_Model.ExtendedPtfRecord

java.lang.Object
  extended by HiRISE.HiPlan.PTF.PTF_Record_Table_Model.ExtendedPtfRecord
Enclosing class:
PTF_Record_Table_Model

public static class PTF_Record_Table_Model.ExtendedPtfRecord
extends Object

A PTF record with extended attributes. This record is used by the PTF_Record_Table_Model in PTF_Viewer, which treats the viewer's PTF records as a related collection and which manages the various extended attributes.

The attributes include a line number (which is arbitrary), an indication as to whether the record should be hidden from the table's view, an indication of whether the record is a duplicate of another record in the table model, and a HiRISE-centric measure of the PTF record's uniqueness amongst the records in the model.

A record is typically identified as a duplicate by having the same uniqueness measure as another record in the model to which it belongs. Note that this record on its own has no mechanism for identifying other records in its parent model or for determining whether it actually is a duplicate, however; the parent model tracks that data.

Using the same instance of a particular record in more than one table model may result in unexpected behavior if one model sets the record to hidden and the other does not, for instance. Copies of the records should probably be used instead.

Version:
1.24
Author:
Christian Schaller - UA/PIRL
See Also:
PTF_Record

Constructor Summary
PTF_Record_Table_Model.ExtendedPtfRecord(PTF_Record ptfRecord, Integer lineNumber)
          Creates a new extended attribute PTF record from a standard PTF record and a line number.
PTF_Record_Table_Model.ExtendedPtfRecord(PTF_Record ptfRecord, Integer lineNumber, String toolTipText, boolean usePointingModeInUniqueness)
          Creates a new extended attribute PTF record from a standard PTF record and a line number.
 
Method Summary
 Integer getLineNumber()
          Gets this record's line number in its PTF of origin.
 PTF_Record getPtfRecord()
          Gets the standard PTF record for this extended attribute record.
 String getToolTipText()
           
 PTF_Record_Table_Model.Uniqueness getUniqueness()
          Gets the uniqueness measure for this extended attribute record.
 boolean isDuplicate()
          Indicates whether this record is a duplicate of another record.
 boolean isHidden()
          Indicates whether this record should be hidden from its view.
 void recomputeUniqueness(boolean usePointingModeInUniqueness)
          Recomputes the uniqueness measure for this extended attribute record.
 void setDuplicate(boolean b)
          Sets the 'duplicate' attribute for this record.
 void setHidden(boolean b)
          Sets the 'hidden' attribute for this record.
 void setToolTipText(String toolTipText)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PTF_Record_Table_Model.ExtendedPtfRecord

public PTF_Record_Table_Model.ExtendedPtfRecord(PTF_Record ptfRecord,
                                                Integer lineNumber,
                                                String toolTipText,
                                                boolean usePointingModeInUniqueness)
Creates a new extended attribute PTF record from a standard PTF record and a line number.

The lineNumber parameter (getLineNumber()) tracks the line number of this record in its PTF of origin. This value is arbitrary in practice, however, and no mechanism exists in this class to ensure the line number is unique to a given record. Furthermore, although the line number may track the enclosing model's row index for this record, there is no guarantee at all that such is the case.

The toolTipText (which may be null) may be used to display a custom tool tip for a row in the table.

The usePointingModeInUniqueness parameter indicates whether the record's uniqueness measure includes the observation's nadir/off-nadir pointing.

Parameters:
ptfRecord - the standard PTF record around which this extended attribute record is built.
lineNumber - the line number of this record in its PTF of origin.
toolTipText - the tool tip text for this record; may be null.
usePointingModeInUniqueness - if true, a record's uniqueness measure includes whether it is nadir or off-nadir; if false, it does not include it.

PTF_Record_Table_Model.ExtendedPtfRecord

public PTF_Record_Table_Model.ExtendedPtfRecord(PTF_Record ptfRecord,
                                                Integer lineNumber)
Creates a new extended attribute PTF record from a standard PTF record and a line number.

The lineNumber parameter (getLineNumber()) tracks the line number of this record in its PTF of origin. This value is arbitrary in practice, however, and no mechanism exists in this class to ensure the line number is unique to a given record. Furthermore, although the line number may track the enclosing model's row index for this record, there is no guarantee at all that such is the case.

The uniqueness measure of this record is computed to take nadir/off-nadir pointing into account.

Parameters:
ptfRecord - the standard PTF record around which this extended attribute record is built.
lineNumber - the line number of this record in its PTF of origin.
Method Detail

getPtfRecord

public PTF_Record getPtfRecord()
Gets the standard PTF record for this extended attribute record.

Returns:
the standard PTF record.

getLineNumber

public Integer getLineNumber()
Gets this record's line number in its PTF of origin. Note that this value is arbitrary and is set at construction time. It may or may not accurately reflect the line number in the original PTF, and it may or may not bear any relation to the row index of an enclosing PTF table model.

Returns:
the line number of this record in its PTF of origin, with caveats.

getUniqueness

public PTF_Record_Table_Model.Uniqueness getUniqueness()
Gets the uniqueness measure for this extended attribute record. Note that the uniqueness measure for a non-HiRISE record is non-null, but that the value for each of the measure's fields is null. The uniqueness for any given non-HiRISE record is thus the same as the uniqueness for any other non-HiRISE record.

Returns:
the uniqueness measure for this record.

getToolTipText

public String getToolTipText()

setToolTipText

public void setToolTipText(String toolTipText)

recomputeUniqueness

public void recomputeUniqueness(boolean usePointingModeInUniqueness)
Recomputes the uniqueness measure for this extended attribute record.

Parameters:
usePointingModeInUniqueness - if true, the uniqueness measure will include whether the observation is nadir or off-nadir pointed; if false, it will not.
See Also:
PTF_Record_Table_Model.Uniqueness

isHidden

public boolean isHidden()
Indicates whether this record should be hidden from its view. This attribute is simply a hint; it is up to the view (the table containing the model enclosing this record, for instance) to handle the hiding and unhiding of the record.

The PTF record table model can identify hidden records in its set of records.

Returns:
true if the record should be hidden, false otherwise.

setHidden

public void setHidden(boolean b)
Sets the 'hidden' attribute for this record. This attribute is simply a hint. It is up to the enclosing model and its enclosing table to act on this attribute.

Use PTF_Record_Table_Model.hideRow(int) to handle properly the hiding and unhiding of duplicates of this record.

Parameters:
b - true to hide this record, false to unhide it.

isDuplicate

public boolean isDuplicate()
Indicates whether this record is a duplicate of another record. This attribute is simply a hint. It is up to the enclosing model and its enclosing table to act on and manage this attribute.

The PTF record table model can identify duplicates in its set of records.

Returns:
true if this record should be considered a duplicate, false otherwise.

setDuplicate

public void setDuplicate(boolean b)
Sets the 'duplicate' attribute for this record. This attribute is simply a hint and is not necessarily related to the record's uniqueness. It is up to the enclosing model and its enclosing table to act on this attribute.

Parameters:
b - true to flag this record as a duplicate, false if not.

HiRISE

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