com.togethersoft.openapi.rwi
Interface RwiProperty


public interface RwiProperty

Represents the element's string property and contains the names and descriptions of hardcoded properties.

The string constants in this interface are used in RwiPropertyMap's methods such as getProperty(String propertyName) hasProperty(String propertyName) etc. as the name of a property you wish to work with.

For example, if you need to get the name of the element:

 String elementName = someRwiElement.getProperty(RwiProperty.NAME); //RwiProperty.NAME is defined in this interface
 // now you have the element's name
 
Depending on the kind of information being represented by the property, an element can have single or multiple instances of that property.

For example, every element has only one RwiProperty.NAME property. On the other hand, a member representing an operation can have multiple instances of the RwiProperty.PARAMETER property.

The string properties are represented by instances of this interface. It provides methods for working with the values of a property (getValue, setValue, canSetValue methods), for getting the name of this property (via the getName method) and for getting other information containing in this property.

The term "other information" requires some clarification:

For example, let's condider the PARAMETER property. It contains information about a parameter of an operation. Since properties can have only one value (boolean or string), it is not possible to keep the name and the type of the parameter as the value of a property. For properties like EXTENDS we would like to be able to get not only the names of extended classes/interfaces but to be able to quickly find RwiNodes representing these classes/interfaces in order to perform some further analysis, etc.

That is why some of the hardcoded properties, besides their values, contain an instance of RwiPropertyMap. This instance is returned by the getSubproperties method. And that instance contains some other properties which can be obtained using the methods of RwiPropertyMap. For example, when you have a PARAMETER property, it contains "subproperties" TYPE, NAME, and TYPE_REFERENCED_ELEMENT. See PARAMETER property for a detailed example.

Author:
TogetherSoft
See Also: RwiPropertyMap

Field Summary
 final static StringABSTRACT
           A boolean property which indicates whether an element is abstract.
 final static StringAGGREGATION
           A boolean property for RwiLink whose SHAPE_TYPE property is RwiShapeType.ASSOCIATION indicating whether this association link is an aggregation link.
 final static StringASSOCIATES
           Contains a string with the qualified name of a class (interface) this attribute or operation is associated.
 final static StringBODY
           Contains a string with the value of the body of an operation.
 final static StringBY_VALUE
           A boolean property for Rwilink indicating whether this link is a composition link.
 final static StringCOMPILED
           A boolean property indicating whether this element is a compiled Java class.
 final static StringCONST
           
 final static StringCONSTRUCTOR
           A boolean property which indicates whether an element is a constructor.
 final static StringDECLARATION_TEXT
           Contains a string with a text of an element's declaration.
 final static StringDEFINITION_END_POSITION
           Contains a string with the value of the position of the end of an element's defintion in a file.
 final static StringDEFINITION_FILE
           Contains a string with the name of a file where the definition of this element is located.
 final static StringDEFINITION_START_POSITION
           Contains a string with the value of the position of the beginning of an element's defintion in a file.
 final static StringDESTRUCTOR
           A boolean property which indicates whether an element is a destructor.
 final static StringDIRECTORIES
           Contains a string with the full name of a directory containing elements of the RwiPackage.
 final static StringDIRECTORY_PACKAGE
           A boolean property which indicates whether a package is a directory.
 final static StringDOC
           Contains a string with the value of the description of this element.
 final static StringEND_POSITION
           Contains a string with the value of the offset of the end of an element's declaration in a file, including JavaDoc description comments (and body for Java language).
 final static StringEXTENDS
           Contains a string with the name of the class (interface) extended by this class (interface).
 final static StringFILE
           Contains a string with the name of a file where the declaration of this element is located.
 final static StringFILES
           For packages that are directories only, contains a string with the name of a file in this package.
 final static StringFINAL
           A boolean property which indicates whether an element has the final modifier.
 final static StringFULL_NAME
           Contains a string with the qualified name of the element.
 final static StringHYPERLINK
           Contains a string with the unique name of the element pointed to by a hyperlink from this element.
 final static StringIMPLEMENTS
           Contains a string with the name of an interface implemented by this class.
 final static StringIMPORTED
           
 final static StringINITIAL_VALUE
           Contains a string with the initial value of the attribute.
 final static StringINLINE
           A boolean property which indicates whether an element is an inline function in C++ language.
 final static StringINTERFACE
           A boolean property which indicates whether this element is an interface.
 final static StringLANGUAGE
           Contains a string with the name of the language associated with this element.
 final static StringLINK_MEMBER
           For an association link, contains a string with the unique name of the attribute representing this link.
 final static StringLINK_PREFIX
           A boolean property which indicates whether an attribute's name starts with "lnk".
 final static StringMEMBER_LINK
           For RwiMember representing an attribute, contains a string with the unique name of an association RwiLink represented by this attribute.
 final static StringMEMBER_SIGNATURE
           Contians a string with the signature of an operation or an attribute.
 final static StringMODEL_PART
           
 final static StringNAME
           Contains a string with the name of an element.
 final static StringNAMESPACE
           
 final static StringNATIVE
           A boolean property which indicates whether an element is a native element.
 final static StringPACKAGE_LOCAL
           A boolean property which indicates whether an element is package local.
 final static StringPARAMETER
           Contains information about a parameter of an operation.
 final static StringPARAMETERS_TEXT
           Contains a string with the text of parameters of the operation.
 final static StringPHYSICAL_PACKAGE
           A boolean property which indicates whether this element is a physical package diagram.
 final static StringPRIVATE
           A boolean property which indicates whether an element is private.
 final static StringPROTECTED
           A boolean property which indicates whether an element is protected.
 final static StringPUBLIC
           A boolean property which indicates whether an element is public.
 final static StringPURE
           A boolean property which indicates whether an element is a PURE element.
 final static StringREAD_ONLY
           A boolean property indicating whether this element is read-only.
 final static StringREFERENCED_ELEMENT
           This property is contained in the RwiPropertyMap instance returned by getSubproperties method of the EXTENDS, IMPLEMENTS, and THROW properties.
 final static StringRETURN_TYPE
           Contains a string with an operation's return type.
 final static StringRETURN_TYPE_REFERENCED_ELEMENT
           Contains a string with the unique name of operation's return type.
 final static StringSHAPE_TYPE
           Contains string information about the nature of the element.
 final static StringSTART_POSITION
           Contains a string with the value of the offset of the beginning of an element's declaration in a file, including JavaDoc description comments (and body for Java language).
 final static StringSTATIC
           A boolean property which indicates whether an element is static.
 final static StringSYNCHRONIZED
           A boolean property indicating whether this element has the synchronized modifier.
 final static StringTEMPLATE
           A boolean property which indicates whether this element is an template.
 final static StringTEMPLATE_PARAM_TEXT
           Contains a string with the text of parameters of the template class.
 final static StringTEXT
           Contains a string from a file with an element's declaration including JavaDoc description comments (and body for Java language) from START_POSITION to END_POSITION.
 final static StringTHROW
           Contains a string with the name of an exception which can be thrown by this element.
 final static StringTRANSIENT
           A boolean property indicating whether this element has the transient modifier.
 final static StringTYPE
           Contains a string with the type of an operation's parameter or the type of an attribute.
 final static StringTYPE_REFERENCED_ELEMENT
           For RwiMembers representing attributes, this property contains a string with the unique name of the element which is a type of the attribute.
 final static StringUML_PARAMETERS_TEXT
           Contains a string with a text of all parameters in the UML format separated by commas.
 final static StringUNIQUE_NAME
           Contains a string with the unique name of this element.
 final static StringVALUETYPE
           A boolean property which indicates whether this element is an valuetype.
 final static StringVIEW_TYPE
           Contains a string characterizing the visual representation of RwiDiagram (used to distinguish collaboration and sequence diagrams).
 final static StringVIRTUAL
           
 final static StringVISIBLE
           
 final static StringVOLATILE
           A boolean property indicating whether this element has the volatile modifier.

Method Summary
 booleancanSetValue(String value)
           Checks whether a specified value can be assigned to this property.
 StringgetName()
           Returns the name of this property.
 RwiPropertyMapgetSubproperties()
           Returns a properties container that has a set of properties which are the supbproperties for this property.
 StringgetValue()
           Returns a string with the value of this property.
 booleanisWritable()
           Returns true if this property is writable, false otherwise.
 voidsetValue(String value)
           Sets the value for this property, or removes this property.

Field Detail

ABSTRACT

public final static String ABSTRACT
A boolean property which indicates whether an element is abstract. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations have this property.

An element can have only one instance of this property.

The value of this constant is "$abstract". You can use this value in queries in .config files.


AGGREGATION

public final static String AGGREGATION
A boolean property for RwiLink whose SHAPE_TYPE property is RwiShapeType.ASSOCIATION indicating whether this association link is an aggregation link.

An element can have only one instance of this property.

The value of this constant is "$aggregation". You can use this value in queries in .config files.

See Also:
RwiShapeType.ASSOCIATION, BY_VALUE

ASSOCIATES

public final static String ASSOCIATES
Contains a string with the qualified name of a class (interface) this attribute or operation is associated. Only RwiMembers representing operations or attributes have this property.

An element can have only one instance of this property.

The value of this constant is "$associates". You can use this value in queries in .config files.


BODY

public final static String BODY
Contains a string with the value of the body of an operation.

For example, for myRwiMember representing this operation


 public int getSalary(String name, int year) {
   int k=100;
   return k;
 }
the execution of this line

  System.out.println("The body is :"+myRwiMember.getProperty(RwiProperty.BODY));
 
will output " int k=100; return k;"

