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
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONTEXT_NAME
Deprecated.Contains a context name.
-
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 void
consume(com.nomagic.magicreport.engine.ConcurrentTool.ConsumeObject consumeObject)
Deprecated.Consume a object.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.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.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.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.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.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.protected java.lang.String
exportIcon(BaseElement exportingElement)
Deprecated.Export the icon for element.protected java.lang.String
getElementType(Element element)
Deprecated.Return String representing element type.static java.lang.String
getHumanName(java.lang.String propertyName, java.util.Map<java.lang.String,java.lang.String> nameMap)
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.protected void
handleIOException(java.lang.Exception e)
Deprecated.protected boolean
isCancel()
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.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
-
-
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)
-
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
-
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(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
-
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.
-
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
-
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.
-
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
-
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()
-
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.
-
isCancel
protected boolean isCancel()
Deprecated.
-
handleIOException
protected void handleIOException(java.lang.Exception e)
Deprecated.
-
-