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
,java.io.Serializable
,java.lang.Cloneable
@Deprecated @OpenApiAll public class ExportTool2 extends com.nomagic.magicreport.engine.ConcurrentTool
Deprecated.Deprecated class, useExportTool3
instead. This class allow report to export element in other file format including tree folder.- Since:
- Mar 14, 2012
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
ExportTool2.ConcurrentHashSet<T>
Deprecated.private static class
ExportTool2.ElementComparator<T>
Deprecated.(package private) class
ExportTool2.ElementIDCreator
Deprecated.(package private) class
ExportTool2.HexaElementIDCreator
Deprecated.private static class
ExportTool2.NameComparator<T>
Deprecated.private static class
ExportTool2.NodeComparator<T>
Deprecated.private static class
ExportTool2.SymbolElement
Deprecated.
-
Field Summary
Fields Modifier and Type Field Description private com.nomagic.magicdraw.ui.ElementFilter
auxiliaryFilter
Deprecated.private java.lang.String
blankFieldValue
Deprecated.static java.lang.String
CONTEXT_NAME
Deprecated.Contains a context name.private int
currentPercentage
Deprecated.private java.io.File
defaultOutputDirectory
Deprecated.private javax.xml.parsers.DocumentBuilder
documentBuilder
Deprecated.private int
dummyULId
Deprecated.private java.util.Comparator<BaseElement>
elementComparator
Deprecated.private ExportTool2.ElementIDCreator
elementIDCreator
Deprecated.private java.util.Set<java.lang.String>
elementsToBeExport
Deprecated.private java.util.Set<java.lang.String>
existingFilePaths
Deprecated.private static java.lang.String
EXPORT_ALL_ELEMENT
Deprecated.export all elements.private static java.lang.String
EXPORT_ALL_TREE_ELEMENT
Deprecated.private java.util.Map<java.lang.String,java.lang.Boolean>
exportConfig
Deprecated.private java.util.Set<Diagram>
exportedDiagramSet
Deprecated.private java.util.Set<java.lang.String>
exportedIconSet
Deprecated.private static java.lang.String
FILE_PROTOCOL
Deprecated.private long
fileExportedCount
Deprecated.private long
filesToBeExportedCount
Deprecated.private com.nomagic.magicdraw.ui.ElementFilter
filter
Deprecated.private java.text.DecimalFormat
formatter
Deprecated.private com.nomagic.magicreport.engine.ITemplateEngine
globalEngine
Deprecated.private com.nomagic.magicreport.format.HTMLFormatter
htmlFormatter
Deprecated.private java.util.Set<java.lang.String>
ignoreDiagrams
Deprecated.private java.util.Set<java.lang.String>
ignoreElements
Deprecated.private int
imageScale
Deprecated.private java.lang.Boolean
isDisplayTreeElementId
Deprecated.private java.lang.Boolean
isDisplayTreeElementNumber
Deprecated.private boolean
isRecursive
Deprecated.private java.lang.Boolean
isShowAppearsInPage
Deprecated.private java.lang.Boolean
isShowAppliedStereotype
Deprecated.private boolean
isShowAuxiliary
Deprecated.private boolean
isSkipExportAll
Deprecated.private static org.apache.logging.log4j.Logger
log
Deprecated.private java.util.Comparator<org.w3c.dom.Element>
nameComparator
Deprecated.private java.util.Comparator<org.w3c.dom.Element>
nodeComparator
Deprecated.private Project
project
Deprecated.private com.nomagic.uml2.ext.jmi.reflect.ModelReflection
reflection
Deprecated.private ReportHelper
reportHelper
Deprecated.private java.io.File
resourcesDir
Deprecated.private java.util.Collection<Element>
scopes
Deprecated.private static long
serialVersionUID
Deprecated.private static java.lang.String
SKIP_EXPORT_ALL_SPEC_ELEMENT
Deprecated.private java.lang.Boolean
skipProgressbar
Deprecated.private SorterTool
sorter
Deprecated.private com.nomagic.magicdraw.magicreport.ObserverTask
task
Deprecated.
-
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 theexportingElement
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.xmlprivate 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 valueprivate boolean
isExportableSpecElement(Element element)
Deprecated.Check element that can be created as xml file for specification panelprivate boolean
isExportableTreeElement(Element element)
Deprecated.Check element that can be created as xml file for containment treeprivate 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
-
-
-
-
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.
-
elementIDCreator
private ExportTool2.ElementIDCreator elementIDCreator
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
- engineobserver
- 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 classcom.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
- elementmode
- 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 fileexportingElement
- exporting elementexportResources
- 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 fileexportingElement
- exporting elementexportResources
- true if you want to export resources of this elementexportLinkedFile
- 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 fileexportingElement
- exporting elementexportResources
- true if you want to export resources of this elementexportLinkedFile
- 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.
-
exportDiagramImageWithResult
@CheckForNull public ImageExportResult exportDiagramImageWithResult(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 fileexportingElement
- export elementexportResources
- 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.
-
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 methodoffer(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 theexportingElement
and offer the element to be created into file. Returnnull
to cancel this element exporting.- Parameters:
document
- XML documentexportingElement
- exporting elementexportResources
- true if you want to export resources of this elementexportLinkedFile
- 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 parentexportingElement
- element to be exportedexportResources
- true to export sources (icon, image)exportLinkedFile
- true to export link fileskipData
- 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 classcom.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. IfnameMap
is used, human name will be resolved bynameMap
then resource string.- Parameters:
propertyName
- a property namenameMap
- optional provides new name map fromDSL.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 projecttext
- 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.
-
-