It is very easy to set the body of an operation to the desired content using this property. For the operation described above, the execution of


 myRwiMember.setProperty(RwiProperty.BODY, "return 100;");
 
will transform the operation into

 public int getSalary(String name, int year) {
   return 100;
 }
An element can have only one instance of this property.

The value of this constant is "$body". You can use this value in queries in .config files.


BY_VALUE

public final static String BY_VALUE
A boolean property for Rwilink indicating whether this link is a composition link. Only for RwiLinks having the AGGREGATION property.

An element can have only one instance of this property.

The value of this constant is "$byValue". You can use this value in queries in .config files.

See Also:
RwiShapeType.ASSOCIATION, AGGREGATION

COMPILED

public final static String COMPILED
A boolean property indicating whether this element is a compiled Java class. Only RwiNodes representing classes have this property. For Java language only.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$compiled". You can use this value in queries in .config files.


CONST

public final static String CONST

CONSTRUCTOR

public final static String CONSTRUCTOR
A boolean property which indicates whether an element is a constructor. Only RwiMembers representing operations have this property.

An element can have only one instance of this property.

The value of this constant is "$constructor". You can use this value in queries in .config files.


DECLARATION_TEXT

public final static String DECLARATION_TEXT
Contains a string with a text of an element's declaration. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property. For example, for the RwiMember representing this operation:

 /**
 * @author TogetherSoft Corporation
 */
 public void someOperation(String str){
    System.out.println(str);
 }
this property will contain "public void someOperation(String str)".

An element can have only one instance of this property.

The value of this constant is "$declarationText". You can use this value in queries in .config files.

See Also:
TEXT

DEFINITION_END_POSITION

public final static String DEFINITION_END_POSITION
Contains a string with the value of the position of the end of an element's defintion in a file. For RwiMembers representing functions in C++ language only. For example:

  if (someElement.getProperty(RwiProperty.DEFINITION_END_POSITION)!=null){
    System.out.println("The definition end position is :"+Integer.parseInt(someElement.getProperty(RwiProperty.DEFINITION_END_POSITION)));
  }
  

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$definitionEndPosition". You can use this value in queries in .config files.


DEFINITION_FILE

public final static String DEFINITION_FILE
Contains a string with the name of a file where the definition of this element is located. For RwiMembers representing functions in C++ language only.

An element can have only one instance of this property.

The value of this constant is "$definitionFile". You can use this value in queries in .config files.


DEFINITION_START_POSITION

public final static String DEFINITION_START_POSITION
Contains a string with the value of the position of the beginning of an element's defintion in a file. For RwiMembers representing functions in C++ language only. For example:

  if (someElement.getProperty(RwiProperty.DEFINITION_START_POSITION)!=null){
    System.out.println("The definition start position is :"+Integer.parseInt(someElement.getProperty(RwiProperty.DEFINITION_START_POSITION)));
  }
  

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$definitionStartPosition". You can use this value in queries in .config files.


DESTRUCTOR

public final static String DESTRUCTOR
A boolean property which indicates whether an element is a destructor. Only RwiMembers representing operations have this property.

An element can have only one instance of this property.

The value of this constant is "$destructor". You can use this value in queries in .config files.


DIRECTORIES

public final static String DIRECTORIES
Contains a string with the full name of a directory containing elements of the RwiPackage. For RwiPackages only. Usually the package's data is located only in one directory, but it is possible to have several directories which keep the data for the same RwiPackage (for example, one directory keeps classes, another - diagrams etc.). For example, let us print the names of the directories keeping someRwiPackage's data:

   RwiPropertyEnumeration dirs=someOperation.properties(RwiProperty.DIRECTORIES);
   while (dirs.hasMoreElements()){
     System.out.println("Full name of a directory :"+dirs.nextRwiProperty().getValue());
   }

An element can have multiple instances of this property, they can be obtained using the RwiElement.properties(String propertyName) method.

The value of this constant is "$directories". You can use this value in queries in .config files.


DIRECTORY_PACKAGE

public final static String DIRECTORY_PACKAGE
A boolean property which indicates whether a package is a directory. For packages only.

An element can have only one instance of this property.

The value of this constant is "$directoryPackage". You can use this value in queries in .config files.

See Also:
RwiPackage

DOC

