FileDocCategorySizeDatePackage
UMLElement.javaAPI DocExample13843Tue Dec 08 01:21:00 GMT 1998oisoft.togetherx.scriptapi.UML

UMLElement

public interface UMLElement
UMLElement is an atomic constituent of the model. It defines common functionality for all the model elements. It is the top interface in the inheritance hierarchy of UML interfaces.
version
2.1.05 14.07.1998
author
Andrei Ivanov
see
UMLModel

Fields Summary
public static final String
PUBLIC
One of the visibility constants returned by getVisibility() method.
public static final String
PRIVATE
One of the visibility constants returned by getVisibility() method.
public static final String
PROTECTED
One of the visibility constants returned by getVisibility() method.
public static final String
PACKAGE
One of the visibility constants returned by getVisibility() method.
public static final String
JAVA
One of the language constants returned by getLanguage() method.
public static final String
CPP
One of the language constants returned by getLanguage() method.
public static final String
OCOBOL
One of the language constants returned by getLanguage() method.
Constructors Summary
Methods Summary
public voidaccept(UMLVisitor visitor)
accept() operation initiates visiting process using the Visitor solution pattern. The classes derived from UMLElement should implement this operation to call the appropriate method of UMLVisitor class, which can be extended by the user with desired functionality. For example, implementation of UMLClass.accept() can look like this:
UMLClassImp.accept(UMLVisitor visitor) {
visitor.visitClass();
}

see
UMLVisitor
param
visitor Visitor that access the element

public UMLPropertyEnumerationgetDocProperties()
Getting properties associated with the element. These cover only design properties, not language-specific properties. For programming language elements the properties are collected from the element's Java-style design comment. See Tags interface for list of predefined Together/J tags.

see
UMLProperty
see
Tags
see
UMLElement#hasProperty
see
UMLElement#getProperty
return
Property Enumerator of tagged values associated with the element. It can be empty; it cannot be null.

public java.io.FilegetFile()
Getting the file where the element is created, usually declared. The model provides that such a file is unique. To access other files related to the element, e.g. for operation's definition, use method. Language dependent:
For Java and OCOBOL - the file with source code;
For C++ - declaration file;
For the elements not associated with any language - containing diagram file (.vf*).

return
The file of the element. It can be null.

public UMLFileEnumerationgetFiles(java.lang.String kindOfFile)
Getting all files associated with the element. The parameter specifies the kind of files. Language dependent, different kinds are appropriate for different languages.

deprecated
Not implemented yet.
see
UMLElement#getFile
param
kindOfFile The kind of files being extracted. Possible values are:
"Doc" for Java or C++ element - to get documentation files;
"Implementation" for C++ element - to get definition (.cpp) files;
...can be extended...
return
File Enumerator of the files of the element. It can be empty; it cannot be null.

public UMLStringEnumerationgetHyperlinkedFiles()
Getting all the file names linked with this by hyperlinks. You can hyperlink files using the "Hyperlink To" page in the Inspector.

return
String Enumerator of all the elements hyperlinked to this element. It can be empty; it cannot be null.
since
345

public UMLElementEnumerationgetHyperlinks()
Getting all the elements linked with this by hyperlinks. You can hyperlink elements using the "Hyperlink To" page in the Inspector.

return
Element Enumerator of all the elements hyperlinked to this element. It can be empty; it cannot be null.

public java.lang.ObjectgetIdentityObject()
Some physical classes can be presented in the model in a number of instances by importing into logical packages. For all these instances this method returns the same value.

deprecated
Use directly UMLElement.equals() instead
return
java.lang.Object, which can be compared

public UMLLinkEnumerationgetIncomingLinks()
Getting all incoming links for the element. These cover all kinds of links. See UMLLink interface for the list of possible link kinds.

see
UMLElement#getOutgoingLinks
see
UMLElement#getIncomingLinksByKind
see
UMLLink
return
Link Enumerator of all the links incoming to the element. It can be empty; it cannot be null.

public UMLLinkEnumerationgetIncomingLinksByKind(java.lang.String kind)
Getting all the incoming links of the specified kind. See UMLLink interface for the list of possible link kinds.

see
UMLElement#getIncomingLinks
see
UMLLink
see
UMLLink#getLinkKind
param
kind The kind of links as defined by UMLLink.getLinkKind()
return
Link Enumerator of all the links of the kind passed and incoming to the element. It can be empty; it cannot be null.

public java.lang.StringgetLanguage()
Returns language identifier of the element. For the elements not associated with any language constructions, e.g. design elements, it returns UMLElement.JAVA.

return
Language identifier of the element, one of the 3 possible constants:
UMLElement.JAVA - for Java elements
UMLElement.CPP - for C++ elements
UMLElement.OCOBOL - for Object COBOL elements
see
UMLElement#JAVA
see
UMLElement#CPP
see
UMLElement#OCOBOL

