Class ExportTool2

  • All Implemented Interfaces:
    com.nomagic.magicreport.engine.ITool, com.nomagic.magicreport.IVariable, java.io.Serializable, java.lang.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:
    Serialized Form
    • Constructor Summary

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

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      private void appendPropertyCollection​(java.util.Collection<?> propertyCollection, org.w3c.dom.Document document, java.util.List<org.w3c.dom.Element> childList, org.w3c.dom.Element fieldElement, boolean exportResources)
      Deprecated.
       
      private int calculatePercentage​(long current, long total)
      Deprecated.
       
      private void collectAnchorShapeBounds​(javax.swing.text.View view, java.awt.Shape container, java.util.Set<ExportTool2.SymbolElement> shapeList, javax.swing.text.Element element, com.nomagic.magicdraw.uml.symbols.DiagramObjectViewContainer diagramContainer)
      Deprecated.
       
      private java.util.Set<java.lang.String> collectElementPropertiesNames​(Element element, java.lang.String mode)
      Deprecated.
      Creates and collects groups nodes user friendly names that appears in element's specification dialog tree at specific view mode (Standard/Expert/All)
      private void collectElements()
      Deprecated.
       
      private void collectElements​(Element exportingElement)
      Deprecated.
       
      private void collectOwnedElements​(Element exportingElement, boolean isRecursive)
      Deprecated.
       
      private boolean collectOwner​(Element exportingElement, java.util.Set<java.lang.String> parents, java.util.Set<Diagram> diagrams, java.util.Set<java.lang.String> notAccepts)
      Deprecated.
       
      void consume​(com.nomagic.magicreport.engine.ConcurrentTool.ConsumeObject consumeObject)
      Deprecated.
      Consume a object.
      private java.lang.String convertModelLinkToFileURL​(Element propertyValue)
      Deprecated.
       
      protected org.w3c.dom.Element createAndExportElement​(org.w3c.dom.Document document, Element exportingElement, boolean exportResources, boolean exportLinkedFile, com.nomagic.magicdraw.ui.ElementFilter filter)
      Deprecated.
       
      protected org.w3c.dom.Element createAndExportElement​(org.w3c.dom.Document document, Element exportingElement, boolean exportResources, boolean exportLinkedFile, com.nomagic.magicdraw.ui.ElementFilter filter, boolean isSmart)
      Deprecated.
       
      protected org.w3c.dom.Element createAndExportSmartElement​(org.w3c.dom.Document document, Element exportingElement, boolean exportResources, boolean exportLinkedFile, com.nomagic.magicdraw.ui.ElementFilter filter)
      Deprecated.
       
      private void createAreaMapForDiagramPresentation​(org.w3c.dom.Document document, com.nomagic.magicdraw.uml.symbols.DiagramObjectViewContainer diagramContainer, java.util.Collection<PresentationElement> presentationElements, org.w3c.dom.Element mapElement, double scale, java.io.FileWriter writer, java.awt.Rectangle diagramRect, float[] refPoint)
      Deprecated.
       
      protected org.w3c.dom.Element createAttributeAndExportElement​(org.w3c.dom.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.
      private java.lang.String createDiagramTypeName​(java.lang.String name)
      Deprecated.
      Append 's' after diagram type name.
      private org.w3c.dom.Element createElementAttributeData​(org.w3c.dom.Document document, java.lang.String tagName, Element exportingElement, boolean exportResources)
      Deprecated.
       
      private org.w3c.dom.Element createElementAttributeData​(org.w3c.dom.Document document, java.lang.String tagName, Element exportingElement, boolean exportResources, boolean skipData)
      Deprecated.
       
      private com.nomagic.magicdraw.ui.ElementFilter createElementFilter​(Project project)
      Deprecated.
       
      private org.w3c.dom.Element createElementForTree​(org.w3c.dom.Document document, Element exportingElement, boolean exportResources)
      Deprecated.
      Create XML element for element which is used to create tree.
      private java.io.File createOutputByID​(java.lang.String prefix, java.lang.String elementID, java.lang.String subfix, boolean forceRenew)
      Deprecated.
       
      private java.io.File createOutputFile​(java.lang.String filename)
      Deprecated.
       
      private java.io.File createOutputFromDefault​(java.lang.String filename, boolean forceRenew)
      Deprecated.
       
      private java.lang.String createReferneceDiagramType​(java.lang.String name)
      Deprecated.
       
      private java.io.File createResourcesDir()
      Deprecated.
      Create a resource directory.
      protected java.io.File createResourcesDir​(java.lang.String resourcesLocation)
      Deprecated.
      Create a resource directory.
      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.
      private void ensureParentDirExists​(java.io.File parentFile)
      Deprecated.
       
      java.lang.String exportAll​(boolean exportResources, boolean exportLinkedFile)
      Deprecated.
      Export current opened project into file.
      protected java.lang.String exportCustomImageHolder​(BaseElement exportingElement)
      Deprecated.
      Export the image for the element.
      private void exportDiagram​(Diagram diagram, Project project, org.w3c.dom.Document document, org.w3c.dom.Element xmlElement, java.lang.String[] mainData, boolean exportResources, java.util.List<org.w3c.dom.Element> nodeList, boolean exportLinkedFile, ImageExportResult exportResult)
      Deprecated.
      Export area mapping of elements in the diagram.
      com.nomagic.magicreport.engine.ITool.Void exportDiagramImage​(DiagramPresentationElement diagramPresentation, boolean exportResources)
      Deprecated.
       
      ImageExportResult exportDiagramImageWithResult​(DiagramPresentationElement diagramPresentation, boolean exportResources)
      Deprecated.
       
      com.nomagic.magicreport.engine.ITool.Void exportElement​(java.io.File exportingFile, Element exportingElement, boolean exportResources)
      Deprecated.
      Export element to XML file.
      com.nomagic.magicreport.engine.ITool.Void exportElement​(java.io.File exportingFile, Element exportingElement, boolean exportResources, boolean exportLinkedFile)
      Deprecated.
      Export element to XML file.
      com.nomagic.magicreport.engine.ITool.Void exportElement​(java.io.File exportingFile, Element exportingElement, boolean exportResources, boolean exportLinkedFile, ImageExportResult exportResult)
      Deprecated.
      Export element to XML file.
      com.nomagic.magicreport.engine.ITool.Void exportElement​(java.io.File exportingFile, Element exportingElement, boolean exportResources, boolean exportLinkedFile, com.nomagic.magicdraw.ui.ElementFilter filter)
      Deprecated.
       
      private void exportElement​(org.w3c.dom.Element parentElement, Element exportingElement, boolean exportResources, boolean exportLinkedFile, boolean skipData)
      Deprecated.
      Export xml element for data.xml
      private void exportElementForDiagramTree()
      Deprecated.
       
      private com.nomagic.magicreport.engine.ITool.Void exportElementForDiagramTypeTree​(java.util.Map<java.lang.String,​java.util.List<Diagram>> diagramTypeMap)
      Deprecated.
       
      private com.nomagic.magicreport.engine.ITool.Void exportElementForRootDiagramTree​(java.util.Map<java.lang.String,​java.util.List<Diagram>> diagramTypeMap)
      Deprecated.
       
      com.nomagic.magicreport.engine.ITool.Void exportElementForTree​(java.io.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​(java.io.File exportingNodeFile, Element exportingElement, boolean exportResources, com.nomagic.magicdraw.ui.ElementFilter filter)
      Deprecated.
       
      private void exportFavorite()
      Deprecated.
       
      protected java.lang.String exportIcon​(BaseElement exportingElement)
      Deprecated.
      Export the icon for element.
      private java.lang.String exportIconForHTMLDocument​(Project project, java.lang.String text)
      Deprecated.
      For html, it may contain some attributes that refer to element icon.
      Ex.
      private org.w3c.dom.Element exportImageMap​(org.w3c.dom.Document document, java.lang.String[] mainData, DiagramPresentationElement diagramPresentation, boolean exportLinkedFile, ImageExportResult exportResult)
      Deprecated.
       
      private void exportRootTreeAndProfile​(org.w3c.dom.Element rootElement, org.w3c.dom.Document document, java.lang.String resourcesLocation, Package dataModel, Project project, boolean exportResources, boolean exportLinkedFile)
      Deprecated.
       
      private Element findRootOwner​(Element element)
      Deprecated.
       
      private java.lang.String formatObject​(java.lang.Object object)
      Deprecated.
       
      private com.nomagic.magicdraw.ui.ElementFilter getAuxiliaryResourceFilter()
      Deprecated.
       
      private java.lang.String getBlankField()
      Deprecated.
       
      private java.util.Set<ExportTool2.SymbolElement> getContentShapeAnchorBounds​(com.nomagic.magicdraw.uml.symbols.shapes.TextObject textObject, com.nomagic.magicdraw.uml.symbols.DiagramObjectViewContainer diagramContainer)
      Deprecated.
      Collect all anchor element from content shape.
      private java.lang.String getElementPropertyString​(Element exportingElement, java.lang.String propertyName)
      Deprecated.
       
      protected java.lang.String getElementType​(Element element)
      Deprecated.
      Return String representing element type.
      private boolean getExportConfig​(java.lang.String config)
      Deprecated.
       
      private int getExportImageSize()
      Deprecated.
       
      private java.lang.String getFormattedNumber​(long num)
      Deprecated.
       
      private com.nomagic.magicreport.format.HTMLFormatter getHTMLFormatter()
      Deprecated.
       
      static java.lang.String getHumanName​(java.lang.String propertyName, java.util.Map<java.lang.String,​java.lang.String> nameMap)
      Deprecated.
       
      private java.util.Set<java.lang.String> getIgnoreDiagrams()
      Deprecated.
       
      private java.util.Set<java.lang.String> getIgnoreElements()
      Deprecated.
       
      private java.lang.String getModeString​(java.util.Set<java.lang.String>[] propertiesModes, java.lang.String propertyName)
      Deprecated.
       
      java.lang.String getPropertyHumanName​(java.lang.String propertyName, java.util.Map<java.lang.String,​java.lang.String> nameMap)
      Deprecated.
      Get property human name of given property name.
      protected java.lang.String getResourcesLocation()
      Deprecated.
      Return location of resources directory.
      private java.util.Collection<Element> getScopes()
      Deprecated.
       
      protected void handleIOException​(java.lang.Exception e)
      Deprecated.
       
      private boolean hasActiveHyperlink​(Element exportingElement)
      Deprecated.
       
      private boolean hasChildElement​(Element exportingElement)
      Deprecated.
       
      private void increaseProgressBar​(Element exportingElement, java.lang.String id, java.lang.String text)
      Deprecated.
       
      private void initialScopeAndVariable()
      Deprecated.
       
      private void initialScopeAndVariable​(boolean alwaysInit)
      Deprecated.
       
      protected boolean isCancel()
      Deprecated.
       
      private boolean isCreateSpecificationIcon​(Element exportingElement)
      Deprecated.
       
      private boolean isDisplayTreeElementId()
      Deprecated.
       
      private boolean isDisplayTreeElementNumber()
      Deprecated.
       
      private static boolean isExportableElement​(Element element)
      Deprecated.
      Fixed https://jira.nomagic.com/browse/MGRP-3170s 1) Applied Stereotype Instances and Slots that are tagged values should not be exported, since they are not part of actual model 2) Documentation comments should not be exported in a separate file - it is enough to print info in its owner 3) Should not export not user-created ValueSpecifications, like ones that are created when setting multiplicity property value
      private boolean isExportableSpecElement​(Element element)
      Deprecated.
      Check element that can be created as xml file for specification panel
      private boolean isExportableTreeElement​(Element element)
      Deprecated.
      Check element that can be created as xml file for containment tree
      private boolean isHiddenElement​(Element exportingElement, com.nomagic.magicdraw.ui.ElementFilter filter)
      Deprecated.
       
      private boolean isNotAcceptAuxiliary​(BaseElement testPackage)
      Deprecated.
       
      private boolean isShowAppearsInPage()
      Deprecated.
       
      private boolean isShowAppliedStereotype()
      Deprecated.
       
      private boolean isSkipExportAll()
      Deprecated.
       
      private void offerElementToConsumeObject​(Element exportingElement, boolean exportResources, boolean exportLinkedFile)
      Deprecated.
      Export element to XML file.
      private void setModeString​(org.w3c.dom.Element xmlElement, java.util.Set<java.lang.String>[] propertiesModes, java.lang.String propertyName)
      Deprecated.
       
      void setRecursive​(boolean isRecursive)
      Deprecated.
       
      void setShowAuxiliary​(boolean isShowAuxiliary)
      Deprecated.
       
      private void write​(org.w3c.dom.Node node, java.lang.StringBuilder builder)
      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.util.Observable

        addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged
      • 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 Detail

      • CONTEXT_NAME

        public static final java.lang.String CONTEXT_NAME
        Deprecated.
        Contains a context name.
        See Also:
        Constant Field Values
      • serialVersionUID

        private static final long serialVersionUID
        Deprecated.
        See Also:
        Constant Field Values
      • log

        private static final org.apache.logging.log4j.Logger log
        Deprecated.
      • EXPORT_ALL_ELEMENT

        private static final java.lang.String EXPORT_ALL_ELEMENT
        Deprecated.
        export all elements. true to export all xml file for containment tree and specification panel.
        See Also:
        Constant Field Values
      • EXPORT_ALL_TREE_ELEMENT

        private static final java.lang.String EXPORT_ALL_TREE_ELEMENT
        Deprecated.
        See Also:
        Constant Field Values
      • SKIP_EXPORT_ALL_SPEC_ELEMENT

        private static final java.lang.String SKIP_EXPORT_ALL_SPEC_ELEMENT
        Deprecated.
        See Also:
        Constant Field Values
      • FILE_PROTOCOL

        private static final java.lang.String FILE_PROTOCOL
        Deprecated.
        See Also:
        Constant Field Values
      • formatter

        private final java.text.DecimalFormat formatter
        Deprecated.
      • resourcesDir

        private java.io.File resourcesDir
        Deprecated.
      • dummyULId

        private int dummyULId
        Deprecated.
      • imageScale

        private int imageScale
        Deprecated.
      • project

        private Project project
        Deprecated.
      • reflection

        private com.nomagic.uml2.ext.jmi.reflect.ModelReflection reflection
        Deprecated.
      • exportConfig

        private java.util.Map<java.lang.String,​java.lang.Boolean> exportConfig
        Deprecated.
      • elementsToBeExport

        private final java.util.Set<java.lang.String> elementsToBeExport
        Deprecated.
      • exportedDiagramSet

        private final java.util.Set<Diagram> exportedDiagramSet
        Deprecated.
      • exportedIconSet

        private final java.util.Set<java.lang.String> exportedIconSet
        Deprecated.
      • existingFilePaths

        private final java.util.Set<java.lang.String> existingFilePaths
        Deprecated.
      • fileExportedCount

        private long fileExportedCount
        Deprecated.
      • filesToBeExportedCount

        private long filesToBeExportedCount
        Deprecated.
      • currentPercentage

        private int currentPercentage
        Deprecated.
      • skipProgressbar

        private java.lang.Boolean skipProgressbar
        Deprecated.
      • scopes

        private java.util.Collection<Element> scopes
        Deprecated.
      • auxiliaryFilter

        private com.nomagic.magicdraw.ui.ElementFilter auxiliaryFilter
        Deprecated.
      • filter

        private com.nomagic.magicdraw.ui.ElementFilter filter
        Deprecated.
      • isShowAuxiliary

        private boolean isShowAuxiliary
        Deprecated.
      • ignoreElements

        private java.util.Set<java.lang.String> ignoreElements
        Deprecated.
      • ignoreDiagrams

        private java.util.Set<java.lang.String> ignoreDiagrams
        Deprecated.
      • globalEngine

        private com.nomagic.magicreport.engine.ITemplateEngine globalEngine
        Deprecated.
      • reportHelper

        private ReportHelper reportHelper
        Deprecated.
      • htmlFormatter

        private com.nomagic.magicreport.format.HTMLFormatter htmlFormatter
        Deprecated.
      • sorter

        private final SorterTool sorter
        Deprecated.
      • blankFieldValue

        private java.lang.String blankFieldValue
        Deprecated.
      • defaultOutputDirectory

        private java.io.File defaultOutputDirectory
        Deprecated.
      • isRecursive

        private boolean isRecursive
        Deprecated.
      • isSkipExportAll

        private boolean isSkipExportAll
        Deprecated.
      • isShowAppearsInPage

        private java.lang.Boolean isShowAppearsInPage
        Deprecated.
      • isDisplayTreeElementId

        private java.lang.Boolean isDisplayTreeElementId
        Deprecated.
      • isDisplayTreeElementNumber

        private java.lang.Boolean isDisplayTreeElementNumber
        Deprecated.
      • isShowAppliedStereotype

        private java.lang.Boolean isShowAppliedStereotype
        Deprecated.
      • documentBuilder

        private javax.xml.parsers.DocumentBuilder documentBuilder
        Deprecated.
      • task

        private com.nomagic.magicdraw.magicreport.ObserverTask task
        Deprecated.
      • nodeComparator

        private final java.util.Comparator<org.w3c.dom.Element> nodeComparator
        Deprecated.
      • elementComparator

        private final java.util.Comparator<BaseElement> elementComparator
        Deprecated.
      • nameComparator

        private final java.util.Comparator<org.w3c.dom.Element> nameComparator
        Deprecated.
    • Constructor Detail

      • ExportTool2

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

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

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

      • 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)
      • increaseProgressBar

        private void increaseProgressBar​(Element exportingElement,
                                         java.lang.String id,
                                         java.lang.String text)
        Deprecated.
      • getFormattedNumber

        private java.lang.String getFormattedNumber​(long num)
        Deprecated.
      • calculatePercentage

        private int calculatePercentage​(long current,
                                        long total)
        Deprecated.
      • getBlankField

        private java.lang.String getBlankField()
        Deprecated.
      • formatObject

        private java.lang.String formatObject​(@CheckForNull
                                              java.lang.Object object)
        Deprecated.
      • getScopes

        private java.util.Collection<Element> getScopes()
        Deprecated.
      • getAuxiliaryResourceFilter

        private com.nomagic.magicdraw.ui.ElementFilter getAuxiliaryResourceFilter()
        Deprecated.
      • getExportImageSize

        private int getExportImageSize()
        Deprecated.
      • isSkipExportAll

        private boolean isSkipExportAll()
        Deprecated.
      • isNotAcceptAuxiliary

        private boolean isNotAcceptAuxiliary​(BaseElement testPackage)
        Deprecated.
      • collectElementPropertiesNames

        private java.util.Set<java.lang.String> collectElementPropertiesNames​(Element element,
                                                                              java.lang.String mode)
        Deprecated.
        Creates and collects groups nodes user friendly names that appears in element's specification dialog tree at specific view mode (Standard/Expert/All)
        Parameters:
        element - element
        mode - view mode from PropertiesModeHelper.MODES
        Returns:
        Collection of String group nodes names
        See Also:
        PropertiesMode
      • appendPropertyCollection

        private void appendPropertyCollection​(java.util.Collection<?> propertyCollection,
                                              org.w3c.dom.Document document,
                                              java.util.List<org.w3c.dom.Element> childList,
                                              org.w3c.dom.Element fieldElement,
                                              boolean exportResources)
                                       throws java.io.IOException
        Deprecated.
        Throws:
        java.io.IOException
      • getModeString

        private java.lang.String getModeString​(java.util.Set<java.lang.String>[] propertiesModes,
                                               java.lang.String propertyName)
        Deprecated.
      • setModeString

        private void setModeString​(org.w3c.dom.Element xmlElement,
                                   java.util.Set<java.lang.String>[] propertiesModes,
                                   java.lang.String propertyName)
        Deprecated.
      • exportElement

        public com.nomagic.magicreport.engine.ITool.Void exportElement​(java.io.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​(java.io.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​(java.io.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​(java.io.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
      • exportImageMap

        private org.w3c.dom.Element exportImageMap​(org.w3c.dom.Document document,
                                                   java.lang.String[] mainData,
                                                   DiagramPresentationElement diagramPresentation,
                                                   boolean exportLinkedFile,
                                                   @CheckForNull
                                                   ImageExportResult exportResult)
        Deprecated.
      • createAreaMapForDiagramPresentation

        private void createAreaMapForDiagramPresentation​(org.w3c.dom.Document document,
                                                         com.nomagic.magicdraw.uml.symbols.DiagramObjectViewContainer diagramContainer,
                                                         java.util.Collection<PresentationElement> presentationElements,
                                                         org.w3c.dom.Element mapElement,
                                                         double scale,
                                                         java.io.FileWriter writer,
                                                         @CheckForNull
                                                         java.awt.Rectangle diagramRect,
                                                         float[] refPoint)
                                                  throws java.io.IOException
        Deprecated.
        Throws:
        java.io.IOException
      • ensureParentDirExists

        private void ensureParentDirExists​(java.io.File parentFile)
        Deprecated.
      • convertModelLinkToFileURL

        @CheckForNull
        private java.lang.String convertModelLinkToFileURL​(Element propertyValue)
                                                    throws java.io.IOException
        Deprecated.
        Throws:
        java.io.IOException
      • exportDiagram

        private void exportDiagram​(Diagram diagram,
                                   Project project,
                                   org.w3c.dom.Document document,
                                   org.w3c.dom.Element xmlElement,
                                   java.lang.String[] mainData,
                                   boolean exportResources,
                                   java.util.List<org.w3c.dom.Element> nodeList,
                                   boolean exportLinkedFile,
                                   ImageExportResult exportResult)
        Deprecated.
        Export area mapping of elements in the diagram.
      • exportDiagramImage

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

        private com.nomagic.magicreport.format.HTMLFormatter getHTMLFormatter()
        Deprecated.
      • exportElementForTree

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

        public com.nomagic.magicreport.engine.ITool.Void exportElementForTree​(java.io.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
      • write

        private void write​(org.w3c.dom.Node node,
                           java.lang.StringBuilder builder)
        Deprecated.
      • findRootOwner

        private Element findRootOwner​(Element element)
        Deprecated.
      • createElementForTree

        private org.w3c.dom.Element createElementForTree​(org.w3c.dom.Document document,
                                                         Element exportingElement,
                                                         boolean exportResources)
                                                  throws java.io.IOException
        Deprecated.
        Create XML element for element which is used to create tree.
        Throws:
        java.io.IOException
      • getElementPropertyString

        @CheckForNull
        private java.lang.String getElementPropertyString​(Element exportingElement,
                                                          java.lang.String propertyName)
        Deprecated.
      • hasActiveHyperlink

        private boolean hasActiveHyperlink​(Element exportingElement)
        Deprecated.
      • isCreateSpecificationIcon

        private boolean isCreateSpecificationIcon​(Element exportingElement)
        Deprecated.
      • isHiddenElement

        private boolean isHiddenElement​(Element exportingElement,
                                        com.nomagic.magicdraw.ui.ElementFilter filter)
        Deprecated.
      • hasChildElement

        private boolean hasChildElement​(Element exportingElement)
        Deprecated.
      • getResourcesLocation

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

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

        private java.io.File createResourcesDir()
                                         throws java.io.IOException
        Deprecated.
        Create a resource directory.
        Returns:
        a File pointed to resources directory
        Throws:
        java.io.IOException - if IO error occurs.
      • exportIcon

        protected java.lang.String exportIcon​(BaseElement exportingElement)
                                       throws java.io.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:
        java.io.IOException - if IO error occurs
      • exportCustomImageHolder

        protected java.lang.String exportCustomImageHolder​(BaseElement exportingElement)
                                                    throws java.io.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:
        java.io.IOException - if IO error occurs
      • offerElementToConsumeObject

        private void offerElementToConsumeObject​(Element exportingElement,
                                                 boolean exportResources,
                                                 boolean exportLinkedFile)
        Deprecated.
        Export element to XML file. Use element id as file name.
        Parameters:
        exportingElement - exporting element
      • createElementAttributeData

        private org.w3c.dom.Element createElementAttributeData​(org.w3c.dom.Document document,
                                                               java.lang.String tagName,
                                                               Element exportingElement,
                                                               boolean exportResources)
                                                        throws java.io.IOException
        Deprecated.
        Throws:
        java.io.IOException
      • createElementAttributeData

        private org.w3c.dom.Element createElementAttributeData​(org.w3c.dom.Document document,
                                                               java.lang.String tagName,
                                                               Element exportingElement,
                                                               boolean exportResources,
                                                               boolean skipData)
                                                        throws java.io.IOException
        Deprecated.
        Throws:
        java.io.IOException
      • createAndExportElement

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

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

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

        protected org.w3c.dom.Element createAttributeAndExportElement​(org.w3c.dom.Document document,
                                                                      Element exportingElement,
                                                                      boolean exportResources,
                                                                      boolean exportLinkedFile,
                                                                      boolean skipData)
                                                               throws java.io.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:
        java.io.IOException - when IO error occurred.
      • getElementType

        protected java.lang.String getElementType​(Element element)
        Deprecated.
        Return String representing element type.
        Parameters:
        element - element
        Returns:
        a String representing element type.
      • exportElement

        private void exportElement​(org.w3c.dom.Element parentElement,
                                   Element exportingElement,
                                   boolean exportResources,
                                   boolean exportLinkedFile,
                                   boolean skipData)
                            throws java.io.IOException
        Deprecated.
        Export xml element for data.xml
        Parameters:
        parentElement - dom parent
        exportingElement - element to be exported
        exportResources - true to export sources (icon, image)
        exportLinkedFile - true to export link file
        skipData - true to create only main data
        Throws:
        java.io.IOException
      • createOutputByID

        private java.io.File createOutputByID​(java.lang.String prefix,
                                              java.lang.String elementID,
                                              java.lang.String subfix,
                                              boolean forceRenew)
        Deprecated.
      • createOutputFromDefault

        private java.io.File createOutputFromDefault​(java.lang.String filename,
                                                     boolean forceRenew)
        Deprecated.
      • createOutputFile

        private java.io.File createOutputFile​(java.lang.String filename)
        Deprecated.
      • initialScopeAndVariable

        private void initialScopeAndVariable()
        Deprecated.
      • initialScopeAndVariable

        private void initialScopeAndVariable​(boolean alwaysInit)
        Deprecated.
      • collectElements

        private void collectElements()
        Deprecated.
      • collectOwner

        private boolean collectOwner​(Element exportingElement,
                                     java.util.Set<java.lang.String> parents,
                                     java.util.Set<Diagram> diagrams,
                                     java.util.Set<java.lang.String> notAccepts)
        Deprecated.
      • collectElements

        private void collectElements​(Element exportingElement)
        Deprecated.
      • collectOwnedElements

        private void collectOwnedElements​(Element exportingElement,
                                          boolean isRecursive)
        Deprecated.
      • exportAll

        public java.lang.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
      • exportRootTreeAndProfile

        private void exportRootTreeAndProfile​(org.w3c.dom.Element rootElement,
                                              org.w3c.dom.Document document,
                                              java.lang.String resourcesLocation,
                                              Package dataModel,
                                              Project project,
                                              boolean exportResources,
                                              boolean exportLinkedFile)
        Deprecated.
      • createElementFilter

        private com.nomagic.magicdraw.ui.ElementFilter createElementFilter​(Project project)
        Deprecated.
      • 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()
      • collectAnchorShapeBounds

        private void collectAnchorShapeBounds​(javax.swing.text.View view,
                                              java.awt.Shape container,
                                              java.util.Set<ExportTool2.SymbolElement> shapeList,
                                              javax.swing.text.Element element,
                                              com.nomagic.magicdraw.uml.symbols.DiagramObjectViewContainer diagramContainer)
        Deprecated.
      • getContentShapeAnchorBounds

        private java.util.Set<ExportTool2.SymbolElement> getContentShapeAnchorBounds​(com.nomagic.magicdraw.uml.symbols.shapes.TextObject textObject,
                                                                                     com.nomagic.magicdraw.uml.symbols.DiagramObjectViewContainer diagramContainer)
        Deprecated.
        Collect all anchor element from content shape.
        Returns:
        a list containing anchor shape
      • getPropertyHumanName

        public java.lang.String getPropertyHumanName​(java.lang.String propertyName,
                                                     java.util.Map<java.lang.String,​java.lang.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 java.lang.String getHumanName​(java.lang.String propertyName,
                                                    java.util.Map<java.lang.String,​java.lang.String> nameMap)
        Deprecated.
      • exportElementForDiagramTree

        private void exportElementForDiagramTree()
        Deprecated.
      • createReferneceDiagramType

        private java.lang.String createReferneceDiagramType​(java.lang.String name)
        Deprecated.
      • createDiagramTypeName

        private java.lang.String createDiagramTypeName​(java.lang.String name)
        Deprecated.
        Append 's' after diagram type name.
      • exportElementForRootDiagramTree

        private com.nomagic.magicreport.engine.ITool.Void exportElementForRootDiagramTree​(java.util.Map<java.lang.String,​java.util.List<Diagram>> diagramTypeMap)
        Deprecated.
      • exportElementForDiagramTypeTree

        private com.nomagic.magicreport.engine.ITool.Void exportElementForDiagramTypeTree​(java.util.Map<java.lang.String,​java.util.List<Diagram>> diagramTypeMap)
        Deprecated.
      • getExportConfig

        private boolean getExportConfig​(java.lang.String config)
        Deprecated.
      • isExportableTreeElement

        private boolean isExportableTreeElement​(Element element)
        Deprecated.
        Check element that can be created as xml file for containment tree
        Parameters:
        element - specific element
        Returns:
        true if it can be created as xml file; otherwise, false.
      • isExportableSpecElement

        private boolean isExportableSpecElement​(Element element)
        Deprecated.
        Check element that can be created as xml file for specification panel
        Parameters:
        element - specific element
        Returns:
        true if it can be created as xml file; otherwise, false.
      • isExportableElement

        private static boolean isExportableElement​(Element element)
        Deprecated.
        Fixed https://jira.nomagic.com/browse/MGRP-3170s 1) Applied Stereotype Instances and Slots that are tagged values should not be exported, since they are not part of actual model 2) Documentation comments should not be exported in a separate file - it is enough to print info in its owner 3) Should not export not user-created ValueSpecifications, like ones that are created when setting multiplicity property value
      • exportIconForHTMLDocument

        private java.lang.String exportIconForHTMLDocument​(Project project,
                                                           java.lang.String text)
        Deprecated.
        For html, it may contain some attributes that refer to element icon.
        Ex. This icon should be exported and the value of "src" attribute should be changed to the url of exported icon.
        Parameters:
        project - current project
        text - html text
        Returns:
        updated text
      • isCancel

        protected boolean isCancel()
        Deprecated.
      • handleIOException

        protected void handleIOException​(java.lang.Exception e)
        Deprecated.
      • exportFavorite

        private void exportFavorite()
        Deprecated.
      • getIgnoreElements

        private java.util.Set<java.lang.String> getIgnoreElements()
        Deprecated.
      • getIgnoreDiagrams

        private java.util.Set<java.lang.String> getIgnoreDiagrams()
        Deprecated.
      • isShowAppearsInPage

        private boolean isShowAppearsInPage()
        Deprecated.
      • isDisplayTreeElementId

        private boolean isDisplayTreeElementId()
        Deprecated.
      • isDisplayTreeElementNumber

        private boolean isDisplayTreeElementNumber()
        Deprecated.
      • isShowAppliedStereotype

        private boolean isShowAppliedStereotype()
        Deprecated.