Package org.aavso.tools.vstar.util
Class ObservationInserter
java.lang.Object
org.aavso.tools.vstar.input.AbstractObservationRetriever
org.aavso.tools.vstar.util.ObservationInserter
Minimally overridden retriever that can be used to maintain observation order
when user defined observations are added to the initial observation set. It's
a slight abuse of this base class and arguably the addValidObservation() method
called by updateObservationsList() should be factored out of the retriever base
class. Yet it has the desired effect without code duplication.
-
Field Summary
Fields inherited from class org.aavso.tools.vstar.input.AbstractObservationRetriever
DEFAULT_CAPACITY, interrupted, invalidObservations, jdFlavour, MAGNITUDE, NO_VELA_FILTER, validObservationCategoryMap, validObservations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddValidObservations(List<ValidObservation> observations) Add observations to the current list, maintaining ordering, also keeping track of min/max magnitude values, accessible via get{Min,Max}Mag() methods.Retrieve the name of the source of the observations.Retrieve the type of the source of the observations.voidRetrieve the set of observations from the specified source.Methods inherited from class org.aavso.tools.vstar.input.AbstractObservationRetriever
addAllInvalidObservations, addInvalidObservation, addValidObservation, collectAllObservations, collectObservation, getBrightnessUnits, getDomainTitle, getInvalidObservations, getJDflavour, getMaxMag, getMinMag, getNumberOfRecords, getRangeTitle, getStarInfo, getTimeUnits, getValidObservationCategoryMap, getValidObservations, incrementProgress, incrementProgress, insertObservation, isBarycentric, isHeliocentric, removeNegativeBytes, seriesToExcludeWhenAdditive, setBarycentric, setHeliocentric, setJDflavour, setMaxMag, setMinMag, setVelaFilter, wasInterrupted
-
Constructor Details
-
ObservationInserter
public ObservationInserter() -
ObservationInserter
-
-
Method Details
-
addValidObservations
Add observations to the current list, maintaining ordering, also keeping track of min/max magnitude values, accessible via get{Min,Max}Mag() methods.- Parameters:
observations- The observations to be added.- Returns:
- The complete updated list of observations.
-
retrieveObservations
Description copied from class:AbstractObservationRetrieverRetrieve the set of observations from the specified source.- Specified by:
retrieveObservationsin classAbstractObservationRetriever- Throws:
ObservationReadErrorInterruptedException
-
getSourceType
Description copied from class:AbstractObservationRetrieverRetrieve the type of the source of the observations.- Specified by:
getSourceTypein classAbstractObservationRetriever- Returns:
- The source type.
-
getSourceName
Description copied from class:AbstractObservationRetrieverRetrieve the name of the source of the observations.- Specified by:
getSourceNamein classAbstractObservationRetriever- Returns:
- The source name.
-