Class XTCEDatabaseExporter

  • Direct Known Subclasses:
    XTCEDatabaseExporterCsv

    public abstract class XTCEDatabaseExporter
    extends Object
    The XTCEDatabaseExporter class is an abstract base class for providing an interface to implement specific exporter classes.
    • Constructor Detail

      • XTCEDatabaseExporter

        public XTCEDatabaseExporter​(XTCEDatabase db,
                                    Properties properties,
                                    Charset charEncoding)
                             throws XTCEDatabaseException
        Constructor The exporter object needs to be constructed with a list of properties. These properties inform how the data is output. The list of property keys and their default values is:
        • use_header_row = "true". This property indicates if the column headers should be included in the output.
        • show_all_alias_namespaces = "true". This property indicates if all of the Aliases in the AliasSet should be output (space delimited)
        • show_alias_namespaces = "true". This property indicates if the alias namespace should be shown in front of the alias, e.g NS::ALIAS.
        • preferred_alias_namespace = "". This property restricts the alias output to a specific namespace. This is ignored if the property show_all_alias_namespaces is "true".
        • show_all_conditions = "false". This property restricts the container conditional depth to stop at the first non-included container when a container is conditionally included in another container.
        Parameters:
        db - XTCEDatabase object to export from.
        properties - Properties object containing potential modifiers for use by this exporter. The object may be null, in which case all default properties are used.
        charEncoding - Charset to encode the output text as.
        Throws:
        XTCEDatabaseException - in the event that the database object is null.
    • Method Detail

      • exportParameters

        public List<String> exportParameters​(File outFile)
                                      throws XTCEDatabaseException
        Export the parameters in the XTCE file represented by an XTCEDatabase object. This class needs to be implemented for each specific exporter. The exporter should throw on critical filesystem errors, but any export warnings/errors should be returned in the ArrayList of String so that the caller can evaluate these independent of filesystem errors. The XTCEDatabase object is provided to the constructor of this class, along with a Properties object that contains modifier information.
        Parameters:
        outFile - File object to export to the data to.
        Returns:
        List containing 0 or more error/warning messages.
        Throws:
        XTCEDatabaseException - thrown in the event that the file cannot be opened/written/etc.
      • exportContainers

        public List<String> exportContainers​(File outFile)
                                      throws XTCEDatabaseException
        Export the telemetry containers in the XTCE file represented by an XTCEDatabase object. This class needs to be implemented for each specific exporter. The exporter should throw on critical filesystem errors, but any export warnings/errors should be returned in the ArrayList of String so that the caller can evaluate these independent of filesystem errors. The XTCEDatabase object is provided to the constructor of this class, along with a Properties object that contains modifier information.
        Parameters:
        outFile - File object to export to the data to.
        Returns:
        List containing 0 or more error/warning messages.
        Throws:
        XTCEDatabaseException - thrown in the event that the file cannot be opened/written/etc.
      • exportTelecommands

        public List<String> exportTelecommands​(File outFile)
                                        throws XTCEDatabaseException
        Export the telecommands in the XTCE file represented by an XTCEDatabase object. This class needs to be implemented for each specific exporter. The exporter should throw on critical filesystem errors, but any export warnings/errors should be returned in the ArrayList of String so that the caller can evaluate these independent of filesystem errors. The XTCEDatabase object is provided to the constructor of this class, along with a Properties object that contains modifier information.
        Parameters:
        outFile - File object to export to the data to.
        Returns:
        List containing 0 or more error/warning messages.
        Throws:
        XTCEDatabaseException - thrown in the event that the file cannot be opened/written/etc.