Package org.orekit.files.ccsds.ndm
Class AbstractBuilder<T extends AbstractBuilder<T>>
- java.lang.Object
-
- org.orekit.files.ccsds.ndm.AbstractBuilder<T>
-
- Type Parameters:
T
- type of the builder
- Direct Known Subclasses:
ParserBuilder
,WriterBuilder
public abstract class AbstractBuilder<T extends AbstractBuilder<T>> extends Object
Abstract builder for allCCSDS Message
files parsers/writers.- Since:
- 11.0
- Author:
- Luc Maisonobe
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBuilder(IERSConventions conventions, double equatorialRadius, double flattening, DataContext dataContext, AbsoluteDate missionReferenceDate, RangeUnitsConverter rangeUnitsConverter)
Complete constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract T
create(IERSConventions newConventions, double newEquatorialRadius, double newFlattening, DataContext newDataContext, AbsoluteDate newMissionReferenceDate, RangeUnitsConverter newRangeUnitsConverter)
Build an instance.IERSConventions
getConventions()
Get the IERS conventions.DataContext
getDataContext()
Get the data context.double
getEquatorialRadius()
Get the central body equatorial radius.double
getFlattening()
Get the central body flattening.AbsoluteDate
getMissionReferenceDate()
Get the mission reference date or Mission Elapsed Time or Mission Relative Time time systems.RangeUnitsConverter
getRangeUnitsConverter()
Get the converter forRange Units
.T
withConventions(IERSConventions newConventions)
Set up IERS conventions.T
withDataContext(DataContext newDataContext)
Set up data context used to retrieve frames, time scales, etc..T
withEquatorialRadius(double newEquatorialRadius)
Set up the central body equatorial radius.T
withFlattening(double newFlattening)
Set up the central body flattening.T
withMissionReferenceDate(AbsoluteDate newMissionReferenceDate)
Set up mission reference date or Mission Elapsed Time or Mission Relative Time time systems.T
withRangeUnitsConverter(RangeUnitsConverter newRangeUnitsConverter)
Set up the converter forRange Units
.
-
-
-
Constructor Detail
-
AbstractBuilder
protected AbstractBuilder(IERSConventions conventions, double equatorialRadius, double flattening, DataContext dataContext, AbsoluteDate missionReferenceDate, RangeUnitsConverter rangeUnitsConverter)
Complete constructor.- Parameters:
conventions
- IERS ConventionsequatorialRadius
- central body equatorial radiusflattening
- central body flatteningdataContext
- used to retrieve frames, time scales, etc.missionReferenceDate
- reference date for Mission Elapsed Time or Mission Relative Time time systemsrangeUnitsConverter
- converter forRange Units
-
-
Method Detail
-
create
protected abstract T create(IERSConventions newConventions, double newEquatorialRadius, double newFlattening, DataContext newDataContext, AbsoluteDate newMissionReferenceDate, RangeUnitsConverter newRangeUnitsConverter)
Build an instance.- Parameters:
newConventions
- IERS ConventionsnewEquatorialRadius
- central body equatorial radiusnewFlattening
- central body flatteningnewDataContext
- used to retrieve frames, time scales, etc.newMissionReferenceDate
- reference date for Mission Elapsed Time or Mission Relative Time time systemsnewRangeUnitsConverter
- converter forRange Units
- Returns:
- new instance
-
withConventions
public T withConventions(IERSConventions newConventions)
Set up IERS conventions.- Parameters:
newConventions
- IERS Conventions- Returns:
- a new builder with updated configuration (the instance is not changed)
-
getConventions
public IERSConventions getConventions()
Get the IERS conventions.- Returns:
- IERS conventions
-
withEquatorialRadius
public T withEquatorialRadius(double newEquatorialRadius)
Set up the central body equatorial radius.- Parameters:
newEquatorialRadius
- central body equatorial radius- Returns:
- a new builder with updated configuration (the instance is not changed)
-
getEquatorialRadius
public double getEquatorialRadius()
Get the central body equatorial radius.- Returns:
- central body equatorial radius
-
withFlattening
public T withFlattening(double newFlattening)
Set up the central body flattening.- Parameters:
newFlattening
- central body flattening- Returns:
- a new builder with updated configuration (the instance is not changed)
-
getFlattening
public double getFlattening()
Get the central body flattening.- Returns:
- central body flattening
-
withDataContext
public T withDataContext(DataContext newDataContext)
Set up data context used to retrieve frames, time scales, etc..- Parameters:
newDataContext
- data context used to retrieve frames, time scales, etc.- Returns:
- a new builder with updated configuration (the instance is not changed)
-
getDataContext
public DataContext getDataContext()
Get the data context.- Returns:
- data context used to retrieve frames, time scales, etc.
-
withMissionReferenceDate
public T withMissionReferenceDate(AbsoluteDate newMissionReferenceDate)
Set up mission reference date or Mission Elapsed Time or Mission Relative Time time systems.The mission reference date is used only by
AemParser
andApmParser
, and byOpmParser
,OmmParser
andOemParser
up to version 2.0 of ODM (starting with version 3.0 of ODM, both MET and MRT time system have been withdrawn from the standard).- Parameters:
newMissionReferenceDate
- mission reference date or Mission Elapsed Time or Mission Relative Time time systems- Returns:
- a new builder with updated configuration (the instance is not changed)
-
getMissionReferenceDate
public AbsoluteDate getMissionReferenceDate()
Get the mission reference date or Mission Elapsed Time or Mission Relative Time time systems.- Returns:
- mission reference date
-
withRangeUnitsConverter
public T withRangeUnitsConverter(RangeUnitsConverter newRangeUnitsConverter)
Set up the converter forRange Units
.- Parameters:
newRangeUnitsConverter
- converter forRange Units
- Returns:
- a new builder with updated configuration (the instance is not changed)
-
getRangeUnitsConverter
public RangeUnitsConverter getRangeUnitsConverter()
Get the converter forRange Units
.- Returns:
- converter for
Range Units
-
-