See: Description
| Interface | Description |
|---|---|
| IlrDerivedValueDescriptor |
This interface lets you retrieve a referenced value descriptor from the derived value descriptor.
|
| IlrIFiedValueDescriptor |
This interface is used to tag Value Descriptor which are build from the concept verbalization
and a primitive type, like IlrStringifiedValueDescriptor or IlrNumberifiedValueDescriptor
|
| IlrValueDescriptor |
IlrValueDescriptor represents a value descriptor that describes a
lexical value. |
| IlrValueDescriptorConstants |
All the predefined value descriptors.
|
| Class | Description |
|---|---|
| IlrAbstractValueDescriptor |
IlrAbstractValueDescriptor provides part of the implementation of the
IlrValueDescriptor interface. |
| IlrCharacterValueDescriptor |
This class implements a value descriptor for character lexical values.
|
| IlrDateValueDescriptor |
This abstract class provides a part of the
IlrValueDescriptor interface for a date lexical value. |
| IlrDecoratedValueDescriptor |
Provides a mechanism for decorating an existing value descriptor with a prefix and/or a suffix.
|
| IlrFullDateValueDescriptor |
A full date value descriptor (date and time).
|
| IlrLocalTimeValueDescriptor |
Provides a value descriptor for local time.
|
| IlrNumberifiedValueDescriptor |
Allows you to interpret a
Number as another value. |
| IlrNumberValueDescriptor |
Provides a number value descriptor (integer and floating point).
|
| IlrShortDateValueDescriptor |
A short date value descriptor (only date).
|
| IlrStringifiedValueDescriptor |
Allows you to interpret a literal
String as another value. |
| IlrStringValueDescriptor |
Provide a value descriptor for lexical strings.
|
| IlrTimeValueDescriptor |
Provides a time value descriptor.
|
| IlrUniversalDateValueDescriptor |
Provides a universal date value descriptor (with time zone information).
|
| IlrUniversalTimeValueDescriptor |
Provides a universal time value descriptor (with time zone information).
|
| IlrValueDescriptorFactory |
Allows you to retrieve a value descriptor according to a unique key representing it.
|
| IlrValueDescriptorHelper |
Provides helpers for value descriptors.
|
A value descriptor enables you to describe a value so that all values of this type are displayed and edited in the same way. You declare a value descriptor if you want to apply value management to a BOM class. You can create a completely new value descriptor, or create one by reusing a predefined value descriptor.
A value descriptor enables you to:The value descriptors in this package are associated to concepts and provide the API to manipulate literal values of the type. For instance, a value descriptor provides a parsable representation of the value to be used by a BRL parser to parse literal values.
You can use the following predefined value descriptors:
The most common way to reuse a predefined value descriptor is to use a decorated value descriptor. For example, if you want to use the number value descriptor to describe a percentage, you 'decorate' it by adding % as a suffix in the label of the number value descriptor.
When you have created a value descriptor, you should then integrate it into Rule Designer,
Rule Team Server or Rule Solutions for Office, as appropriate. For more information,
see
The following code example shows a custom value descriptor:
Customizing JRules > Customizing Rule Authoring > Tasks > Managing BOM
value types > Implementing a value descriptor > Integrating a value descriptor.
Code Example
class ValueColorDescriptor extends IlrAbstractValueDescriptor {
public ValueColorDescriptor(Concept concept) { super(concept); }
{
// Checks the value (but here no check is needed)
public boolean checkValue(IlrSyntaxTree.Node node, Object value) {
return true;
}
// Converts the persistent text form of the value to an instance of Color
public Object getValue(String persistentText) {
return Color.decode(persistentText);
}
// Converts the instance of Color into a persistent text form
public String getPersistentText(Object value) {
return '#' + Integer.toHexString(((Color) value).getRGB());
}
//Converts the localized text form of the value into an instance of Color
public Object getValue(String text, IlrBRLDefinition definition) {
return Color.decode(text);
// Here the text form is not locale dependent
}
// Converts the instance of Color into a localized text form
public String getLocalizedText(Object value,
IlrBRLDefinition definition) {
return '#' + Integer.toHexString(((Color) value).getRGB());
// Here the text form is still not locale dependent
}
// Returns the default value in a localized text form
public String getDefaultValue(IlrBRLDefinition definition) {
return "#000000";
// By default, returns the value black
}
}
© Copyright IBM Corp. 1987, 2017