edu.stanford.smi.protege.action
Class ExportToCsvAction
java.lang.Object
javax.swing.AbstractAction
edu.stanford.smi.protege.util.StandardAction
edu.stanford.smi.protege.action.ExportToCsvAction
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
public class ExportToCsvAction
- extends StandardAction
This action class allows the export of an instance list to a CSV file.
Delimiters between different slots and slots values can be configured
(see setSlotsDelimiter(String)
and setSlotValuesDelimiter(String)
).
Slots to be exported for each instance can be configured (see setSlotsToExport(Collection)
.
It works both with an UI and without. To use it without a UI, call the setter methods to configure the
export action and then call export()
.
- Author:
- Tania Tudorache
- See Also:
- Serialized Form
Methods inherited from class edu.stanford.smi.protege.util.StandardAction |
equals, getIcon, getName, getName, initialize, setDescription, setDescription, setDisabledIcon, setDisabledIcon, setIcon, setIcon, setMnemonic, setMnemonic, setName, setName, setShortcut, setShortcut, substituteIntoName |
EXPORT_TO_CSV_OPERATION
public static final Operation EXPORT_TO_CSV_OPERATION
ExportToCsvAction
public ExportToCsvAction(KnowledgeBase kb)
ExportToCsvAction
protected ExportToCsvAction(KnowledgeBase kb,
String name,
Icon icon)
actionPerformed
public void actionPerformed(ActionEvent arg0)
export
public boolean export()
printResults
protected void printResults(Writer writer,
Collection<Instance> instances,
Collection<Slot> slots)
printHeader
protected void printHeader(PrintWriter writer,
Collection<Slot> slots)
printInstance
protected void printInstance(PrintWriter writer,
Instance instance)
getSlotValuesExportString
protected String getSlotValuesExportString(Instance instance,
Slot slot)
getQuotedValule
protected String getQuotedValule(String value)
getExportName
protected String getExportName(Frame frame)
getExportConfigurationPanel
protected ExportConfigurationPanel getExportConfigurationPanel()
getSuperclassesToExport
protected Collection<Cls> getSuperclassesToExport(Instance inst)
getParentComponent
protected Component getParentComponent()
getInitialExportClses
protected Collection<Cls> getInitialExportClses()
getKnowledgeBase
public KnowledgeBase getKnowledgeBase()
getInstancesToExport
public Collection<Instance> getInstancesToExport()
setInstancesToExport
public void setInstancesToExport(Collection<Instance> instancesToExport)
setFramesWithBrowserTextToExport
public void setFramesWithBrowserTextToExport(Collection<FrameWithBrowserText> frames)
getExportFile
public File getExportFile()
setExportFile
public void setExportFile(File exportFile)
getSlotsToExport
public Collection<Slot> getSlotsToExport()
setSlotsToExport
public void setSlotsToExport(Collection<Slot> slotsToExport)
setExportMetadata
public void setExportMetadata(String metadata)
getExportMetadata
public String getExportMetadata()
isExportHeader
public boolean isExportHeader()
setExportHeader
public void setExportHeader(boolean exportHeader)
isExportTypes
public boolean isExportTypes()
setExportTypes
public void setExportTypes(boolean exportTypes)
isExportMetadata
public boolean isExportMetadata()
setExportMetadata
public void setExportMetadata(boolean exportMetadata)
setExportSuperclass
public void setExportSuperclass(boolean exportSuperclass)
isExportSuperclass
public boolean isExportSuperclass()
getSlotValuesDelimiter
public String getSlotValuesDelimiter()
setSlotValuesDelimiter
public void setSlotValuesDelimiter(String slotValuesDelimiter)
getSlotsDelimiter
public String getSlotsDelimiter()
setSlotsDelimiter
public void setSlotsDelimiter(String slotsDelimiter)
isExportBrowserTextEnabled
public boolean isExportBrowserTextEnabled()
setExportBrowserText
public void setExportBrowserText(boolean exportBrowserText)
exportCompletedSuccessful
public boolean exportCompletedSuccessful()
Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2010 Stanford University.