See: Description
| Interface | Description |
|---|---|
| IlrBaseElement |
This interface is the base type for all elements in a vocabulary.
|
| IlrBusinessArtifact |
This interface defines vocabulary artifacts.
|
| IlrCategory |
Interface for categories.
|
| IlrConcept |
This interface defines concepts in a vocabulary.
|
| IlrConceptInstance |
This interface defines concept instances in a vocabulary.
|
| IlrFactType |
This interface defines the fact types of a vocabulary.
|
| IlrGlossary |
This interface defines glossaries.
|
| IlrListener |
This interface defines vocabulary notification listeners.
|
| IlrLocalizedVocabularyProvider |
This interface specifies the contract of a Vocabulary Provider able to provide a vocabulary for a specific locale.
|
| IlrMutableVerbalizable |
Interface for mutable verbalizable elements.
|
| IlrNotifier |
This interface defines vocabulary elements that may send notifications.
|
| IlrRole |
This interface defines the role of a fact type.
|
| IlrSentence |
This interface defines a sentence in the vocabulary.
|
| IlrSyntacticRole |
This interface defines the syntactic role of a phrase.
|
| IlrTerm |
This interface defines terms in a glossary.
|
| IlrVerbalizable |
This interface defines verbalizable elements of the vocabulary.
|
| IlrVocabulary |
IlrVocabulary defines a vocabulary. |
| IlrVocabularyElement |
This interface defines elements that are contained in a instance of
IlrVocabulary. |
| IlrVocabularyManager |
IlrVocabularyManager represents a vocabulary manager. |
| IlrVocabularyManager.ChangeListener |
The listener interface for receiving events when a vocabulary has been modified.
|
| IlrVocabularySet |
The interface for vocabulary set, also known as composite vocabulary.
|
| IlrVocabularyVisitor |
Interface for vocabulary visitors.
|
| Class | Description |
|---|---|
| IlrAbstractVocabularyManager |
This class is an abstract implementation of a Vocabulary Manager with default
implementation for listener management
|
| IlrCardinality |
Type safe enumeration for role cardinalities.
|
| IlrGender |
Type safe enumeration for genders.
|
| IlrModelFeatures |
Contains all the constants used for event notifications.
|
| IlrSentenceCategory |
Type safe enum for sentence categories.
|
| IlrSyntacticRoleCategory |
Type safe enumeration for syntactic role categories.
|
| IlrVocabularyController |
A connector between a vocabulary and all its
companion classes such as: Query Manager, Checker, Mapping Manager, Serializers,
and so on.
|
| IlrVocabularyManager.ChangeEvent |
Represents the event to notify when a vocabulary changes.
|
When a user creates a BOM entry using Rule Studio, the default
setting is to verbalize the elements imported from the Execution Object
Model (EOM) to create a vocabulary. A vocabulary is composed of the set
of business terms, phrases, and constants used to verbalize an EOM. In
the API, the vocabulary for a project is stored in an IlrVocabulary
instance. This object contains all the terms, phrases and constance that
make up the vocabulary. Concepts are retrieved by calling IlrVocabulary.getConcepts().
Phrases inside a vocabulary are stored in IlrSentence
instances which are themselves stored inside IlrFactType
objects .
Whether a vocabulary element is a business term, a phrase, or a
constant depends on the nature of its corresponding business element.
The following table shows the series of concepts, phrases and constants
that makes up a vocabulary.
| Name |
Description |
Example |
Class |
| Business Term |
A Business Term is the label of a vocabulary concept. This
label is the natural language (and local dependant) word designating
a concept. That is, it is the verbalization of a class or nested
class in the Business Object Model. |
customer |
IlrConcept |
| Navigation Phrase |
A navigation phrase is a phrase that associates two
business elements. It can be the verbalization of either:
|
{last name} of {this} | IlrSentencetype: IlrSentenceCategory |
| Predicate Phrase |
A predicate phrase is a specific type of navigation phrase
that verbalizes a nonvoid method that returns a boolean or
java.lang.Boolean. A predicate phrase has an implicit subject. |
{this} is loyalty program member | IlrSentencetype: IlrSentenceCategory.PREDICATE |
| Action Phrase |
An action phrase applies an action to an object. It
can be the verbalization of either:
|
in {this}, display the message {0} |
IlrSentencetype: IlrSentenceCategory.ACTION |
| Constant |
A constant is the verbalization of the public static final
attribute of a class with same type as this class. |
Minivan is a constant for the public static final attribute
CarGroup.Minivan |
IlrConceptInstance |
Note: Only business rule artifacts use the vocabulary,
technical rule artifacts do not.
The following code example shows how to use a IlrBOMVocabularyFactory
instance class to create a vocabulary from a BOM.
Locale vocabularyLocale = new Locale("en", "US");
IlrVocabularyGeneratorConfiguration config = new
IlrVocabularyGeneratorConfiguration(IlrVerbalizationGenerator.BUSINESS);
config.useLegacyAlternates(false);
// Generate minimal vocabulary, only classes and members used by space coverage
config.setModelFilter(new IlrGapReportModelFilter(report));
IlrVocabulary boot = IlrBOMVocabularyHelper.getBootVocabulary(vocabularyLocale);
IlrBOMVocabulary vocTmp = IlrBOMVocabularyHelper.loadBOMVocabulary(vocabularyLocale, "alltypes", this.getClass().getClassLoader(), "UTF-8");
IlrBOMVocabulary voc = IlrBOMVocabularyFactory.createBOMVocabularySet(
vocabularyLocale,
new IlrBOMVocabulary[] {
(IlrBOMVocabulary) boot,
(IlrBOMVocabulary) vocTmp
},
false);
// Return the verbalization provider
Map rulesetParametersEnglishVerbalization = new HashMap();
rulesetParametersEnglishVerbalization.put("loan", "the loan");
rulesetParametersEnglishVerbalization.put("borrower", "the borrower");
return new IlrDefaultRulesetVerbalizationProvider(voc, rulesetParametersEnglishVerbalization);
One of the most common uses of this API is to create a custom verbalizer. For more
information, see
ilog.rules.vocabulary.verbalization packages.
@since JRules 6.0
© Copyright IBM Corp. 1987, 2017