@OpenApiAll
public class ProjectTool
extends com.nomagic.magicreport.engine.Tool
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTEXT_NAME
Contains a context name.
|
Constructor and Description |
---|
ProjectTool() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<java.lang.String> |
getAllElementId()
Return the collection of all element id in the project.
|
java.util.List<Package> |
getAllModels()
Returns a list of models in the project (the primary model of the project and all the models of the modules
(attached projects)).
|
java.lang.String |
getDescription()
Get project description.
|
java.util.Collection<Diagram> |
getDiagrams()
Return all existing diagrams stored in this Project.
|
java.util.Collection<Diagram> |
getDiagrams(java.lang.String type)
Return existing diagrams of given type stored in Project.
|
java.lang.String |
getDirectory()
Return project directory.
|
BaseElement |
getElementByID(java.lang.String id)
Return the Element with given id.
|
java.lang.String |
getExtension()
Return project file extension.
|
java.lang.String |
getFileName()
Method returns file name of this project.
|
Model |
getModel()
Deprecated.
use ProjectTool#getPrimaryModel()
|
java.lang.String |
getName()
Return project name.
|
java.util.Collection<DiagramPresentationElement> |
getPresentationDiagrams()
Return all existing presentation diagrams stored in this Project.
|
java.util.Collection<DiagramPresentationElement> |
getPresentationDiagrams(java.lang.String type)
Return existing presentation diagrams of given type stored in Project.
|
Package |
getPrimaryModel()
Returns the primary (main) model of the project (not including the ones from modules).
|
java.lang.String |
getTitle()
Return project title.
|
long |
getVersion()
Return project version number.
|
java.util.List<com.nomagic.magicdraw.magicreport.tools.ProjectVersion> |
getVersionList()
Return a list of
ProjectVersion information from opened server project. |
int |
getXmiVersion()
Return the projects XMI version.
|
boolean |
isDirty()
Return true if this project was modified after last save/load.
|
boolean |
isRemote()
Return the remote or not remote state of the project.
|
clone, getContext, getProperties, getProperty, getProperty, notifyObservers, setContext, setProperties
public static final java.lang.String CONTEXT_NAME
public java.util.Collection<Diagram> getDiagrams()
public java.util.Collection<Diagram> getDiagrams(java.lang.String type)
type
- the given diagrams type.public java.util.Collection<DiagramPresentationElement> getPresentationDiagrams()
public java.util.Collection<DiagramPresentationElement> getPresentationDiagrams(java.lang.String type)
type
- the given diagrams type.public java.lang.String getName()
public java.lang.String getTitle()
public java.lang.String getExtension()
public java.lang.String getDirectory()
@CheckForNull public java.lang.String getFileName()
public boolean isRemote()
public boolean isDirty()
@CheckForNull public BaseElement getElementByID(java.lang.String id)
id
- the id of the element.public java.util.Collection<java.lang.String> getAllElementId()
public int getXmiVersion()
@Deprecated @CheckForNull public Model getModel()
getPrimaryModel()
should be used instead as
needed.@CheckForNull public Package getPrimaryModel()
public java.util.List<Package> getAllModels()
public long getVersion()
public java.util.List<com.nomagic.magicdraw.magicreport.tools.ProjectVersion> getVersionList()
ProjectVersion
information from opened server project.ProjectVersion
public java.lang.String getDescription()