Package org.orekit.files.ccsds.ndm.odm
Class PythonOdmParser<T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>>
- java.lang.Object
-
- org.orekit.files.ccsds.utils.parsing.AbstractMessageParser<T>
-
- org.orekit.files.ccsds.utils.parsing.AbstractConstituentParser<OdmHeader,T,P>
-
- org.orekit.files.ccsds.ndm.odm.OdmParser<T,P>
-
- org.orekit.files.ccsds.ndm.odm.PythonOdmParser<T,P>
-
- All Implemented Interfaces:
MessageParser<T>
public class PythonOdmParser<T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>> extends OdmParser<T,P>
-
-
Constructor Summary
Constructors Constructor Description PythonOdmParser(String root, String formatVersionKey, IERSConventions conventions, boolean simpleEOP, DataContext dataContext, AbsoluteDate missionReferenceDate, double mu, ParsedUnitsBehavior parsedUnitsBehavior, Function<ParseToken,List<ParseToken>>[] filters)
Complete constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
build()
Build the file from parsed entries.void
finalize()
Part of JCC Python interface to objectboolean
finalizeData()
Finalize data after parsing.boolean
finalizeHeader()
Finalize header after parsing.boolean
finalizeMetadata()
Finalize metadata after parsing.FileFormat
getFileFormat()
Get the file format.OdmHeader
getHeader()
Get file header to fill.double
getMuSet()
Get the gravitational coefficient set at construction.boolean
inData()
Acknowledge data parsing has started.boolean
inHeader()
Acknowledge header parsing has started.boolean
inMetadata()
Acknowledge metada parsing has started.boolean
prepareData()
Prepare data for parsing.boolean
prepareHeader()
Prepare header for parsing.boolean
prepareMetadata()
Prepare metadata for parsing.void
pythonDecRef()
Part of JCC Python interface to objectlong
pythonExtension()
Part of JCC Python interface to objectvoid
pythonExtension(long pythonObject)
Part of JCC Python interface to objectvoid
reset(FileFormat fileFormat)
Reset parser to initial state before parsing.void
setMuCreated(double muCreated)
Set the gravitational coefficient created from the knowledge of the central body.void
setMuParsed(double muParsed)
Set the gravitational coefficient parsed in the ODM File.-
Methods inherited from class org.orekit.files.ccsds.ndm.odm.OdmParser
getMissionReferenceDate, getSelectedMu
-
Methods inherited from class org.orekit.files.ccsds.utils.parsing.AbstractConstituentParser
getConventions, getDataContext, getParsedUnitsBehavior, isSimpleEOP
-
Methods inherited from class org.orekit.files.ccsds.utils.parsing.AbstractMessageParser
anticipateNext, getCurrent, getFormatVersionKey, getSpecialXmlElementsBuilders, parseMessage, process, reset, setEndTagSeen, setFallback, wasEndTagSeen
-
-
-
-
Constructor Detail
-
PythonOdmParser
public PythonOdmParser(String root, String formatVersionKey, IERSConventions conventions, boolean simpleEOP, DataContext dataContext, AbsoluteDate missionReferenceDate, double mu, ParsedUnitsBehavior parsedUnitsBehavior, Function<ParseToken,List<ParseToken>>[] filters)
Complete constructor.- Parameters:
root
- root element for XML filesformatVersionKey
- key for format versionconventions
- IERS ConventionssimpleEOP
- if true, tidal effects are ignored when interpolating EOPdataContext
- used to retrieve frames and time scalesmissionReferenceDate
- reference date for Mission Elapsed Time or Mission Relative Time time systemsmu
- gravitational coefficientparsedUnitsBehavior
- behavior to adopt for handling parsed unitsfilters
- filters to apply to parse tokens- Since:
- 12.0
-
-
Method Detail
-
getMuSet
public double getMuSet()
Get the gravitational coefficient set at construction.
-
setMuParsed
public void setMuParsed(double muParsed)
Set the gravitational coefficient parsed in the ODM File.- Overrides:
setMuParsed
in classOdmParser<T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>>
- Parameters:
muParsed
- the coefficient to be set
-
setMuCreated
public void setMuCreated(double muCreated)
Set the gravitational coefficient created from the knowledge of the central body.- Overrides:
setMuCreated
in classOdmParser<T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>>
- Parameters:
muCreated
- the coefficient to be set
-
pythonExtension
public void pythonExtension(long pythonObject)
Part of JCC Python interface to object
-
pythonExtension
public long pythonExtension()
Part of JCC Python interface to object
-
finalize
public void finalize() throws Throwable
Part of JCC Python interface to object
-
pythonDecRef
public void pythonDecRef()
Part of JCC Python interface to object
-
reset
public void reset(FileFormat fileFormat)
Reset parser to initial state before parsing.- Parameters:
fileFormat
- format of the file ready to be parsed
-
build
public T build()
Build the file from parsed entries.- Returns:
- parsed file
-
getHeader
public OdmHeader getHeader()
Get file header to fill.- Specified by:
getHeader
in classAbstractConstituentParser<OdmHeader,T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>>
- Returns:
- file header to fill
-
prepareHeader
public boolean prepareHeader()
Prepare header for parsing.- Specified by:
prepareHeader
in classAbstractConstituentParser<OdmHeader,T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>>
- Returns:
- true if parser was able to perform the action
-
inHeader
public boolean inHeader()
Acknowledge header parsing has started.- Specified by:
inHeader
in classAbstractConstituentParser<OdmHeader,T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>>
- Returns:
- true if parser was able to perform the action
-
finalizeHeader
public boolean finalizeHeader()
Finalize header after parsing.- Specified by:
finalizeHeader
in classAbstractConstituentParser<OdmHeader,T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>>
- Returns:
- true if parser was able to perform the action
-
prepareMetadata
public boolean prepareMetadata()
Prepare metadata for parsing.- Specified by:
prepareMetadata
in classAbstractConstituentParser<OdmHeader,T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>>
- Returns:
- true if parser was able to perform the action
-
inMetadata
public boolean inMetadata()
Acknowledge metada parsing has started.- Specified by:
inMetadata
in classAbstractConstituentParser<OdmHeader,T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>>
- Returns:
- true if parser was able to perform the action
-
finalizeMetadata
public boolean finalizeMetadata()
Finalize metadata after parsing.- Specified by:
finalizeMetadata
in classAbstractConstituentParser<OdmHeader,T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>>
- Returns:
- true if parser was able to perform the action
-
prepareData
public boolean prepareData()
Prepare data for parsing.- Specified by:
prepareData
in classAbstractConstituentParser<OdmHeader,T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>>
- Returns:
- true if parser was able to perform the action
-
inData
public boolean inData()
Acknowledge data parsing has started.- Specified by:
inData
in classAbstractConstituentParser<OdmHeader,T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>>
- Returns:
- true if parser was able to perform the action
-
finalizeData
public boolean finalizeData()
Finalize data after parsing.- Specified by:
finalizeData
in classAbstractConstituentParser<OdmHeader,T extends NdmConstituent<OdmHeader,?>,P extends OdmParser<T,?>>
- Returns:
- true if parser was able to perform the action
-
getFileFormat
public FileFormat getFileFormat()
Get the file format.- Specified by:
getFileFormat
in interfaceMessageParser<T extends NdmConstituent<OdmHeader,?>>
- Overrides:
getFileFormat
in classAbstractMessageParser<T extends NdmConstituent<OdmHeader,?>>
- Returns:
- file format
-
-