Module omix.api
Package omix.plugin

Interface ModelDocument

All Superinterfaces:
Document

public interface ModelDocument
extends Document
This interface type represents an active network model document.
Since:
Omix 2.0.0
Author:
Dr. Peter Droste, Omix Visualization
  • Method Details

    • getModel

      Model getModel()
      Complete readable access to the network model, all its components and OVL defined members.
      Returns:
      model
    • getWritableModel

      Model getWritableModel()
      Complete writable access to the network model, all its components and OVL defined members.
      Returns:
      model
    • requestImportDocumentProcedure

      void requestImportDocumentProcedure​(ModelReader modelReader)
      Importing a network into the current document. After calling this method, the access manager calls ModelReader.readModel(omix.plugin.model.writable.Model, omix.plugin.io.util.InputUtilities). The plugin can implement this interface to perform a certain model read and composition procedure. Finally, the new model is merged into the current open network model document. If no model document is active, the request is skipped.
      Parameters:
      modelReader - the model reader.
    • requestExportDocumentProcedure

      void requestExportDocumentProcedure​(ModelWriter modelWriter)
      Exporting the current network document. After calling this method, the access manager calls ModelWriter.writeModel(omix.plugin.model.Model, omix.plugin.io.util.OutputUtilities). The plugin can implement the ModelWriter interface to perform a certain model write procedure. If no model document is active, the request is skipped.
      Parameters:
      modelWriter - the model writing object.
    • exportDiagramImageToData

      RawData exportDiagramImageToData​(String dialogtitle, String format) throws SilentAbort
      This method allows a plug-in to ask the network diagram for being exported as image. The plug-in can use all installed image export filters even of other plug-ins.
      Parameters:
      dialogtitle - Title of the image export dialog.
      format - the image format or null when user shall choose.
      Returns:
      the image data or null if image export was denied.
      Throws:
      SilentAbort - if procedure was canceled by user.
    • exportDocumentToData

      RawData exportDocumentToData​(String dialogtitle, String format) throws SilentAbort
      Exporting the current network document to byte array. The plug-in can use all installed model export filters even of other plug-ins. If no model document is active, the request is skipped.
      Parameters:
      dialogtitle - Title of the model export dialog.
      format - the file format or null when user shall choose.
      Returns:
      the model data or null if model export was denied.
      Throws:
      SilentAbort - if procedure was canceled by user.
    • exportDocumentToData

      RawData exportDocumentToData​(String dialogtitle, String format, ProgressListener progressListener) throws SilentAbort
      Exporting the current network document to byte array. The plug-in can use all installed model export filters even of other plug-ins. If no model document is active, the request is skipped.
      Parameters:
      dialogtitle - Title of the model export dialog.
      format - the file format or null when user shall choose.
      progressListener - a custom ProgressListener that manages progress reports.
      Returns:
      the model data or null if model export was denied.
      Throws:
      SilentAbort - if procedure was canceled by user.
    • importDocumentFromData

      void importDocumentFromData​(byte[] data, String format)
      Opening a network as new document. The plug-in can use all installed model export filters even of other plug-ins. Finally, the new model is loaded as new network model document.
      Parameters:
      data - the model data.
      format - the file format of the data.
    • getDataManager

      DataManager getDataManager()
      Access to the data manager of this document.
      Returns:
      DataManager
    • requestOpenDataSource

      boolean requestOpenDataSource​(DataSourceInterface dataSource, String suggestedIdentifier)
      Loading the submitted DataSourceInterface instance into the data manager widget.
      Parameters:
      dataSource - the data source.
      suggestedIdentifier - the suggested identifier of the data source
      Returns:
      true in case of success
    • requestOpenDataSource

      boolean requestOpenDataSource​(URL dataSourceURL)
      Loading the data source into the data manager widget.
      Parameters:
      dataSourceURL - the URL to the data source.
      Returns:
      true in case of success