public class ExportTool
extends com.nomagic.magicreport.engine.ConcurrentTool
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTEXT_NAME
Contains a context name.
|
Constructor and Description |
---|
ExportTool()
Create an export tool.
|
ExportTool(java.util.Observer observer)
Create an export tool with observer.
|
Modifier and Type | Method and Description |
---|---|
void |
consume(com.nomagic.magicreport.engine.ConcurrentTool.ConsumeObject consumeObject)
Consume a object.
|
protected java.io.File |
createResourcesDir(java.lang.String resourcesLocation)
Create a resource directory.
|
void |
destroy()
Called by the engine to inform this tool is no longer use and that it should destroy any resources that it
has allocated.
|
com.nomagic.magicreport.engine.ITool.Void |
exportAll(java.io.File exportedFile,
boolean exportResources)
Export current opened project into file.
|
com.nomagic.magicreport.engine.ITool.Void |
exportAll(java.io.File exportedFile,
boolean exportResources,
boolean exportLinkedFile)
Export current opened project into file.
|
java.lang.String |
exportAll(java.lang.String filename)
Export current opened project into filename with all related resources and linked file.
|
java.lang.String |
exportAll(java.lang.String filename,
boolean exportResources)
Export current opened project into filename with linked files.
|
java.lang.String |
exportAll(java.lang.String filename,
boolean exportResources,
boolean exportLinkedFile)
Export current opened project into filename.
|
protected java.lang.String |
exportCustomImageHolder(com.nomagic.magicdraw.uml.BaseElement exportingElement)
Export the image for the element.
|
com.nomagic.magicreport.engine.ITool.Void |
exportElement(java.io.File exportingFile,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element exportingElement,
boolean exportResources)
Export element to XML file.
|
com.nomagic.magicreport.engine.ITool.Void |
exportElement(java.io.File exportingFile,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element exportingElement,
boolean exportResources,
boolean exportLinkedFile)
Export element to XML file.
|
protected java.lang.String |
exportIcon(com.nomagic.magicdraw.uml.BaseElement exportingElement)
Export the icon for element.
|
protected java.lang.String |
getElementType(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
Return String representing element type.
|
static java.lang.String |
getHumanName(java.lang.String propertyName,
java.util.Map<java.lang.String,java.lang.String> nameMap)
Get human name of given property name.
|
protected java.lang.String |
getResourcesLocation()
Return location of resources directory.
|
void |
setRecursive(boolean isRecursive) |
clone, getContext, getProperties, getProperty, getProperty, notifyObservers, setContext, setProperties
public static final java.lang.String CONTEXT_NAME
public ExportTool()
public ExportTool(java.util.Observer observer)
observer
- Observerpublic void setRecursive(boolean isRecursive)
public void consume(com.nomagic.magicreport.engine.ConcurrentTool.ConsumeObject consumeObject)
consume
in class com.nomagic.magicreport.engine.ConcurrentTool
consumeObject
- consume object.ConcurrentTool.consume(com.nomagic.magicreport.engine.ConcurrentTool.ConsumeObject)
public com.nomagic.magicreport.engine.ITool.Void exportElement(java.io.File exportingFile, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element exportingElement, boolean exportResources)
exportingFile
- exporting fileexportingElement
- exporting elementexportResources
- true if you want to export resources of this elementpublic com.nomagic.magicreport.engine.ITool.Void exportElement(java.io.File exportingFile, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element exportingElement, boolean exportResources, boolean exportLinkedFile)
exportingFile
- exporting fileexportingElement
- exporting elementexportResources
- true if you want to export resources of this elementexportLinkedFile
- true if you want to include linked files.protected java.lang.String getResourcesLocation()
protected java.io.File createResourcesDir(java.lang.String resourcesLocation) throws java.io.IOException
resourcesLocation
- resources locationjava.io.IOException
- if IO error occurs.protected java.lang.String exportIcon(com.nomagic.magicdraw.uml.BaseElement exportingElement) throws java.io.IOException
offer(ConsumeObject)
.exportingElement
- target elementjava.io.IOException
- if IO error occursprotected java.lang.String exportCustomImageHolder(com.nomagic.magicdraw.uml.BaseElement exportingElement) throws java.io.IOException
exportingElement
- target elementjava.io.IOException
- if IO error occursprotected java.lang.String getElementType(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element element)
element
- elementpublic java.lang.String exportAll(java.lang.String filename)
filename
- an exported filename.public java.lang.String exportAll(java.lang.String filename, boolean exportResources)
filename
- an exported filename.exportResources
- true if you want to export resources.public java.lang.String exportAll(java.lang.String filename, boolean exportResources, boolean exportLinkedFile)
filename
- an exported filename.exportResources
- true if you want to export resources.exportLinkedFile
- true if you want to include linked files.public com.nomagic.magicreport.engine.ITool.Void exportAll(java.io.File exportedFile, boolean exportResources)
exportedFile
- and exported file.exportResources
- true if you want to export resources.public com.nomagic.magicreport.engine.ITool.Void exportAll(java.io.File exportedFile, boolean exportResources, boolean exportLinkedFile)
exportedFile
- and exported file.exportResources
- true if you want to export resources.exportLinkedFile
- true if you want to include linked files.public void destroy()
destroy
in class com.nomagic.magicreport.engine.ConcurrentTool
ConcurrentTool.destroy()
public static java.lang.String getHumanName(java.lang.String propertyName, java.util.Map<java.lang.String,java.lang.String> nameMap)
nameMap
is used, human name will be resolved by
nameMap
then resource string.propertyName
- a property namenameMap
- optional provides new name map from DSLManager.getPropertyNameMap(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element)
to resolve property
name from <<metaType>>