Class ExportTool2

java.lang.Object
java.util.Observable
com.nomagic.magicreport.engine.Tool
com.nomagic.magicreport.engine.ConcurrentTool
com.nomagic.magicdraw.magicreport.tools.ExportTool2
All Implemented Interfaces:
com.nomagic.magicreport.engine.ITool, com.nomagic.magicreport.IVariable, Serializable, Cloneable

@Deprecated @OpenApiAll public class ExportTool2 extends com.nomagic.magicreport.engine.ConcurrentTool
Deprecated.
Deprecated class, use ExportTool3 instead. This class allow report to export element in other file format including tree folder.
Since:
Mar 14, 2012
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.nomagic.magicreport.engine.ConcurrentTool

    com.nomagic.magicreport.engine.ConcurrentTool.ConsumeObject

    Nested classes/interfaces inherited from interface com.nomagic.magicreport.engine.ITool

    com.nomagic.magicreport.engine.ITool.HTMLString, com.nomagic.magicreport.engine.ITool.RetainedString, com.nomagic.magicreport.engine.ITool.Void
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated.
    Contains a context name.

    Fields inherited from class com.nomagic.magicreport.engine.Tool

    context, properties

    Fields inherited from interface com.nomagic.magicreport.engine.ITool

    VOID
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
    Create an export tool.
    ExportTool2(com.nomagic.magicreport.engine.ITemplateEngine engine, Observer observer)
    Deprecated.
    Create an export tool with observer.
    Deprecated.
    Create an export tool with observer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    consume(com.nomagic.magicreport.engine.ConcurrentTool.ConsumeObject consumeObject)
    Deprecated.
    Consume a object.
    protected Element
    createAndExportElement(Document document, Element exportingElement, boolean exportResources, boolean exportLinkedFile, com.nomagic.magicdraw.ui.ElementFilter filter)
    Deprecated.
     
    protected Element
    createAndExportElement(Document document, Element exportingElement, boolean exportResources, boolean exportLinkedFile, com.nomagic.magicdraw.ui.ElementFilter filter, boolean isSmart)
    Deprecated.
     
    protected Element
    createAndExportSmartElement(Document document, Element exportingElement, boolean exportResources, boolean exportLinkedFile, com.nomagic.magicdraw.ui.ElementFilter filter)
    Deprecated.
     
    protected Element
    createAttributeAndExportElement(Document document, Element exportingElement, boolean exportResources, boolean exportLinkedFile, boolean skipData)
    Deprecated.
    Create attributes for XML element represents the exportingElement and offer the element to be created into file.
    protected File
    createResourcesDir(String resourcesLocation)
    Deprecated.
    Create a resource directory.
    void
    Deprecated.
    Called by the engine to inform this tool is no longer use and that it should destroy any resources that it has allocated.
    exportAll(boolean exportResources, boolean exportLinkedFile)
    Deprecated.
    Export current opened project into file.
    protected String
    Deprecated.
    Export the image for the element.
    com.nomagic.magicreport.engine.ITool.Void
    exportDiagramImage(DiagramPresentationElement diagramPresentation, boolean exportResources)
    Deprecated.
     
    exportDiagramImageWithResult(DiagramPresentationElement diagramPresentation, boolean exportResources)
    Deprecated.
     
    com.nomagic.magicreport.engine.ITool.Void
    exportElement(File exportingFile, Element exportingElement, boolean exportResources)
    Deprecated.
    Export element to XML file.
    com.nomagic.magicreport.engine.ITool.Void
    exportElement(File exportingFile, Element exportingElement, boolean exportResources, boolean exportLinkedFile)
    Deprecated.
    Export element to XML file.
    com.nomagic.magicreport.engine.ITool.Void
    exportElement(File exportingFile, Element exportingElement, boolean exportResources, boolean exportLinkedFile, ImageExportResult exportResult)
    Deprecated.
    Export element to XML file.
    com.nomagic.magicreport.engine.ITool.Void
    exportElement(File exportingFile, Element exportingElement, boolean exportResources, boolean exportLinkedFile, com.nomagic.magicdraw.ui.ElementFilter filter)
    Deprecated.
     
    com.nomagic.magicreport.engine.ITool.Void
    exportElementForTree(File exportingNodeFile, Element exportingElement, boolean exportResources)
    Deprecated.
    Export element to XML file which is used for create tree.
    com.nomagic.magicreport.engine.ITool.Void
    exportElementForTree(File exportingNodeFile, Element exportingElement, boolean exportResources, com.nomagic.magicdraw.ui.ElementFilter filter)
    Deprecated.
     
    protected String
    exportIcon(BaseElement exportingElement)
    Deprecated.
    Export the icon for element.
    protected String
    Deprecated.
    Return String representing element type.
    static String
    getHumanName(String propertyName, Map<String,String> nameMap)
    Deprecated.
     
    getPropertyHumanName(String propertyName, Map<String,String> nameMap)
    Deprecated.
    Get property human name of given property name.
    protected String
    Deprecated.
    Return location of resources directory.
    protected void
    Deprecated.
     
    protected boolean
    Deprecated.
     
    void
    setRecursive(boolean isRecursive)
    Deprecated.
     
    void
    setShowAuxiliary(boolean isShowAuxiliary)
    Deprecated.
     

    Methods inherited from class com.nomagic.magicreport.engine.ConcurrentTool

    getCustomPoolSize, isNoSpaceException, isRunning, offer

    Methods inherited from class com.nomagic.magicreport.engine.Tool

    clone, getContext, getProperties, getProperty, getProperty, notifyObservers, setContext, setProperties

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.nomagic.magicreport.engine.ITool

    clearTool
  • Field Details

  • Constructor Details

    • ExportTool2

      public ExportTool2()
      Deprecated.
      Create an export tool.
    • ExportTool2

      public ExportTool2(Observer observer)
      Deprecated.
      Create an export tool with observer.
      Parameters:
      observer - Observer
    • ExportTool2

      public ExportTool2(com.nomagic.magicreport.engine.ITemplateEngine engine, Observer observer)
      Deprecated.
      Create an export tool with observer.
      Parameters:
      engine - engine
      observer - Observer
  • Method Details

    • setRecursive

      public void setRecursive(boolean isRecursive)
      Deprecated.
    • setShowAuxiliary

      public void setShowAuxiliary(boolean isShowAuxiliary)
      Deprecated.
    • consume

      public void consume(com.nomagic.magicreport.engine.ConcurrentTool.ConsumeObject consumeObject)
      Deprecated.
      Consume a object.
      Specified by:
      consume in class com.nomagic.magicreport.engine.ConcurrentTool
      Parameters:
      consumeObject - consume object.
      See Also:
      • ConcurrentTool.consume(ConsumeObject)
    • exportElement

      public com.nomagic.magicreport.engine.ITool.Void exportElement(File exportingFile, Element exportingElement, boolean exportResources)
      Deprecated.
      Export element to XML file.
      Parameters:
      exportingFile - exporting file
      exportingElement - exporting element
      exportResources - true if you want to export resources of this element
      Returns:
      nothing
    • exportElement

      public com.nomagic.magicreport.engine.ITool.Void exportElement(File exportingFile, Element exportingElement, boolean exportResources, boolean exportLinkedFile, @CheckForNull com.nomagic.magicdraw.ui.ElementFilter filter)
      Deprecated.
    • exportElement

      public com.nomagic.magicreport.engine.ITool.Void exportElement(File exportingFile, Element exportingElement, boolean exportResources, boolean exportLinkedFile)
      Deprecated.
      Export element to XML file.
      Parameters:
      exportingFile - exporting file
      exportingElement - exporting element
      exportResources - true if you want to export resources of this element
      exportLinkedFile - true if you want to include linked files.
      Returns:
      nothing
    • exportElement

      public com.nomagic.magicreport.engine.ITool.Void exportElement(File exportingFile, Element exportingElement, boolean exportResources, boolean exportLinkedFile, @CheckForNull ImageExportResult exportResult)
      Deprecated.
      Export element to XML file.
      Parameters:
      exportingFile - exporting file
      exportingElement - exporting element
      exportResources - true if you want to export resources of this element
      exportLinkedFile - true if you want to include linked files.
      exportResult - image export result required for calculation of element locations if image is cropped or has banners
      Returns:
      nothing
    • exportDiagramImage

      public com.nomagic.magicreport.engine.ITool.Void exportDiagramImage(DiagramPresentationElement diagramPresentation, boolean exportResources)
      Deprecated.
    • exportDiagramImageWithResult

      @CheckForNull public ImageExportResult exportDiagramImageWithResult(DiagramPresentationElement diagramPresentation, boolean exportResources)
      Deprecated.
    • exportElementForTree

      public com.nomagic.magicreport.engine.ITool.Void exportElementForTree(File exportingNodeFile, Element exportingElement, boolean exportResources, com.nomagic.magicdraw.ui.ElementFilter filter)
      Deprecated.
    • exportElementForTree

      public com.nomagic.magicreport.engine.ITool.Void exportElementForTree(File exportingNodeFile, Element exportingElement, boolean exportResources)
      Deprecated.
      Export element to XML file which is used for create tree.
      Parameters:
      exportingNodeFile - exporting file
      exportingElement - export element
      exportResources - true if you want to export resources of this element
      Returns:
      nothing
    • getResourcesLocation

      protected String getResourcesLocation()
      Deprecated.
      Return location of resources directory.
      Returns:
      a path to resources directory.
    • createResourcesDir

      protected File createResourcesDir(String resourcesLocation) throws IOException
      Deprecated.
      Create a resource directory.
      Parameters:
      resourcesLocation - resources location
      Returns:
      a File pointed to resources directory
      Throws:
      IOException - if IO error occurs.
    • exportIcon

      protected String exportIcon(BaseElement exportingElement) throws IOException
      Deprecated.
      Export the icon for element. This method should not perform graphic renderer by itself. The icon exporting process should be enqueue by method offer(ConsumeObject).
      Parameters:
      exportingElement - target element
      Returns:
      path to icon
      Throws:
      IOException - if IO error occurs
    • exportCustomImageHolder

      protected String exportCustomImageHolder(BaseElement exportingElement) throws IOException
      Deprecated.
      Export the image for the element. Image for the element will be exported from strereotype CustomImageHolder.
      Parameters:
      exportingElement - target element
      Returns:
      path to icon
      Throws:
      IOException - if IO error occurs
    • createAndExportElement

      protected Element createAndExportElement(Document document, Element exportingElement, boolean exportResources, boolean exportLinkedFile, @CheckForNull com.nomagic.magicdraw.ui.ElementFilter filter) throws IOException
      Deprecated.
      Throws:
      IOException
    • createAndExportSmartElement

      protected Element createAndExportSmartElement(Document document, Element exportingElement, boolean exportResources, boolean exportLinkedFile, @CheckForNull com.nomagic.magicdraw.ui.ElementFilter filter) throws IOException
      Deprecated.
      Throws:
      IOException
    • createAndExportElement

      protected Element createAndExportElement(Document document, Element exportingElement, boolean exportResources, boolean exportLinkedFile, @CheckForNull com.nomagic.magicdraw.ui.ElementFilter filter, boolean isSmart) throws IOException
      Deprecated.
      Throws:
      IOException
    • createAttributeAndExportElement

      protected Element createAttributeAndExportElement(Document document, Element exportingElement, boolean exportResources, boolean exportLinkedFile, boolean skipData) throws IOException
      Deprecated.
      Create attributes for XML element represents the exportingElement and offer the element to be created into file. Return null to cancel this element exporting.
      Parameters:
      document - XML document
      exportingElement - exporting element
      exportResources - true if you want to export resources of this element
      exportLinkedFile - true if you want to include linked files.
      skipData - true to create only main attribute to xml document.
      Returns:
      XML element for creating containment tree.
      Throws:
      IOException - when IO error occurred.
    • getElementType

      protected String getElementType(Element element)
      Deprecated.
      Return String representing element type.
      Parameters:
      element - element
      Returns:
      a String representing element type.
    • exportAll

      public String exportAll(boolean exportResources, boolean exportLinkedFile)
      Deprecated.
      Export current opened project into file.
      Parameters:
      exportResources - true if you want to export resources.
      exportLinkedFile - true if you want to include linked files.
      Returns:
      nothing
    • destroy

      public void destroy()
      Deprecated.
      Called by the engine to inform this tool is no longer use and that it should destroy any resources that it has allocated.
      Overrides:
      destroy in class com.nomagic.magicreport.engine.ConcurrentTool
      See Also:
      • ConcurrentTool.destroy()
    • getPropertyHumanName

      public String getPropertyHumanName(String propertyName, Map<String,String> nameMap)
      Deprecated.
      Get property human name of given property name. If nameMap is used, human name will be resolved by nameMap then resource string.
      Parameters:
      propertyName - a property name
      nameMap - optional provides new name map from DSL.getPropertyNameMap(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element) to resolve property name from <<metaType>>
      Returns:
      human name
    • getHumanName

      public static String getHumanName(String propertyName, Map<String,String> nameMap)
      Deprecated.
    • isCancel

      protected boolean isCancel()
      Deprecated.
    • handleIOException

      protected void handleIOException(Exception e)
      Deprecated.