Package org.obolibrary.robot
Class ExportOperation
- java.lang.Object
-
- org.obolibrary.robot.ExportOperation
-
public class ExportOperation extends Object
- Author:
- Becky Jackson
-
-
Field Summary
Fields Modifier and Type Field Description protected static EmptyIRIShortFormProvider
emptyIRIProvider
protected static EmptyShortFormProvider
emptyProvider
-
Constructor Summary
Constructors Constructor Description ExportOperation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Table
createExportTable(org.semanticweb.owlapi.model.OWLOntology ontology, IOHelper ioHelper, List<String> columnNames, Map<String,String> options)
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.static Map<String,String>
getDefaultOptions()
Return a map from option name to default option value, for all the available export options.static void
saveTable(Table table, String exportPath, Map<String,String> options)
Save the Table object as: csv, tsv, html, json, or xlsx.
-
-
-
Field Detail
-
emptyProvider
protected static final EmptyShortFormProvider emptyProvider
-
emptyIRIProvider
protected static final EmptyIRIShortFormProvider emptyIRIProvider
-
-
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 tableioHelper
- IOHelper to handle labelscolumnNames
- List of column names, in orderoptions
- 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 saveexportPath
- path to export fileoptions
- map of export options- Throws:
Exception
- on writing file, or if format is unknown
-
-