cfa.vo.iris.sed
Interface IPoint<DataModelClass,SegmentClass>

All Known Implementing Classes:
SpectroPhotometricPoint

public interface IPoint<DataModelClass,SegmentClass>

Generic class for points. The parameters must be constrained to the data model class the point is representing and to the segment class it can be added to.

Author:
olaurino

Method Summary
 void addToSegment(SegmentClass segment)
          Add this point to a specific segment.
 Class getDataModelClass()
          Get the Data Model class for this point.
 DataModelClass getDataModelInstance()
          Get an instance of the Data Model representing this point.
 IList<SegmentClass> getSegments()
          List of segments this point belongs to.
 void removeFromSegment(SegmentClass segment)
          Remove this point from a segment.
 void setDataModelInstance(DataModelClass instance)
          Set the "value" of this point, by providing an instance of the Data Model class.
 

Method Detail

getSegments

IList<SegmentClass> getSegments()
List of segments this point belongs to. The same point can belong to different segments at the same time. It is up to the client to make sure that this potential redundancy doesn't lead to inconsistencies, for example that the same point doesn't get fitted more than once.

Returns:
An IList of extended segments

getDataModelInstance

DataModelClass getDataModelInstance()
Get an instance of the Data Model representing this point. the Data Model is the "value" of the point according to some model.

Returns:
An instance of the parameter class, i.e. of the Data Model represented by this point.

setDataModelInstance

void setDataModelInstance(DataModelClass instance)
Set the "value" of this point, by providing an instance of the Data Model class.

Parameters:
instance - The Data Model instance that stores the "value" of this point.

getDataModelClass

Class getDataModelClass()
Get the Data Model class for this point. This method allows clients to cast the point Data Model to the correct subclass, if known to the client, so to leverage subtype polymorphism in both directions.

Returns:
The actual class of this data point Data Model

addToSegment

void addToSegment(SegmentClass segment)
                  throws SedException
Add this point to a specific segment.

Parameters:
segment - The segment this point must be added to.
Throws:
SedException - This method throws an exception if the point is somehow inconsistent with the segment it is being tried to be added to.

removeFromSegment

void removeFromSegment(SegmentClass segment)
Remove this point from a segment.

Parameters:
segment - The segment this point has to be removed from


Copyright © 2013. All rights reserved.