- 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 Summary
Modifier and Type Method Description RawData
exportDiagramImageToData(String dialogtitle, String format)
This method allows a plug-in to ask the network diagram for being exported as image.RawData
exportDocumentToData(String dialogtitle, String format)
Exporting the current network document to byte array.RawData
exportDocumentToData(String dialogtitle, String format, ProgressListener progressListener)
Exporting the current network document to byte array.DataManager
getDataManager()
Access to the data manager of this document.Model
getModel()
Complete readable access to the network model, all its components and OVL defined members.Model
getWritableModel()
Complete writable access to the network model, all its components and OVL defined members.void
importDocumentFromData(byte[] data, String format)
Opening a network as new document.void
requestExportDocumentProcedure(ModelWriter modelWriter)
Exporting the current network document.void
requestImportDocumentProcedure(ModelReader modelReader)
Importing a network into the current document.boolean
requestOpenDataSource(URL dataSourceURL)
Loading the data source into the data manager widget.boolean
requestOpenDataSource(DataSourceInterface dataSource, String suggestedIdentifier)
Loading the submittedDataSourceInterface
instance into the data manager widget.
-
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
Importing a network into the current document. After calling this method, the access manager callsModelReader.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
Exporting the current network document. After calling this method, the access manager callsModelWriter.writeModel(omix.plugin.model.Model, omix.plugin.io.util.OutputUtilities)
. The plugin can implement theModelWriter
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
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
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 SilentAbortExporting 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
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
Loading the submittedDataSourceInterface
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
Loading the data source into the data manager widget.- Parameters:
dataSourceURL
- the URL to the data source.- Returns:
- true in case of success
-