public final static String DOC
Contains a string with the value of the description of this element. (For classes, attributes and operations the description begins after the starting delimiter /** and continues until the tags section). Packages don't have this property.

An element can have only one instance of this property.

The value of this constant is "$doc". You can use this value in queries in .config files.


END_POSITION

public final static String END_POSITION
Contains a string with the value of the offset of the end of an element's declaration in a file, including JavaDoc description comments (and body for Java language). Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property. For example:

  if (someElement.getProperty(RwiProperty.END_POSITION)!=null){
    System.out.println("The end position is :"+Integer.parseInt(someElement.getProperty(RwiProperty.END_POSITION)));
  }
  

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$endPosition". You can use this value in queries in .config files.

See Also:
TEXT, IdeEditorPositionConverter

EXTENDS

public final static String EXTENDS
Contains a string with the name of the class (interface) extended by this class (interface). Only RwiNodes representing classes or interfaces have this property.

It it possible to get the unique name of the extended element using getSubproperties method and retrieving the REFERENCED_ELEMENT property. The unique name can be used to find an element in the model though the RwiModel.findElement method.

For example, let us print the names and the fully qualified names of all classes (interfaces) extended by someRwiNode representing a class/interface:


   RwiPropertyEnumeration extended = someRwiNode.properties(RwiProperty.EXTENDS);
   while (extended.hasMoreElements()){
     RwiProperty nextExtended=extended.nextRwiProperty();
     System.out.println("Our class/interface extends a class/interface :"+nextExtended.getValue());
     RwiPropertyMap subpropertiesContainer = nextExtended.getSubproperties();
     RwiModel model = RwiModelAccess.getModel();
     RwiElement foundClassOrInterface = model.findElement(subpropertiesContainer.getProperty(RwiProperty.REFERENCED_ELEMENT));
     if (foundClassOrInterface != null) {
        System.out.println("  The fully qualified name of this class/interface is :"+foundClassOrInterface.getProperty(RwiProperty.FULL_NAME));
     }
   }

An element can have multiple instances of this property, they can be obtained using the RwiElement.properties(String propertyName) method.

The value of this constant is "$extends". You can use this value in queries in .config files.

See Also:
RwiModel.findElement(java.lang.String)

FILE

public final static String FILE
Contains a string with the name of a file where the declaration of this element is located. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$file". You can use this value in queries in .config files.


FILES

public final static String FILES
For packages that are directories only, contains a string with the name of a file in this package. For example:

   RwiPropertyEnumeration files=somePackage.properties(RwiProperty.FILES);
   while (files.hasMoreElements()){
     System.out.println("Package contains a file :"+files.nextRwiProperty().getValue());
   }

This property is read-only.
An element can have multiple instances of this property, they can be obtained using the RwiElement.properties(String propertyName) method.

The value of this constant is "$files". You can use this value in queries in .config files.


FINAL

public final static String FINAL
A boolean property which indicates whether an element has the final modifier. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property. For Java language only.

An element can have only one instance of this property.

The value of this constant is "$final". You can use this value in queries in .config files.


FULL_NAME

public final static String FULL_NAME
Contains a string with the qualified name of the element. For RwiPackages and RwiNodes representing classes or interfaces, this property contains qualified name of package or class (interface) respectively. For other types of elements, this property contains their names only and is equivalent to the NAME property. For RwiPackages representing root packages this property contains an empty string.

For example, for a node representing a java class "com.togethersoft.util.Agent007" method getProperty(RwiProperty.FULL_NAME) will return "com.togethersoft.util.Agent007".

For root packages this property contains an empty string (NAME works ok).

An element can have only one instance of this property.

The value of this constant is "$fullName". You can use this value in queries in .config files.

See Also:
NAME, UNIQUE_NAME

HYPERLINK

public final static String HYPERLINK
Contains a string with the unique name of the element pointed to by a hyperlink from this element. For example:

   RwiPropertyEnumeration hLinks = someRwiElement.properties(RwiProperty.HYPERLINK);
   while (hLinks.hasMoreElements()){
     String uniqueNameOfReferencedElement = hLinks.nextRwiProperty().getValue();
     RwiModel model = RwiModelAccess.getModel();
     RwiElement foundElement = model.findElement(uniqueNameOfReferencedElement);
     if (foundElement != null) { //we might not find it. For example, if it is not in the classpath ;)
       System.out.println("Contains a hyperlink to :"+foundElement.getProperty(RwiProperty.NAME));
     }
   }

An element can have multiple instances of this property, they can be obtained using the RwiElement.properties(String propertyName) method.

The value of this constant is "$hyperlink". You can use this value in queries in .config files.

See Also:
RwiModel.findElement(java.lang.String)

IMPLEMENTS

public final static String IMPLEMENTS
Contains a string with the name of an interface implemented by this class. Only RwiNodes representing classes have this property.

It it possible to get the unique name of the implemented interface using getSubproperties method and retrieving the REFERENCED_ELEMENT property. The unique name can be used to find an element in the model though the RwiModel.findElement method.

For example, let us print the names and the fully qualified names of all interfaces implemented by someClass:


   RwiPropertyEnumeration implemented=someClass.properties(RwiProperty.IMPLEMENTS);
   while (implemented.hasMoreElements()){
     RwiProperty nextImplemented=implemented.nextRwiProperty();
     System.out.println("Our class implements an interface :"+nextImplemented.getValue());
     RwiPropertyMap subpropertiesContainer = nextImplemented.getSubproperties();
     RwiModel model = RwiModelAccess.getModel();
     RwiElement foundInterface = model.findElement(subpropertiesContainer.getProperty(RwiProperty.REFERENCED_ELEMENT));
     if (foundInterface != null) {
        System.out.println("  The fully qualified name of this interface is :"+foundInterface.getProperty(RwiProperty.FULL_NAME));
     }
   }

An element can have multiple instances of this property, they can be obtained using the RwiElement.properties(String propertyName) method.

The value of this constant is "$implements". You can use this value in queries in .config files.

See Also:
RwiModel.findElement(java.lang.String)

IMPORTED

public final static String IMPORTED

INITIAL_VALUE

public final static String INITIAL_VALUE
Contains a string with the initial value of the attribute. Only attributes have this property.

For example, if someRwiMember represents the attribute "myName" in this class:

 class A {
   private String myName;
 }
and you wish to assign an initial value to this attribute (for example, myName = "Bob"), you can done it using these lines of code:
 if (someRwiMember.canSetProperty(RwiProperty.INITIAL_VALUE, "\"Bob\"")) {
   someRwiMember.setProperty(RwiProperty.INITIAL_VALUE, "\"Bob\""));
 }
 
A new attribute in a class/interface can be created using the method RwiNode.createMemberByPattern.

An element can have only one instance of this property.

The value of this constant is "$initialValue". You can use this value in queries in .config files.


INLINE

public final static String INLINE
A boolean property which indicates whether an element is an inline function in C++ language. Only RwiMembers representing operations have this property.

An element can have only one instance of this property.

The value of this constant is "$inline". You can use this value in queries in .config files.


INTERFACE

public final static String INTERFACE
A boolean property which indicates whether this element is an interface. Only for RwiNodes whose SHAPE_TYPE property is RwiShapeType.CLASS.

See RwiShapeType interface for an example.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$interface". You can use this value in queries in .config files.

See Also:
SHAPE_TYPE, RwiShapeType.CLASS

LANGUAGE

public final static String LANGUAGE
Contains a string with the name of the language associated with this element. There are several predefined values in RwiLanguage interface.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$language". You can use this value in queries in .config files.

See Also:
RwiLanguage

LINK_MEMBER

public final static String LINK_MEMBER
For an association link, contains a string with the unique name of the attribute representing this link. An element is an association link when its SHAPE_TYPE property is RwiShapeType.ASSOCIATION.

For example, in case someRwiElement represents an association link you with to get the attribute representing that link:


 if (RwiShapeType.ASSOCIATION.equals(someRwiElement.getProperty(RwiProperty.SHAPE_TYPE))){
     String uniqueNameOfAttribute = someRwiElement.getProperty(RwiProperty.MEMBER);
     RwiModel model = RwiModelAccess.getModel();
     RwiElement foundMember = model.findElement(uniqueNameOfAttribute);
     if (foundMember != null) {
        System.out.println("  The name of the attribute is :"+foundMember.getProperty(RwiProperty.NAME));
     }
 }
 

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$linkMember". You can use this value in queries in .config files.

See Also:
RwiShapeType.ASSOCIATION, #LINK

LINK_PREFIX

public final static String LINK_PREFIX
A boolean property which indicates whether an attribute's name starts with "lnk". Only RwiMembers representing attributes have this property.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$linkPrefix". You can use this value in queries in .config files.


MEMBER_LINK

public final static String MEMBER_LINK
For RwiMember representing an attribute, contains a string with the unique name of an association RwiLink represented by this attribute. If there is no association RwiLink represented by this attribute, this property contains null, and RwiMember's hasProperty(RwiProperty.LINK) method returns false.

For example, suppose someRwiMemberRepresentingAttribute represents an attribute. We wish to find out if this attribute represents an association link, and if it does, we want to get the destination of that link:


 if (someRwiMemberRepresentingAttibute.hasProperty(RwiProperty.LINK)) {
   String uniqueNameOfLink = someRwiMemberRepresentingAttibute.getProperty(RwiProperty.LINK);
   RwiModel model = RwiModelAccess.getModel();
   RwiElement foundElement = model.findElement(uniqueNameOfLink);
   if (foundElement instanceof RwiLink){
      RwiElement destination = ((RwiLink)foundElement).getDestination();
      //...  now you can analyze the destination
   }
 }
 

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$memberLink". You can use this value in queries in .config files.

See Also:
#MEMBER, RwiModel.findElement(java.lang.String)

MEMBER_SIGNATURE

public final static String MEMBER_SIGNATURE
Contians a string with the signature of an operation or an attribute. Only RwiMembers representing operations and attributes have this property.

For operations the string contains the name and the types of parameters. For example, for this operation:


 public int getSalary(String name, int year) {
   return 0;
 }
this property will contain "getSalary(String,int)".

For attributes the string will contain the name of an attribute. For example, for this attribute:


 int myAttr;
this property will contain "myAttr".

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$memberSignature". You can use this value in queries in .config files.

See Also:
PARAMETER

MODEL_PART

public final static String MODEL_PART

NAME

public final static String NAME
Contains a string with the name of an element.

For example, for a node representing a java class "com.togethersoft.util.Agent007" method getProperty(RwiProperty.NAME) will return "Agent007".

An element can have only one instance of this property.

The value of this constant is "$name". You can use this value in queries in .config files.

See Also:
FULL_NAME, UNIQUE_NAME

NAMESPACE

public final static String NAMESPACE

NATIVE

public final static String NATIVE
A boolean property which indicates whether an element is a native element. Only RwiMembers representing operations have this property. For Java language only.

An element can have only one instance of this property.

The value of this constant is "$native". You can use this value in queries in .config files.


PACKAGE_LOCAL

public final static String PACKAGE_LOCAL
A boolean property which indicates whether an element is package local. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property.

An element can have only one instance of this property.

The value of this constant is "$packageLocal". You can use this value in queries in .config files.


PARAMETER

public final static String PARAMETER
Contains information about a parameter of an operation. It is a little bit tricky, because in reality, there are two kinds of information one would like to know about the parameter - its name and a type. And one property can not contain both of them simultaneously as its value! In fact, this property contains a properties container (instance of RwiPropertyMap) which can be accessed through getSubproperties method. And that object has properties NAME and TYPE which contain name and type of the parameter. Additionally, it has the TYPE_REFERENCED_ELEMENT property with the unique name of the element which is a type of the parameter.

For example, let's say we have some RwiNode representing a class. We want to type the names and types of its attributes and operations. Moreover, for operations we would like to type the name and the type of its parameters:

 
 RwiMemberEnumeration rwiMemberEnumeration = rwiNode.members();
 while (rwiMemberEnumeration.hasMoreElements()) {
   RwiMember rwiNextMember=rwiMemberEnumeration.nextRwiMember();
   System.out.println("Next member's name is : "+rwiNextMember.getProperty(RwiProperty.NAME));
   if (RwiShapeType.OPERATION.equals(rwiNextMember.getProperty(RwiProperty.SHAPE_TYPE))){
     System.out.println(" It is an operation!");
     System.out.println(" Its return type is: "+rwiNextMember.getProperty(RwiProperty.RETURN_TYPE));
     RwiPropertyEnumeration rwiParametersEnumeration=rwiNextMember.properties(RwiProperty.PARAMETER);
     while (rwiParametersEnumeration.hasMoreElements()) {
       RwiProperty nextParameterProperty=rwiParametersEnumeration.nextRwiProperty();
       RwiPropertyMap subpropertiesContainer=nextParameterProperty.getSubproperties();
       System.out.println("    Name of parameter: "+subpropertiesContainer.getProperty(RwiProperty.NAME) );
       System.out.println("    Type of parameter: "+subpropertiesContainer.getProperty(RwiProperty.TYPE) );
       //now, suppose we want to get the RwiNode representing the type of the parameter
       String uniqueNameOfType = subpropertiesContainer.getProperty(RwiProperty.TYPE_REFERENCED_ELEMENT);
       RwiModel model = RwiModelAccess.getModel();
       RwiElement foundElement = model.findElement(uniqueNameOfType);
       if (foundElement != null) { //we might not find it. For example, if it is not in the classpath ;)
         System.out.println("  The fully qualified name of the type is:"+foundElement.getProperty(RwiProperty.FULL_NAME));
       }
     }
   } else {
     if (RwiShapeType.ATTRIBUTE.equals(rwiNextMember.getProperty(RwiProperty.SHAPE_TYPE))){
       System.out.println(" It is an attribute!");
       System.out.println(" Its type is: "+rwiNextMember.getProperty(RwiProperty.TYPE));
     }
   }
 }
 

The example above shows how to extract information about operation's parameters. Now, below is an explanation of how to add this kind of property to an operation. Let's say we have some RwiMember fOper representing this operation:

  public void f(){
  }
and we want to change it to
  public void f(ClassA a, ClassB b){
  }
There are four possible ways to do it:
  1. Using the PARAMETERS_TEXT property:
      fOper.setProperty(RwiProperty.PARAMETERS_TEXT, "ClassA a, ClassB b");
     
  2. Setting the value directly:
    
      fOper.addProperty(RwiProperty.PARAMETER,"ClassA a");
      fOper.addProperty(RwiProperty.PARAMETER,"ClassB b");
  3. Setting the value through getSubproperties method using the TYPE property:
    
      RwiProperty p=fOper.addProperty(RwiProperty.PARAMETER, null) //creates the property with the default value
       p.getSubproperties.setProperty(RwiProperty.TYPE,"ClassA");
       p.getSubproperties.setProperty(RwiProperty.NAME,"a");
      RwiProperty q=fOper.addProperty(RwiProperty.PARAMETER, null) //creates the property with the default value
       q.getSubproperties.setProperty(RwiProperty.TYPE,"ClassB");
       q.getSubproperties.setProperty(RwiProperty.NAME,"b");
  4. Setting the value through getSubproperties method using the TYPE_REFERENCED_ELEMENT property:
    
      RwiProperty p=fOper.addProperty(RwiProperty.PARAMETER, null) //creates the property with the default value
       p.getSubproperties.setProperty(RwiProperty.TYPE_REFERENCED_ELEMENT, stringWithUniqueNameFor_ClassA);
       p.getSubproperties.setProperty(RwiProperty.NAME,"a");
      RwiProperty q=fOper.addProperty(RwiProperty.PARAMETER, null) //creates the property with the default value
       q.getSubproperties.setProperty(RwiProperty.TYPE_REFERENCED_ELEMENT, stringWithUniqueNameFor_ClassB);
       q.getSubproperties.setProperty(RwiProperty.NAME,"b");
An element can have multiple instances of this property, they can be obtained using the RwiElement.properties(String propertyName) method.

The value of this constant is "$parameter". You can use this value in queries in .config files.

See Also:
getSubproperties(), TYPE, TYPE_REFERENCED_ELEMENT, MEMBER_SIGNATURE, RwiModel.findElement(java.lang.String), PARAMETERS_TEXT, UML_PARAMETERS_TEXT

PARAMETERS_TEXT

public final static String PARAMETERS_TEXT
Contains a string with the text of parameters of the operation. This property returns exactly the same string as in the source code. For example, for this operation:

 public void f(String s, int i){}
 }
this property will contain "String s, int i".

You can use this property to change the text of parameters. In this case you must specify a string with a valid (from the syntax viewpoint) set of parameters. For example, if RwiMember fOper represents the operation described above, and you wish to change it to

 public void f(long l, MyClass c){}
 
you must call
 fOper.setProperty(RwiProperty.PARAMETERS_TEXT, "long l, MyClass c");
 
Note that none of
 fOper.setProperty(RwiProperty.PARAMETERS_TEXT, "long , MyClass c");
 fOper.setProperty(RwiProperty.PARAMETERS_TEXT, "l, MyClass c");
 fOper.setProperty(RwiProperty.PARAMETERS_TEXT, "long l,");
 
will work.

An element can have only one instance of this property.

The value of this constant is "$parametersText". You can use this value in queries in .config files.

See Also:
UML_PARAMETERS_TEXT, PARAMETER

PHYSICAL_PACKAGE

public final static String PHYSICAL_PACKAGE
A boolean property which indicates whether this element is a physical package diagram. Only RwiDiagrams have this property.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$physicalPackage". You can use this value in queries in .config files.

See Also:
RwiDiagram, RwiPackage

PRIVATE

public final static String PRIVATE
A boolean property which indicates whether an element is private. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property.

An element can have only one instance of this property.

The value of this constant is "$private". You can use this value in queries in .config files.


PROTECTED

public final static String PROTECTED
A boolean property which indicates whether an element is protected. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property.

An element can have only one instance of this property.

The value of this constant is "$protected". You can use this value in queries in .config files.


PUBLIC

public final static String PUBLIC
A boolean property which indicates whether an element is public. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property.

An element can have only one instance of this property.

The value of this constant is "$public". You can use this value in queries in .config files.


PURE

public final static String PURE
A boolean property which indicates whether an element is a PURE element. Only RwiMembers representing operations or attributes have this property. A PURE element is an element which is stored in a comment field and thus is invisible for real source code elements. Nevertheless, RWI model treats a PURE element like a real source code element.

An element can have only one instance of this property.

The value of this constant is "$pure". You can use this value in queries in .config files.


READ_ONLY

public final static String READ_ONLY
A boolean property indicating whether this element is read-only. For example:

 if (someElement.hasProperty(RwiProperty.READ_ONLY)) System.out.println("Element is read-only");
 

An element can have only one instance of this property.

The value of this constant is "$readOnly". You can use this value in queries in .config files.


REFERENCED_ELEMENT

public final static String REFERENCED_ELEMENT
This property is contained in the RwiPropertyMap instance returned by getSubproperties method of the EXTENDS, IMPLEMENTS, and THROW properties.

It contains a string with the unqie name of the element whose name is contained in the EXTENDS, IMPLEMENTS, or THROW property. If it is not possible to obtain the element (for example, it is not in the CLASSPATH), then the value of this property is null.

See each property description (EXTENDS, IMPLEMENTS, THROW) for examples. This property is read-only.

See Also:
EXTENDS, IMPLEMENTS, THROW

RETURN_TYPE

public final static String RETURN_TYPE
Contains a string with an operation's return type. Only RwiMembers representing operations have this property.

For example, for the operation


 public void myMethod(){
 }
represented by myRwiMember, this property will contain "void". To change the return type to the "int", the following should be done:

 myRwiMember.setProperty(RwiProperty.RETURN_TYPE,"int");

An element can have only one instance of this property.

The value of this constant is "$returnType". You can use this value in queries in .config files.

See Also:
RETURN_TYPE_REFERENCED_ELEMENT

RETURN_TYPE_REFERENCED_ELEMENT

public final static String RETURN_TYPE_REFERENCED_ELEMENT
Contains a string with the unique name of operation's return type. For example, in the following line:

  public ClassA makeA(){
   return null;
  } 
for the RwiMember representing operation makeA, this property will contain the unique name of ClassA.

Note the difference with the RETURN_TYPE property: this property returns the information which allows uniquely to find the referenced element (via RwiModel.findElement method) , while the RETURN_TYPE property returns only the string representation of that referenced element.

An element can have only one instance of this property.

The value of this constant is "$returnTypeReferencedElement". You can use this value in queries in .config files.

See Also:
RETURN_TYPE, RwiModel.findElement(java.lang.String)

SHAPE_TYPE

public final static String SHAPE_TYPE
Contains string information about the nature of the element. The predefined shape type property values are in RwiShapeType interface. An element's type can be identified by the value of SHAPE_TYPE property of that element, for example:
 if (RwiShapeType.OPERATION.equals(rwiSomeElement.getProperty(RwiProperty.SHAPE_TYPE))) {
               System.out.println("rwiSomeElement is an operation")
 }
 
User can create an element with a custom shape type using methods createNode and createDiagram in RwiPackage and RwiDiagram interfaces.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$shapeType". You can use this value in queries in .config files.

See Also:
RwiShapeType, VIEW_TYPE, RwiDiagram.createNode(java.lang.String), RwiPackage.createNode(java.lang.String), RwiDiagram.createDiagram(java.lang.String), RwiPackage.createDiagram(java.lang.String)

START_POSITION

public final static String START_POSITION
Contains a string with the value of the offset of the beginning of an element's declaration in a file, including JavaDoc description comments (and body for Java language). Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property. For example:

  if (someElement.getProperty(RwiProperty.START_POSITION)!=null){
    System.out.println("The start position is :"+Integer.parseInt(someElement.getProperty(RwiProperty.START_POSITION)));
  }
  

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$startPosition". You can use this value in queries in .config files.

See Also:
TEXT, IdeEditorPositionConverter

STATIC

public final static String STATIC
A boolean property which indicates whether an element is static. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property.

An element can have only one instance of this property.

The value of this constant is "$static". You can use this value in queries in .config files.


SYNCHRONIZED

public final static String SYNCHRONIZED
A boolean property indicating whether this element has the synchronized modifier. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations have this property. For Java languages only.

An element can have only one instance of this property.

The value of this constant is "$synchronized". You can use this value in queries in .config files.


TEMPLATE

public final static String TEMPLATE
A boolean property which indicates whether this element is an template. Only for RwiNodes whose SHAPE_TYPE property is RwiShapeType.CLASS.

See RwiShapeType interface for an example.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$template". You can use this value in queries in .config files.

See Also:
SHAPE_TYPE, RwiShapeType.CLASS

TEMPLATE_PARAM_TEXT

public final static String TEMPLATE_PARAM_TEXT
Contains a string with the text of parameters of the template class.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$templateParamText". You can use this value in queries in .config files.

See Also:
TEMPLATE

TEXT

public final static String TEXT
Contains a string from a file with an element's declaration including JavaDoc description comments (and body for Java language) from START_POSITION to END_POSITION. For example, for the RwiMember representing this operation:

 /**
 * @author TogetherSoft Corporation
 */
 public void someOperation(String str){
    System.out.println(str);
 }
this property will contain

 "/**
 * @author TogetherSoft Corporation
 */
  public void someOperation(String str){
     System.out.println(str);
  }"

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$text". You can use this value in queries in .config files.

See Also:
DECLARATION_TEXT, START_POSITION, END_POSITION

THROW

public final static String THROW
Contains a string with the name of an exception which can be thrown by this element. Only RwiMembers representing operations have this property.

It it possible to get the unique name of the exception object using getSubproperties method and retrieving the REFERENCED_ELEMENT property.

For example, let us print the names and the fully qualified names of all exceptions which can be thrown by someOperation:


   RwiPropertyEnumeration exceptions=someOperation.properties(RwiProperty.THROW);
   while (exceptions.hasMoreElements()){
     RwiProperty nextException = exceptions.nextRwiProperty();
     System.out.println("Our operation can throw  :"+nextException.getValue());
     RwiPropertyMap subpropertiesContainer = nextException.getSubproperties();
     RwiModel model = RwiModelAccess.getModel();
     RwiElement foundClass = model.findElement(subpropertiesContainer.getProperty(RwiProperty.REFERENCED_ELEMENT));
     if (foundClass != null) {
        System.out.println("  The fully qualified name of this exception is :"+foundClass.getProperty(RwiProperty.FULL_NAME));
     }
   }

An element can have multiple instances of this property, they can be obtained using the RwiElement.properties(String propertyName) method.

The value of this constant is "$throw". You can use this value in queries in .config files.

See Also:
RwiModel.findElement(java.lang.String)

TRANSIENT

public final static String TRANSIENT
A boolean property indicating whether this element has the transient modifier. Only RwiMembers representing attributes have this property. For Java language only.

An element can have only one instance of this property.

The value of this constant is "$transient". You can use this value in queries in .config files.


TYPE

public final static String TYPE
Contains a string with the type of an operation's parameter or the type of an attribute. For details about extracting information about parameters see getSubproperties method and PARAMETER property (description contains the detailed example).

For example, for an an attribute "int i;" represented by someRwiMember, the execution of

 System.out.println(someRwiMember.getProperty(RwiProperty.TYPE));
 
will print int.

Since this property is not ready-only you can easily change the type of an attribute:
The execution of


 someRwiMember.setProperty(RwiProperty.TYPE, "String");
This will transform the original attribute into "String i;"

An element can have only one instance of this property.

The value of this constant is "$type". You can use this value in queries in .config files.

See Also:
TYPE_REFERENCED_ELEMENT, PARAMETER, getSubproperties()

TYPE_REFERENCED_ELEMENT

public final static String TYPE_REFERENCED_ELEMENT
For RwiMembers representing attributes, this property contains a string with the unique name of the element which is a type of the attribute. For example, in the following line of code:

  SomeClass A;
for the RwiMember representing attribute A, this property will contain the unique name of RwiNode representing the class SomeClass.

Note the difference with the TYPE property: this property returns the information which allows uniquely to find the referenced element (via RwiModel.findElement method) , while the TYPE property returns only the string representation of that referenced element.

For a parameter of an operation it is also possible to get the unique name of the element which is a type of the parameter. The RwiPropertyMap instance returned by the getSubproperties method for the PARAMETER property, contains the TYPE_REFERENCED_ELEMENT subproperty with the desired value. See PARAMETER property description for the example.

An element can have only one instance of this property.

The value of this constant is "$typeReferencedElement". You can use this value in queries in .config files.

See Also:
TYPE, RwiModel.findElement(java.lang.String)

UML_PARAMETERS_TEXT

public final static String UML_PARAMETERS_TEXT
Contains a string with a text of all parameters in the UML format separated by commas. For RwiMembers which are operations only. In the UML notation name of a parameter comes first, then colon, then its type. For example, for this operation:
 public void operation(String s, int i){}
 
this property will contain "s:String,i:int".

An element can have only one instance of this property.

The value of this constant is "$umlParametersText". You can use this value in queries in .config files.

See Also:
PARAMETERS_TEXT, PARAMETER

UNIQUE_NAME

public final static String UNIQUE_NAME
Contains a string with the unique name of this element. The unique name is a string which uniquely identifies an element within the model. RwiModel.findElement method allows to find an element by its unique name.

An element can have only one instance of this property.

The value of this constant is "$uniqueName". You can use this value in queries in .config files.

See Also:
RwiElement.getUniqueName(), RwiModel.findElement(java.lang.String), NAME, FULL_NAME

VALUETYPE

public final static String VALUETYPE
A boolean property which indicates whether this element is an valuetype. Only for RwiNodes whose SHAPE_TYPE property is RwiShapeType.CLASS.

See RwiShapeType interface for an example.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$valuetype". You can use this value in queries in .config files.

See Also:
SHAPE_TYPE, RwiShapeType.CLASS

VIEW_TYPE

public final static String VIEW_TYPE
Contains a string characterizing the visual representation of RwiDiagram (used to distinguish collaboration and sequence diagrams). For instance, collaboration and sequence diagrams are represented by the same RwiDiagram. The value of SHAPE_TYPE property for that diagram is RwiShapeType.SEQUENCE_DIAGRAM.

When it is displayed as a collaboration diagram, it has the VIEW_TYPE property. If it is displayed as a sequence diagram, it does not have this property.

See an example in RwiShapeType interface.

An element can have only one instance of this property.

The value of this constant is "$viewType". You can use this value in queries in .config files.

See Also:
SHAPE_TYPE, RwiShapeType

VIRTUAL

public final static String VIRTUAL

VISIBLE

public final static String VISIBLE

VOLATILE

public final static String VOLATILE
A boolean property indicating whether this element has the volatile modifier. Only RwiMembers representing attributes have this property. For Java and C++ languages only.

An element can have only one instance of this property.

The value of this constant is "$volatile". You can use this value in queries in .config files.

Method Detail

canSetValue

public boolean canSetValue(String value)
Checks whether a specified value can be assigned to this property.
Parameters:
value - The string value which needs to be assigned to this property. If value is null then this property will be removed.
Returns: true if the value can be assigned to this property, false otherwise

getName

public String getName()
Returns the name of this property.
Returns: the name of this property
See Also:
RwiPropertyMap.properties()

getSubproperties

public RwiPropertyMap getSubproperties()
Returns a properties container that has a set of properties which are the supbproperties for this property. For example, a parameter of an operation has subproperties which contain its name and type. These subproperties belong to an instance of RwiPropertyMap returned by this method.
Returns: RwiPropertyMap containing properties which are subproperties of this property
See Also:
PARAMETER, RwiPropertyMap

getValue

public String getValue()
Returns a string with the value of this property.
Returns: a string with the value of this property
See Also:
RwiPropertyMap.properties()

isWritable

public boolean isWritable()
Returns true if this property is writable, false otherwise. false can be returned if this property is read-only, or the whole element this property belongs to is read-only.
Returns: true if this property is writable, false otherwise

setValue

public void setValue(String value)
Sets the value for this property, or removes this property.
Parameters:
value - The string value which needs to be assigned to this property. If value is null then this property will be removed.

Association Links

to Class java.lang.String

Contains string information about the nature of the element. The predefined shape type property values are in RwiShapeType interface. An element's type can be identified by the value of SHAPE_TYPE property of that element, for example:
 if (RwiShapeType.OPERATION.equals(rwiSomeElement.getProperty(RwiProperty.SHAPE_TYPE))) {
               System.out.println("rwiSomeElement is an operation")
 }
 
User can create an element with a custom shape type using methods createNode and createDiagram in RwiPackage and RwiDiagram interfaces.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$shapeType". You can use this value in queries in .config files.

see RwiShapeType, #VIEW_TYPE, RwiDiagram#createNode, RwiPackage#createNode, RwiDiagram#createDiagram, RwiPackage#createDiagram

to Class java.lang.String

Contains a string with the type of an operation's parameter or the type of an attribute. For details about extracting information about parameters see getSubproperties method and {@link #PARAMETER PARAMETER} property (description contains the detailed example).

For example, for an an attribute "int i;" represented by someRwiMember, the execution of

 System.out.println(someRwiMember.getProperty(RwiProperty.TYPE));
 
will print int.

Since this property is not ready-only you can easily change the type of an attribute:
The execution of


 someRwiMember.setProperty(RwiProperty.TYPE, "String");
This will transform the original attribute into "String i;"

An element can have only one instance of this property.

The value of this constant is "$type". You can use this value in queries in .config files.

see #TYPE_REFERENCED_ELEMENT, #PARAMETER, #getSubproperties

to Class java.lang.String

For RwiMembers representing attributes, this property contains a string with the unique name of the element which is a type of the attribute. For example, in the following line of code:

  SomeClass A;
for the RwiMember representing attribute A, this property will contain the unique name of RwiNode representing the class SomeClass.

Note the difference with the {@link #TYPE TYPE} property: this property returns the information which allows uniquely to find the referenced element (via {@link RwiModel#findElement RwiModel.findElement} method) , while the TYPE property returns only the string representation of that referenced element.

For a parameter of an operation it is also possible to get the unique name of the element which is a type of the parameter. The RwiPropertyMap instance returned by the getSubproperties method for the {@link #PARAMETER PARAMETER} property, contains the TYPE_REFERENCED_ELEMENT subproperty with the desired value. See PARAMETER property description for the example.

An element can have only one instance of this property.

The value of this constant is "$typeReferencedElement". You can use this value in queries in .config files.

see #TYPE, RwiModel#findElement

to Class java.lang.String

Contains a string with an operation's return type. Only RwiMembers representing operations have this property.

For example, for the operation


 public void myMethod(){
 }
represented by myRwiMember, this property will contain "void". To change the return type to the "int", the following should be done:

 myRwiMember.setProperty(RwiProperty.RETURN_TYPE,"int");

An element can have only one instance of this property.

The value of this constant is "$returnType". You can use this value in queries in .config files.

see #RETURN_TYPE_REFERENCED_ELEMENT

to Class java.lang.String

Contains a string with the unique name of operation's return type. For example, in the following line:

  public ClassA makeA(){
   return null;
  } 
for the RwiMember representing operation makeA, this property will contain the unique name of ClassA.

Note the difference with the {@link #RETURN_TYPE RETURN_TYPE} property: this property returns the information which allows uniquely to find the referenced element (via {@link RwiModel#findElement RwiModel.findElement} method) , while the RETURN_TYPE property returns only the string representation of that referenced element.

An element can have only one instance of this property.

The value of this constant is "$returnTypeReferencedElement". You can use this value in queries in .config files.

see #RETURN_TYPE, RwiModel#findElement

to Class java.lang.String

Contains information about a parameter of an operation. It is a little bit tricky, because in reality, there are two kinds of information one would like to know about the parameter - its name and a type. And one property can not contain both of them simultaneously as its value! In fact, this property contains a properties container (instance of RwiPropertyMap) which can be accessed through getSubproperties method. And that object has properties {@link #NAME NAME} and {@link #TYPE TYPE} which contain name and type of the parameter. Additionally, it has the {@link #TYPE_REFERENCED_ELEMENT TYPE_REFERENCED_ELEMENT} property with the unique name of the element which is a type of the parameter.

For example, let's say we have some RwiNode representing a class. We want to type the names and types of its attributes and operations. Moreover, for operations we would like to type the name and the type of its parameters:

 
 RwiMemberEnumeration rwiMemberEnumeration = rwiNode.members();
 while (rwiMemberEnumeration.hasMoreElements()) {
   RwiMember rwiNextMember=rwiMemberEnumeration.nextRwiMember();
   System.out.println("Next member's name is : "+rwiNextMember.getProperty(RwiProperty.NAME));
   if (RwiShapeType.OPERATION.equals(rwiNextMember.getProperty(RwiProperty.SHAPE_TYPE))){
     System.out.println(" It is an operation!");
     System.out.println(" Its return type is: "+rwiNextMember.getProperty(RwiProperty.RETURN_TYPE));
     RwiPropertyEnumeration rwiParametersEnumeration=rwiNextMember.properties(RwiProperty.PARAMETER);
     while (rwiParametersEnumeration.hasMoreElements()) {
       RwiProperty nextParameterProperty=rwiParametersEnumeration.nextRwiProperty();
       RwiPropertyMap subpropertiesContainer=nextParameterProperty.getSubproperties();
       System.out.println("    Name of parameter: "+subpropertiesContainer.getProperty(RwiProperty.NAME) );
       System.out.println("    Type of parameter: "+subpropertiesContainer.getProperty(RwiProperty.TYPE) );
       //now, suppose we want to get the RwiNode representing the type of the parameter
       String uniqueNameOfType = subpropertiesContainer.getProperty(RwiProperty.TYPE_REFERENCED_ELEMENT);
       RwiModel model = RwiModelAccess.getModel();
       RwiElement foundElement = model.findElement(uniqueNameOfType);
       if (foundElement != null) { //we might not find it. For example, if it is not in the classpath ;)
         System.out.println("  The fully qualified name of the type is:"+foundElement.getProperty(RwiProperty.FULL_NAME));
       }
     }
   } else {
     if (RwiShapeType.ATTRIBUTE.equals(rwiNextMember.getProperty(RwiProperty.SHAPE_TYPE))){
       System.out.println(" It is an attribute!");
       System.out.println(" Its type is: "+rwiNextMember.getProperty(RwiProperty.TYPE));
     }
   }
 }
 

The example above shows how to extract information about operation's parameters. Now, below is an explanation of how to add this kind of property to an operation. Let's say we have some RwiMember fOper representing this operation:

  public void f(){
  }
and we want to change it to
  public void f(ClassA a, ClassB b){
  }
There are four possible ways to do it:
  1. Using the {@link #PARAMETERS_TEXT PARAMETERS_TEXT} property:
      fOper.setProperty(RwiProperty.PARAMETERS_TEXT, "ClassA a, ClassB b");
     
  2. Setting the value directly:
    
      fOper.addProperty(RwiProperty.PARAMETER,"ClassA a");
      fOper.addProperty(RwiProperty.PARAMETER,"ClassB b");
  3. Setting the value through getSubproperties method using the TYPE property:
    
      RwiProperty p=fOper.addProperty(RwiProperty.PARAMETER, null) //creates the property with the default value
       p.getSubproperties.setProperty(RwiProperty.TYPE,"ClassA");
       p.getSubproperties.setProperty(RwiProperty.NAME,"a");
      RwiProperty q=fOper.addProperty(RwiProperty.PARAMETER, null) //creates the property with the default value
       q.getSubproperties.setProperty(RwiProperty.TYPE,"ClassB");
       q.getSubproperties.setProperty(RwiProperty.NAME,"b");
  4. Setting the value through getSubproperties method using the TYPE_REFERENCED_ELEMENT property:
    
      RwiProperty p=fOper.addProperty(RwiProperty.PARAMETER, null) //creates the property with the default value
       p.getSubproperties.setProperty(RwiProperty.TYPE_REFERENCED_ELEMENT, stringWithUniqueNameFor_ClassA);
       p.getSubproperties.setProperty(RwiProperty.NAME,"a");
      RwiProperty q=fOper.addProperty(RwiProperty.PARAMETER, null) //creates the property with the default value
       q.getSubproperties.setProperty(RwiProperty.TYPE_REFERENCED_ELEMENT, stringWithUniqueNameFor_ClassB);
       q.getSubproperties.setProperty(RwiProperty.NAME,"b");
An element can have multiple instances of this property, they can be obtained using the {@link RwiPropertyMap#properties(String) RwiElement.properties(String propertyName)} method.

The value of this constant is "$parameter". You can use this value in queries in .config files.

see #getSubproperties, #TYPE, #TYPE_REFERENCED_ELEMENT, #MEMBER_SIGNATURE, RwiModel#findElement, #PARAMETERS_TEXT, #UML_PARAMETERS_TEXT

to Class java.lang.String

Contains a string with the text of parameters of the operation. This property returns exactly the same string as in the source code. For example, for this operation:

 public void f(String s, int i){}
 }
this property will contain "String s, int i".

You can use this property to change the text of parameters. In this case you must specify a string with a valid (from the syntax viewpoint) set of parameters. For example, if RwiMember fOper represents the operation described above, and you wish to change it to

 public void f(long l, MyClass c){}
 
you must call
 fOper.setProperty(RwiProperty.PARAMETERS_TEXT, "long l, MyClass c");
 
Note that none of
 fOper.setProperty(RwiProperty.PARAMETERS_TEXT, "long , MyClass c");
 fOper.setProperty(RwiProperty.PARAMETERS_TEXT, "l, MyClass c");
 fOper.setProperty(RwiProperty.PARAMETERS_TEXT, "long l,");
 
will work.

An element can have only one instance of this property.

The value of this constant is "$parametersText". You can use this value in queries in .config files.

see #UML_PARAMETERS_TEXT, #PARAMETER

to Class java.lang.String

Contains a string with the initial value of the attribute. Only attributes have this property.

For example, if someRwiMember represents the attribute "myName" in this class:

 class A {
   private String myName;
 }
and you wish to assign an initial value to this attribute (for example, myName = "Bob"), you can done it using these lines of code:
 if (someRwiMember.canSetProperty(RwiProperty.INITIAL_VALUE, "\"Bob\"")) {
   someRwiMember.setProperty(RwiProperty.INITIAL_VALUE, "\"Bob\""));
 }
 
A new attribute in a class/interface can be created using the method {@link com.togethersoft.openapi.rwi.RwiNode#createMemberByPattern RwiNode.createMemberByPattern}.

An element can have only one instance of this property.

The value of this constant is "$initialValue". You can use this value in queries in .config files.

to Class java.lang.String

Contains a string with the value of the body of an operation.

For example, for myRwiMember representing this operation


 public int getSalary(String name, int year) {
   int k=100;
   return k;
 }
the execution of this line

  System.out.println("The body is :"+myRwiMember.getProperty(RwiProperty.BODY));
 
will output " int k=100; return k;"

It is very easy to set the body of an operation to the desired content using this property. For the operation described above, the execution of


 myRwiMember.setProperty(RwiProperty.BODY, "return 100;");
 
will transform the operation into

 public int getSalary(String name, int year) {
   return 100;
 }
An element can have only one instance of this property.

The value of this constant is "$body". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether an element is public. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property.

An element can have only one instance of this property.

The value of this constant is "$public". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether an element is private. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property.

An element can have only one instance of this property.

The value of this constant is "$private". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether an element is protected. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property.

An element can have only one instance of this property.

The value of this constant is "$protected". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether an element is package local. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property.

An element can have only one instance of this property.

The value of this constant is "$packageLocal". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether an element is static. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property.

An element can have only one instance of this property.

The value of this constant is "$static". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether an element is abstract. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations have this property.

An element can have only one instance of this property.

The value of this constant is "$abstract". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether an element has the final modifier. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property. For Java language only.

An element can have only one instance of this property.

The value of this constant is "$final". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether an element is a constructor. Only RwiMembers representing operations have this property.

An element can have only one instance of this property.

The value of this constant is "$constructor". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether an element is a destructor. Only RwiMembers representing operations have this property.

An element can have only one instance of this property.

The value of this constant is "$destructor". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether an element is an inline function in C++ language. Only RwiMembers representing operations have this property.

An element can have only one instance of this property.

The value of this constant is "$inline". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether an element is a PURE element. Only RwiMembers representing operations or attributes have this property. A PURE element is an element which is stored in a comment field and thus is invisible for real source code elements. Nevertheless, RWI model treats a PURE element like a real source code element.

An element can have only one instance of this property.

The value of this constant is "$pure". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether an element is a native element. Only RwiMembers representing operations have this property. For Java language only.

An element can have only one instance of this property.

The value of this constant is "$native". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property indicating whether this element has the transient modifier. Only RwiMembers representing attributes have this property. For Java language only.

An element can have only one instance of this property.

The value of this constant is "$transient". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property indicating whether this element has the volatile modifier. Only RwiMembers representing attributes have this property. For Java and C++ languages only.

An element can have only one instance of this property.

The value of this constant is "$volatile". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property indicating whether this element has the synchronized modifier. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations have this property. For Java languages only.

An element can have only one instance of this property.

The value of this constant is "$synchronized". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property indicating whether this element is a compiled Java class. Only RwiNodes representing classes have this property. For Java language only.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$compiled". You can use this value in queries in .config files.

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

Contains a string with the qualified name of the element. For RwiPackages and RwiNodes representing classes or interfaces, this property contains qualified name of package or class (interface) respectively. For other types of elements, this property contains their names only and is equivalent to the NAME property. For RwiPackages representing root packages this property contains an empty string.

For example, for a node representing a java class "com.togethersoft.util.Agent007" method getProperty(RwiProperty.FULL_NAME) will return "com.togethersoft.util.Agent007".

For root packages this property contains an empty string (NAME works ok).

An element can have only one instance of this property.

The value of this constant is "$fullName". You can use this value in queries in .config files.

see #NAME, #UNIQUE_NAME

to Class java.lang.String

Contains a string with the name of an element.

For example, for a node representing a java class "com.togethersoft.util.Agent007" method getProperty(RwiProperty.NAME) will return "Agent007".

An element can have only one instance of this property.

The value of this constant is "$name". You can use this value in queries in .config files.

see #FULL_NAME, #UNIQUE_NAME

to Class java.lang.String

Contains a string with the name of the language associated with this element. There are several predefined values in RwiLanguage interface.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$language". You can use this value in queries in .config files.

see RwiLanguage

to Class java.lang.String

Contains a string with the name of a file where the declaration of this element is located. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$file". You can use this value in queries in .config files.

to Class java.lang.String

For packages that are directories only, contains a string with the name of a file in this package. For example:

   RwiPropertyEnumeration files=somePackage.properties(RwiProperty.FILES);
   while (files.hasMoreElements()){
     System.out.println("Package contains a file :"+files.nextRwiProperty().getValue());
   }

This property is read-only.
An element can have multiple instances of this property, they can be obtained using the {@link RwiPropertyMap#properties(String) RwiElement.properties(String propertyName)} method.

The value of this constant is "$files". You can use this value in queries in .config files.

to Class java.lang.String

Contains a string with the value of the offset of the beginning of an element's declaration in a file, including JavaDoc description comments (and body for Java language). Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property. For example:

  if (someElement.getProperty(RwiProperty.START_POSITION)!=null){
    System.out.println("The start position is :"+Integer.parseInt(someElement.getProperty(RwiProperty.START_POSITION)));
  }
  

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$startPosition". You can use this value in queries in .config files.

see #TEXT, com.togethersoft.openapi.ide.editor.IdeEditorPositionConverter

to Class java.lang.String

Contains a string with the value of the offset of the end of an element's declaration in a file, including JavaDoc description comments (and body for Java language). Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property. For example:

  if (someElement.getProperty(RwiProperty.END_POSITION)!=null){
    System.out.println("The end position is :"+Integer.parseInt(someElement.getProperty(RwiProperty.END_POSITION)));
  }
  

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$endPosition". You can use this value in queries in .config files.

see #TEXT, com.togethersoft.openapi.ide.editor.IdeEditorPositionConverter

to Class java.lang.String

Contains a string from a file with an element's declaration including JavaDoc description comments (and body for Java language) from START_POSITION to END_POSITION. For example, for the RwiMember representing this operation:

 /**
 * @author TogetherSoft Corporation
 */
 public void someOperation(String str){
    System.out.println(str);
 }
this property will contain

 "/**
 * @author TogetherSoft Corporation
 */
  public void someOperation(String str){
     System.out.println(str);
  }"

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$text". You can use this value in queries in .config files.

see #DECLARATION_TEXT, #START_POSITION, #END_POSITION

to Class java.lang.String

Contains a string with a text of an element's declaration. Only RwiNodes representing classes or interfaces, and RwiMembers representing operations or attributes have this property. For example, for the RwiMember representing this operation:

 /**
 * @author TogetherSoft Corporation
 */
 public void someOperation(String str){
    System.out.println(str);
 }
this property will contain "public void someOperation(String str)".

An element can have only one instance of this property.

The value of this constant is "$declarationText". You can use this value in queries in .config files.

see #TEXT

to Class java.lang.String

A boolean property which indicates whether this element is an interface. Only for RwiNodes whose SHAPE_TYPE property is RwiShapeType.CLASS.

See RwiShapeType interface for an {@link RwiShapeType#CLASS example}.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$interface". You can use this value in queries in .config files.

see #SHAPE_TYPE, RwiShapeType#CLASS

to Class java.lang.String

A boolean property which indicates whether this element is a physical package diagram. Only RwiDiagrams have this property.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$physicalPackage". You can use this value in queries in .config files.

see RwiDiagram, RwiPackage

to Class java.lang.String

Contains a string with the name of the class (interface) extended by this class (interface). Only RwiNodes representing classes or interfaces have this property.

It it possible to get the unique name of the extended element using getSubproperties method and retrieving the {@link #REFERENCED_ELEMENT REFERENCED_ELEMENT} property. The unique name can be used to find an element in the model though the {@link RwiModel#findElement RwiModel.findElement} method.

For example, let us print the names and the fully qualified names of all classes (interfaces) extended by someRwiNode representing a class/interface:


   RwiPropertyEnumeration extended = someRwiNode.properties(RwiProperty.EXTENDS);
   while (extended.hasMoreElements()){
     RwiProperty nextExtended=extended.nextRwiProperty();
     System.out.println("Our class/interface extends a class/interface :"+nextExtended.getValue());
     RwiPropertyMap subpropertiesContainer = nextExtended.getSubproperties();
     RwiModel model = RwiModelAccess.getModel();
     RwiElement foundClassOrInterface = model.findElement(subpropertiesContainer.getProperty(RwiProperty.REFERENCED_ELEMENT));
     if (foundClassOrInterface != null) {
        System.out.println("  The fully qualified name of this class/interface is :"+foundClassOrInterface.getProperty(RwiProperty.FULL_NAME));
     }
   }

An element can have multiple instances of this property, they can be obtained using the {@link RwiPropertyMap#properties(String) RwiElement.properties(String propertyName)} method.

The value of this constant is "$extends". You can use this value in queries in .config files.

see RwiModel#findElement

to Class java.lang.String

Contains a string with the name of an interface implemented by this class. Only RwiNodes representing classes have this property.

It it possible to get the unique name of the implemented interface using getSubproperties method and retrieving the {@link #REFERENCED_ELEMENT REFERENCED_ELEMENT} property. The unique name can be used to find an element in the model though the {@link RwiModel#findElement RwiModel.findElement} method.

For example, let us print the names and the fully qualified names of all interfaces implemented by someClass:


   RwiPropertyEnumeration implemented=someClass.properties(RwiProperty.IMPLEMENTS);
   while (implemented.hasMoreElements()){
     RwiProperty nextImplemented=implemented.nextRwiProperty();
     System.out.println("Our class implements an interface :"+nextImplemented.getValue());
     RwiPropertyMap subpropertiesContainer = nextImplemented.getSubproperties();
     RwiModel model = RwiModelAccess.getModel();
     RwiElement foundInterface = model.findElement(subpropertiesContainer.getProperty(RwiProperty.REFERENCED_ELEMENT));
     if (foundInterface != null) {
        System.out.println("  The fully qualified name of this interface is :"+foundInterface.getProperty(RwiProperty.FULL_NAME));
     }
   }

An element can have multiple instances of this property, they can be obtained using the {@link RwiPropertyMap#properties(String) RwiElement.properties(String propertyName)} method.

The value of this constant is "$implements". You can use this value in queries in .config files.

see RwiModel#findElement

to Class java.lang.String

This property is contained in the RwiPropertyMap instance returned by getSubproperties method of the EXTENDS, IMPLEMENTS, and THROW properties.

It contains a string with the unqie name of the element whose name is contained in the EXTENDS, IMPLEMENTS, or THROW property. If it is not possible to obtain the element (for example, it is not in the CLASSPATH), then the value of this property is null.

See each property description (EXTENDS, IMPLEMENTS, THROW) for examples. This property is read-only.

see #EXTENDS, #IMPLEMENTS, #THROW

to Class java.lang.String

Contains a string with the value of the description of this element. (For classes, attributes and operations the description begins after the starting delimiter /** and continues until the tags section). Packages don't have this property.

An element can have only one instance of this property.

The value of this constant is "$doc". You can use this value in queries in .config files.

to Class java.lang.String

Contains a string with the unique name of this element. The unique name is a string which uniquely identifies an element within the model. {@link RwiModel#findElement RwiModel.findElement} method allows to find an element by its unique name.

An element can have only one instance of this property.

The value of this constant is "$uniqueName". You can use this value in queries in .config files.

see RwiElement#getUniqueName, RwiModel#findElement, #NAME, #FULL_NAME

to Class java.lang.String

Contains a string with the name of a file where the definition of this element is located. For RwiMembers representing functions in C++ language only.

An element can have only one instance of this property.

The value of this constant is "$definitionFile". You can use this value in queries in .config files.

to Class java.lang.String

Contains a string with the value of the position of the beginning of an element's defintion in a file. For RwiMembers representing functions in C++ language only. For example:

  if (someElement.getProperty(RwiProperty.DEFINITION_START_POSITION)!=null){
    System.out.println("The definition start position is :"+Integer.parseInt(someElement.getProperty(RwiProperty.DEFINITION_START_POSITION)));
  }
  

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$definitionStartPosition". You can use this value in queries in .config files.

to Class java.lang.String

Contains a string with the value of the position of the end of an element's defintion in a file. For RwiMembers representing functions in C++ language only. For example:

  if (someElement.getProperty(RwiProperty.DEFINITION_END_POSITION)!=null){
    System.out.println("The definition end position is :"+Integer.parseInt(someElement.getProperty(RwiProperty.DEFINITION_END_POSITION)));
  }
  

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$definitionEndPosition". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether a package is a directory. For packages only.

An element can have only one instance of this property.

The value of this constant is "$directoryPackage". You can use this value in queries in .config files.

see RwiPackage

to Class java.lang.String

Contains a string with the name of an exception which can be thrown by this element. Only RwiMembers representing operations have this property.

It it possible to get the unique name of the exception object using getSubproperties method and retrieving the {@link #REFERENCED_ELEMENT REFERENCED_ELEMENT} property.

For example, let us print the names and the fully qualified names of all exceptions which can be thrown by someOperation:


   RwiPropertyEnumeration exceptions=someOperation.properties(RwiProperty.THROW);
   while (exceptions.hasMoreElements()){
     RwiProperty nextException = exceptions.nextRwiProperty();
     System.out.println("Our operation can throw  :"+nextException.getValue());
     RwiPropertyMap subpropertiesContainer = nextException.getSubproperties();
     RwiModel model = RwiModelAccess.getModel();
     RwiElement foundClass = model.findElement(subpropertiesContainer.getProperty(RwiProperty.REFERENCED_ELEMENT));
     if (foundClass != null) {
        System.out.println("  The fully qualified name of this exception is :"+foundClass.getProperty(RwiProperty.FULL_NAME));
     }
   }

An element can have multiple instances of this property, they can be obtained using the {@link RwiPropertyMap#properties(String) RwiElement.properties(String propertyName)} method.

The value of this constant is "$throw". You can use this value in queries in .config files.

see RwiModel#findElement

to Class java.lang.String

For an association link, contains a string with the unique name of the attribute representing this link. An element is an association link when its SHAPE_TYPE property is RwiShapeType.ASSOCIATION.

For example, in case someRwiElement represents an association link you with to get the attribute representing that link:


 if (RwiShapeType.ASSOCIATION.equals(someRwiElement.getProperty(RwiProperty.SHAPE_TYPE))){
     String uniqueNameOfAttribute = someRwiElement.getProperty(RwiProperty.MEMBER);
     RwiModel model = RwiModelAccess.getModel();
     RwiElement foundMember = model.findElement(uniqueNameOfAttribute);
     if (foundMember != null) {
        System.out.println("  The name of the attribute is :"+foundMember.getProperty(RwiProperty.NAME));
     }
 }
 

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$linkMember". You can use this value in queries in .config files.

see RwiShapeType#ASSOCIATION, #LINK

to Class java.lang.String

For RwiMember representing an attribute, contains a string with the unique name of an association RwiLink represented by this attribute. If there is no association RwiLink represented by this attribute, this property contains null, and RwiMember's hasProperty(RwiProperty.LINK) method returns false.

For example, suppose someRwiMemberRepresentingAttribute represents an attribute. We wish to find out if this attribute represents an association link, and if it does, we want to get the destination of that link:


 if (someRwiMemberRepresentingAttibute.hasProperty(RwiProperty.LINK)) {
   String uniqueNameOfLink = someRwiMemberRepresentingAttibute.getProperty(RwiProperty.LINK);
   RwiModel model = RwiModelAccess.getModel();
   RwiElement foundElement = model.findElement(uniqueNameOfLink);
   if (foundElement instanceof RwiLink){
      RwiElement destination = ((RwiLink)foundElement).getDestination();
      //...  now you can analyze the destination
   }
 }
 

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$memberLink". You can use this value in queries in .config files.

see #MEMBER, RwiModel#findElement

to Class java.lang.String

Contains a string characterizing the visual representation of RwiDiagram (used to distinguish collaboration and sequence diagrams). For instance, collaboration and sequence diagrams are represented by the same RwiDiagram. The value of SHAPE_TYPE property for that diagram is {@link RwiShapeType#SEQUENCE_DIAGRAM RwiShapeType.SEQUENCE_DIAGRAM}.

When it is displayed as a collaboration diagram, it has the VIEW_TYPE property. If it is displayed as a sequence diagram, it does not have this property.

See an {@link RwiShapeType#SEQUENCE_DIAGRAM example} in RwiShapeType interface.

An element can have only one instance of this property.

The value of this constant is "$viewType". You can use this value in queries in .config files.

see #SHAPE_TYPE, RwiShapeType

to Class java.lang.String

Contains a string with the unique name of the element pointed to by a hyperlink from this element. For example:

   RwiPropertyEnumeration hLinks = someRwiElement.properties(RwiProperty.HYPERLINK);
   while (hLinks.hasMoreElements()){
     String uniqueNameOfReferencedElement = hLinks.nextRwiProperty().getValue();
     RwiModel model = RwiModelAccess.getModel();
     RwiElement foundElement = model.findElement(uniqueNameOfReferencedElement);
     if (foundElement != null) { //we might not find it. For example, if it is not in the classpath ;)
       System.out.println("Contains a hyperlink to :"+foundElement.getProperty(RwiProperty.NAME));
     }
   }

An element can have multiple instances of this property, they can be obtained using the {@link RwiPropertyMap#properties(String) RwiElement.properties(String propertyName)} method.

The value of this constant is "$hyperlink". You can use this value in queries in .config files.

see RwiModel#findElement

to Class java.lang.String

A boolean property indicating whether this element is read-only. For example:

 if (someElement.hasProperty(RwiProperty.READ_ONLY)) System.out.println("Element is read-only");
 

An element can have only one instance of this property.

The value of this constant is "$readOnly". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property indicating whether this element is an imported element. An imported element is an element contained in a package specified in the "Search/Classpath" tab in the project properties dialog (Advanced mode) or in any of its subpackages; a root package from that tab is an imported element itself.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$import". You can use this value in queries in .config files.

deprecated
see #MODEL_PART

to Class java.lang.String

A boolean property indicating whether this element is a component.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$component". You can use this value in queries in .config files.

deprecated
see #MODEL_PART

to Class java.lang.String

A boolean property indicating whether this element is part of the model. An element can be one of the following:

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$model". You can use this value in queries in .config files.

deprecated
see #MODEL_PART

to Class java.lang.String

to Class java.lang.String

Contains a string with a text of all parameters in the UML format separated by commas. For RwiMembers which are operations only. In the UML notation name of a parameter comes first, then colon, then its type. For example, for this operation:
 public void operation(String s, int i){}
 
this property will contain "s:String,i:int".

An element can have only one instance of this property.

The value of this constant is "$umlParametersText". You can use this value in queries in .config files.

see #PARAMETERS_TEXT, #PARAMETER

to Class java.lang.String

A boolean property for RwiLink whose SHAPE_TYPE property is RwiShapeType.ASSOCIATION indicating whether this association link is an aggregation link.

An element can have only one instance of this property.

The value of this constant is "$aggregation". You can use this value in queries in .config files.

see RwiShapeType#ASSOCIATION, #BY_VALUE

to Class java.lang.String

A boolean property for Rwilink indicating whether this link is a composition link. Only for RwiLinks having the {@link #AGGREGATION AGGREGATION} property.

An element can have only one instance of this property.

The value of this constant is "$byValue". You can use this value in queries in .config files.

see RwiShapeType#ASSOCIATION, #AGGREGATION

to Class java.lang.String

Contains a string with the full name of a directory containing elements of the RwiPackage. For RwiPackages only. Usually the package's data is located only in one directory, but it is possible to have several directories which keep the data for the same RwiPackage (for example, one directory keeps classes, another - diagrams etc.). For example, let us print the names of the directories keeping someRwiPackage's data:

   RwiPropertyEnumeration dirs=someOperation.properties(RwiProperty.DIRECTORIES);
   while (dirs.hasMoreElements()){
     System.out.println("Full name of a directory :"+dirs.nextRwiProperty().getValue());
   }

An element can have multiple instances of this property, they can be obtained using the {@link RwiPropertyMap#properties(String) RwiElement.properties(String propertyName)} method.

The value of this constant is "$directories". You can use this value in queries in .config files.

to Class java.lang.String

A boolean property which indicates whether an attribute's name starts with "lnk". Only RwiMembers representing attributes have this property.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$linkPrefix". You can use this value in queries in .config files.

to Class java.lang.String

Contians a string with the signature of an operation or an attribute. Only RwiMembers representing operations and attributes have this property.

For operations the string contains the name and the types of parameters. For example, for this operation:


 public int getSalary(String name, int year) {
   return 0;
 }
this property will contain "getSalary(String,int)".

For attributes the string will contain the name of an attribute. For example, for this attribute:


 int myAttr;
this property will contain "myAttr".

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$memberSignature". You can use this value in queries in .config files.

see #PARAMETER

to Class java.lang.String

Contains a string with the qualified name of a class (interface) this attribute or operation is associated. Only RwiMembers representing operations or attributes have this property.

An element can have only one instance of this property.

The value of this constant is "$associates". You can use this value in queries in .config files.

to Class java.lang.String

to Class java.lang.String

A boolean property which indicates whether this element is an template. Only for RwiNodes whose SHAPE_TYPE property is RwiShapeType.CLASS.

See RwiShapeType interface for an {@link RwiShapeType#CLASS example}.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$template". You can use this value in queries in .config files.

see #SHAPE_TYPE, RwiShapeType#CLASS

to Class java.lang.String

Contains a string with the text of parameters of the template class.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$templateParamText". You can use this value in queries in .config files.

see #TEMPLATE

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

A boolean property which indicates whether this element is an valuetype. Only for RwiNodes whose SHAPE_TYPE property is RwiShapeType.CLASS.

See RwiShapeType interface for an {@link RwiShapeType#CLASS example}.

This property is read-only.
An element can have only one instance of this property.

The value of this constant is "$valuetype". You can use this value in queries in .config files.

see #SHAPE_TYPE, RwiShapeType#CLASS