IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.transform.core
Interface ITransformationProperty

All Superinterfaces:
ITransformationItem

public interface ITransformationProperty
extends ITransformationItem

A Transformation Property stores information about one aspect of the transformation. The descriptor properties are defined in XML when the transformation is declared. In addition to the predefined properties of a transformation descriptor, the transformation author can define specific properties, some of which may be customized by the user.

A transformation property must have an unique identifier and a localized name. Additional attributes of a property include a metatype, associated metatype data and a read-only indicator. Most properties contain a single value but some may contain multiple values. For example, a keywords property value may be defined with a comma separated list of words. The underlying property implementation is capable of parsing the value (given the delimiters) to produce a list of values (e.g., the individual keywords).


Method Summary
 int getMaxValues()
          Return the maximum number of values for the property.
 String getMetatype()
          Return the underlying metatype for the property value.
 String getMetatypeData()
          Return the data associated with the underlying metatype for the property value.
 Object getValue()
          Return the value of the property.
 boolean isReadOnly()
          Return the read-only attribute of the property
 
Methods inherited from interface com.ibm.xtools.transform.core.ITransformationItem
getDescription, getId, getName
 

Method Detail

getMaxValues

public int getMaxValues()
Return the maximum number of values for the property. If the number of values is unbounded, the value Integer.MAX_VALUE is returned. When the maximum number of values that the property can store is greater than one, the object actually returned from getValue() will be a List object containing the real values.

Returns:
int - the maximum number of values for the property

getMetatype

public String getMetatype()
Return the underlying metatype for the property value. This metatype is not interpreted by the property but must be interpreted by the caller. It simply indicates the type of value required for the property (no enforcement)

Returns:
String - the desired type of the property

getMetatypeData

public String getMetatypeData()
Return the data associated with the underlying metatype for the property value. This data can be used to provide additional constraint information about the metatype. It is defined simply as a string and is not interpreted by the property. The client that uses this property (e.g., the apply transformation UI) must interpret interpret the string in conjunction with the metatype.

Returns:
String - the data associated with the specified property type

getValue

public Object getValue()
Return the value of the property. If the maximum number of values for the property is 1 (a single value), then this method returns that value. If the value is not defined, null is returned.

If the property can contain multiple values, the returned object is a list (java.util.List) of those values. If no values have been defined, the returned list object is empty.

Returns:
Object - the property value or a list (java.util.List) of values

isReadOnly

public boolean isReadOnly()
Return the read-only attribute of the property

Returns:
boolean - the read/write state of the property

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.