public java.lang.StringgetName()
Getting element's name. You can get element's name using 4 kinds of string descriptions returned by the following 4 functions:
getName() - short name;
getQualifiedName() - full qualified name;
toLongString() - long description of element;
toShortString() - short description of element;
This method getName() returns the short name of element. For example, for interface oisoft.togetherx.UML.UMLElement it returns "UMLElement"

return
Short name of the element
see
UMLElement#getQualifiedName
see
UMLElement#toLongString
see
UMLElement#toShortString

public UMLStringEnumerationgetNote()
Returns the note text associated with the element This method uses the "@note" comment property.

see
UMLElement#getNoteLinks
see
UMLNoteLink
see
UMLElement#getNoteLinks

public UMLNoteLinkEnumerationgetNoteLinks()
Getting links-attachments to Notes. A Note is a rectangular node in the diagram with text. It can be linked with any other diagram element with a Note link. A note captures the assumptions and decisions applied during analysis and design. Notes may contain any information, including plain text, fragments of code, or references to other documents. A note holds an unlimited amount of text and can be sized accordingly.

see
UMLNoteLink
return
Note Link Enumerator of all the Note links attaching some notes to the element.

public UMLLinkEnumerationgetOutgoingLinks()
Getting all outgoing links for the element. These cover all kinds of links. See UMLLink interface for the list of possible link kinds.

see
UMLElement#getIncomingLinks
see
UMLElement#getOutgoingLinksByKind
see
UMLLink
return
Link Enumerator of all the links outgoing from the element. It can be empty; it cannot be null.

public UMLLinkEnumerationgetOutgoingLinksByKind(java.lang.String kind)
Getting all the outgoing links of the specified kind. See UMLLink interface for the list of possible link kinds.

see
UMLElement#getOutgoingLinks
see
UMLElement#getIncomingLinksByKind
see
UMLLink
see
UMLLink#getLinkKind
param
kind The kind of links as defined by UMLLink.getLinkKind()
return
Link Enumerator of all the links of the kind passed and outgoing from the element. It can be empty; it cannot be null.

public java.lang.StringgetProperty(java.lang.String property)
Getting the value of element's property by name. To get all the properties, use getDocProperties() method.

param
property The name of the property. See Tags interface for list of predefined Together/J tags.
return
The string value of the property with the name passed, or null - if the element does not contain this property.
see
Tags
see
UMLElement#hasProperty
see
UMLElement#getDocProperties

public java.lang.StringgetQualifiedName()
Getting element's full qualified name. For example, for interface oisoft.togetherx.UML.UMLElement it returns "oisoft.togetherx.UML.UMLElement"

return
Full qualified name of the element
see
UMLElement#getName
see
UMLElement#toLongString
see
UMLElement#toShortString

public java.lang.StringgetVisibility()
Returns element's visibility. If visibility semantic is not defined for the element, it returns UMLElement.PUBLIC.

return
Visibility of the element, one of the 4 possible constants:
UMLElement.PUBLIC,
UMLElement.PRIVATE,
UMLElement.PROTECTED,
UMLElement.PACKAGE
see
UMLElement#PUBLIC
see
UMLElement#PRIVATE
see
UMLElement#PROTECTED
see
UMLElement#PACKAGE

public booleanhasProperty(java.lang.String property)
Indicates whether the element has specified property.

param
property The name of the property. See Tags interface for list of predefined Together/J tags.
return
true if the element has the property with the name passed.
see
UMLElement#getProperty
see
Tags

public booleanisFullDefined()
Indicates whether the element is defined, not only "referenced". Some elements can be referenced with links to it, but are not defined, e.g. have not declaration. For example, you have a class that extends some other class and for the latter class any information are absent. Such classes are called "referenced".

return
true if the element is defined in the model.

public booleanisModelElement()
Indicates whether the element is not imported. Some elements in diagram are physically contained, for example, classes of the package displayed in the physical package diagram. Others are imported, for example, classes from another package imported to a physical package diagram or all classes in a logical package diagram and logical package diagram itself.

return
true if the element is not imported.

public booleanisVisible()
Indicates whether the element is visible on the diagram. Some elements in diagram can be hidden using "Hide" command of the context menu or using filters in the diagram's Display tab.

return
true if the element is not hidden.

public java.lang.StringtoLongString()
Getting element's long description. Use this method when you wish, for instance, insert element's description (declaration) in documentation. For example, for oisoft.togetherx.UML.UMLElement it returns "public interface UMLElement"

return
Description string of the element
see
UMLElement#getName
see
UMLElement#getQualifiedName
see
UMLElement#toShortString

public java.lang.StringtoShortString()
Getting element's short description.

deprecated
In current implementation it returns the same string as getName().
return
Short description of the element
see
UMLElement#getName
see
UMLElement#getQualifiedName
see
UMLElement#toLongString