Class ExportOperation

    • Constructor Detail

      • ExportOperation

        public ExportOperation()
    • Method Detail

      • getDefaultOptions

        public static Map<String,​String> getDefaultOptions()
        Return a map from option name to default option value, for all the available export options.
        Returns:
        a map with default values for all available options
      • createExportTable

        public static Table createExportTable​(org.semanticweb.owlapi.model.OWLOntology ontology,
                                              IOHelper ioHelper,
                                              List<String> columnNames,
                                              Map<String,​String> options)
                                       throws Exception
        Given an ontology, an ioHelper, a list of columns, an output export file, and a map of options, export details about the entities in the ontology to the export file. Use the columns to determine which details are included in the output.
        Parameters:
        ontology - OWLOntology to export to table
        ioHelper - IOHelper to handle labels
        columnNames - List of column names, in order
        options - Map of Export options
        Returns:
        Table object
        Throws:
        Exception - if file does not exist to write to or a column is not a valid property
      • saveTable

        public static void saveTable​(Table table,
                                     String exportPath,
                                     Map<String,​String> options)
                              throws Exception
        Save the Table object as: csv, tsv, html, json, or xlsx.
        Parameters:
        table - Table object to save
        exportPath - path to export file
        options - map of export options
        Throws:
        Exception - on writing file, or if format is unknown