/*----------------------------------------------------------------------------
Copyright © 1998 Object International Software GmbH
----------------------------------------------------------------------------*/
package oisoft.togetherx.scriptapi.UML;
import java.io.File;
//------------------------------------------------------------------------------
/**
** The <i>UMLModel</i> interface presents the information about
** the whole model.
** UMLModel is the root of the whole-part hierarchy of UML elements.
** @version 2.1.01 12.03.1998
** @author Andrei Ivanov
** @see UMLPackage
*/
public interface UMLModel
{
/**
* Returns the root (top-level) package of the whole model.
* @return Interface to the top-level package
* @see UMLPackage
*/
UMLPackage getRootPackage();
/**
* Returns the current package. Current package
* is the package of the diagram, which has the
* focus at the moment when the method has been called.
* @return Interface to the current package
* @see UMLPackage
*/
UMLPackage getCurrentPackage();
/**
* Returns diagram by name.
* The name must be a fully qualified name in terms of Together/J,
* how it is returned by, e.g., the
* <i>UMLElement.#getQualifiedName()</i> method.
* @param name Full qualified name of the diagram
* @return Interface to the diagram
* @see UMLElement#getQualifiedName
* @see UMLPackage
*/
UMLPackage getDiagramByName(String name);
/**
* Returns node by name.
* The name must be a fully qualified name in terms of Together/J,
* how it is returned by, e.g., the
* <i>UMLElement.#getQualifiedName()</i> method.
* @param name Full qualified name of the node
* @return Interface to the node
* @see UMLElement#getQualifiedName
* @see UMLNode
*/
UMLNode getNodeByName(String name);
/**
* Returns node by name.
* The name may be short or fully qualified
* If the name is short then context is used for its search
* <i>UMLElement.#getQualifiedName()</i> method.
* @param name Full qualified name of the node
* @param context Context class
* @return Interface to the node
* @see UMLElement#getQualifiedName
* @see UMLNode
*/
UMLNode getNodeByName(String name, UMLNode context);
/**
* Returns node by type.
* The type is returned by, e.g., the
* <i>UMLMember.#getType()</i> method.
* @param name Full qualified name of the node
* @return Interface to the node
* @see UMLMember#getType
* @see UMLNode
*/
UMLNode getNodeByType(UMLType type);
/**
* Returns element by name. This covers any element in any diagram.
* The name must be a fully qualified name in terms of Together/J,
* how it is returned by, e.g., the
* <i>UMLElement.#getQualifiedName()</i> method.
* @param name Full qualified name of the element
* @return Interace to the diagram
* @see UMLElement#getQualifiedName
*/
UMLElement getElementByName(String name);
/**
* Returns <i>File</i> for project file.
* There can be only one project opened.
* @return File object of the project file
*/
File getProjectFile();
/**
* Convert path to path relative to the project.
* @param fullPath Path to be converted
* @return Path relative to the project file path
*/
String getRelativePath(String fullPath);
/**
* This method controls the mode of including other elements
* into the model.
* True says to include only "model's" elements (that is defined
* in the model);
* False says to include additionally imported classes and
* logical package diagrams.
* The elements mentioned here are extracted by iterative methods
* of UMLPackage interface and its subclasses.
* By default, the Include Model Only mode is set to <b>false</b>.
* @param includeModelOnly sets the mode
* @see UMLModel#isIncludeModelOnly
*/
void setIncludeModelOnly(boolean includeModelOnly);
/**
* This method controls the mode of including hidden elements
* into the model.
* True says to include only visible elements;<br>
* False says to include additionally hidden elements (which
* can be hidden explicitly by the 'Hide' command or implicitly
* by filters on the "Display" tab of diagrams.<br>
* The elements mentioned here are extracted by iterative methods
* of UMLPackage interface and its subclasses.
* By default, the Include Visible Only mode is set to <b>true</b>.
* @param includeVisibleOnly sets the mode
* @see UMLModel#isIncludeVisibleOnly
*/
void setIncludeVisibleOnly(boolean includeVisibleOnly);
/**
* Returns the value of "Include model only" mode.
* @return true - only model's elements included;<br>
* false - imported classes and logical packages also included.
* @see UMLModel#setIncludeModelOnly
*/
boolean isIncludeModelOnly();
/**
* Returns the value of "Include visible only" mode.
* @return true - only visible elements included;<br>
* false - hidden elements also included.
* @see UMLModel#setIncludeVisibleOnly
*/
boolean isIncludeVisibleOnly();
/**
* Use this method when you change something
* and wish to update diagrams from the source code.
*/
void updateDiagrams();
/**
* Use this method when you change something
* and wish to reload the changed source code.
*
*/
void updateFileBuffers();
/**
* This method controls the mode of including attributes those are
* also links into the list of attributes.
* True says to include attributes-as-links in any iteration of attributes.
* False says to NOT include them.
* The attributes mentioned here are extracted by iterative methods
* of UMLClassifier interface and its subclasses.
* By default, the Include Link-Attribute mode is set to <b>false</b>.
* @param includeLinkAttribute sets the mode
* @see UMLClassifier#getAttributes
* @see UMLModel#isIncludeLinkAttribute
*/
void setIncludeLinkAttribute(boolean includeLinkAttribute);
/**
* Returns the value of "Include Link-Attribute" mode.
* @return true - Attributes-as-Links are included in attributes<br>
* false - Attributes-as-Links are excluded from attributes.
* @see UMLClassifier#getAttributes
* @see UMLModel#setIncludeLinkAttribute
*/
boolean isIncludeLinkAttribute();
/**
* This method controls the mode of including design comments those are used
* to create links into the list of attributes.
* True says to include pure links (comment-as-links) into any iteration of attributes.
* False says to NOT include them.
* The attributes mentioned here are extracted by iterative methods
* of UMLClassifier interface and its subclasses.
* By default, the Include Pure Link-Attribute mode is set to <b>false</b>.
* @param includePureLinkAttribute sets the mode
* @see UMLClassifier#getAttributes
* @see UMLModel#isIncludeLinkAttribute
* @since 354
*/
void setIncludePureLinkAttribute(boolean includePureLinkAttribute);
/**
* Returns the value of "Include Pure Link-Attribute" mode.
* @return true - Pure Links are included in attributes<br>
* false - Pure Links are excluded from attributes.
* @see UMLClassifier#getAttributes
* @see UMLModel#setIncludeLinkAttribute
* @since 354
*/
boolean isIncludePureLinkAttribute();
}
//------------------------------------------------------------------------------
|