Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.5 alpha
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`static Operation` | `EXPORT_TO_CSV_OPERATION`

Fields inherited from class edu.stanford.smi.protege.util.StandardAction
`DISABLED_ICON`

Fields inherited from class javax.swing.AbstractAction
`changeSupport, enabled`

Fields inherited from interface javax.swing.Action
`ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON`

Constructor Summary
`` | `ExportToCsvAction(KnowledgeBase kb)`
`protected` | `ExportToCsvAction(KnowledgeBase kb, String name, Icon icon)`

Method Summary
`void` | `actionPerformed(ActionEvent arg0)`
`boolean` | `export()`
`boolean` | `exportCompletedSuccessful()`
`protected ExportConfigurationPanel` | `getExportConfigurationPanel()`
`protected String` | `getExportDataValueName(Object data)`
`File` | `getExportFile()`
`String` | `getExportMetadata()`
`protected String` | `getExportName(Frame frame)`
`protected Collection<Cls>` | `getInitialExportClses()`
`Collection<Instance>` | `getInstancesToExport()`
`KnowledgeBase` | `getKnowledgeBase()`
`protected Component` | `getParentComponent()`
`protected String` | `getQuotedValule(String value)`
`String` | `getSlotsDelimiter()`
`Collection<Slot>` | `getSlotsToExport()`
`String` | `getSlotValuesDelimiter()`
`protected String` | `getSlotValuesExportString(Instance instance, Slot slot)`
`protected Collection<Cls>` | `getSuperclassesToExport(Instance inst)`
`boolean` | `isExportBrowserTextEnabled()`
`boolean` | `isExportHeader()`
`boolean` | `isExportMetadata()`
`boolean` | `isExportSuperclass()`
`boolean` | `isExportTypes()`
`protected void` | `printHeader(PrintWriter writer, Collection<Slot> slots)`
`protected void` | `printInstance(PrintWriter writer, Instance instance)`
`protected void` | `printResults(Writer writer, Collection<Instance> instances, Collection<Slot> slots)`
`void` | `setExportBrowserText(boolean exportBrowserText)`
`void` | `setExportFile(File exportFile)`
`void` | `setExportHeader(boolean exportHeader)`
`void` | `setExportMetadata(boolean exportMetadata)`
`void` | `setExportMetadata(String metadata)`
`void` | `setExportSuperclass(boolean exportSuperclass)`
`void` | `setExportTypes(boolean exportTypes)`
`void` | `setFramesWithBrowserTextToExport(Collection<FrameWithBrowserText> frames)`
`void` | `setInstancesToExport(Collection<Instance> instancesToExport)`
`void` | `setSlotsDelimiter(String slotsDelimiter)`
`void` | `setSlotsToExport(Collection<Slot> slotsToExport)`
`void` | `setSlotValuesDelimiter(String slotValuesDelimiter)`

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`

Methods inherited from class javax.swing.AbstractAction
`addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### EXPORT_TO_CSV_OPERATION

    public static final Operation EXPORT_TO_CSV_OPERATION

Constructor Detail

### ExportToCsvAction

    public ExportToCsvAction(KnowledgeBase kb)

### ExportToCsvAction

    protected ExportToCsvAction(KnowledgeBase kb,
                                String name,
                                Icon icon)

Method Detail

### 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)

### getExportDataValueName

    protected String getExportDataValueName(Object data)

### 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()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.5 alpha
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2012 Stanford University.