public class IlrBRL extends IlrBRLSemanticContextExtension
It contains a set of language mechanisms common to all business rule languages.
A sub-class of this class must be implemented and referenced by the semanticContextExtension
BRL properties from the language property file when you build a custom BRL language.
| Modifier and Type | Class and Description |
|---|---|
static class |
IlrBRL.CheckValue
An implementation of a semantic action that checks if a node is a value.
|
static class |
IlrBRL.DeclareVariable
This semantic action is an abstract action to declare a variable to the semantic context.
|
static class |
IlrBRL.ValueFilter
An implementation of a semantic filter that accepts only values.
|
IlrPropertyManager.Property| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SENTENCE_TYPE
The sentence node type.
|
static java.lang.String |
VALUE_TYPE
The value node type.
|
static java.lang.String |
VARIABLE_TYPE
The variable node type.
|
| Modifier | Constructor and Description |
|---|---|
protected |
IlrBRL(IlrBRLSemanticContext semanticContext)
Constructs of a business rule language semantic context extension, invoked by the concrete language semantic context
extension class.
|
| Modifier and Type | Method and Description |
|---|---|
static IlrCardinality |
getBindingCardinality(IlrSyntaxTree.Node binding,
IlrVocabulary vocabulary)
This method returns the variable cardinality attached to the given syntax node representing a binding node.
|
static IlrConceptInstance |
getSyntaxNodeConceptInstance(IlrSyntaxTree.Node node,
IlrVocabulary vocabulary)
Returns the value attached to the given node.
|
static IlrSyntaxTree.Node |
getSyntaxNodeHolder(IlrSyntaxTree.Node sentenceNode,
IlrVocabulary vocabulary)
Returns the node corresponding to the holder role of a sentence in the given Abstract Syntax Tree.
|
static IlrSentence |
getSyntaxNodeSentence(IlrSyntaxTree.Node sentenceNode,
IlrVocabulary vocabulary)
Returns the sentence attached to the given node.
|
static java.lang.String |
getSyntaxNodeValueText(IlrSyntaxTree.Node node)
Returns the text of the value attached to the given node.
|
static java.lang.String |
getSyntaxNodeVariableName(IlrSyntaxTree.Node node)
Returns the name of the variable attached to the given node.
|
static java.lang.String |
getVariableName(IlrSyntaxTree.Node variable)
This method returns the variable name attached to the given syntax node representing a variable reference.
|
boolean |
isExternal(IlrBRLVariable variable)
Checks whether a variable is considered as an external variable.
|
declareGlobalVariables, getSemanticContext, getSyntaxNodeTypeInfo, getSyntaxNodeTypeInfo, getSyntaxNodeTypeInfo, getVocabularyElementPropertygetProperty, getProperty, hasProperty, hasProperty, properties, removeAllProperties, removeProperty, removeProperty, setProperty, setPropertypublic static final java.lang.String VARIABLE_TYPE
public static final java.lang.String VALUE_TYPE
public static final java.lang.String SENTENCE_TYPE
protected IlrBRL(IlrBRLSemanticContext semanticContext)
semanticContext - The semantic context.public static IlrSentence getSyntaxNodeSentence(IlrSyntaxTree.Node sentenceNode, IlrVocabulary vocabulary)
sentenceNode - The node.public static IlrSyntaxTree.Node getSyntaxNodeHolder(IlrSyntaxTree.Node sentenceNode, IlrVocabulary vocabulary)
sentenceNode - The Abstract Syntax Tree node representing the whole sentence.vocabulary - The vocabulary.public static java.lang.String getSyntaxNodeVariableName(IlrSyntaxTree.Node node)
node - The node.public static java.lang.String getSyntaxNodeValueText(IlrSyntaxTree.Node node)
node - The node.public static IlrConceptInstance getSyntaxNodeConceptInstance(IlrSyntaxTree.Node node, IlrVocabulary vocabulary)
node - The node.vocabulary - The vocabulary.public static java.lang.String getVariableName(IlrSyntaxTree.Node variable)
variable - A syntax node representing a variable reference.public static IlrCardinality getBindingCardinality(IlrSyntaxTree.Node binding, IlrVocabulary vocabulary)
binding - A syntax node representing a binding.public boolean isExternal(IlrBRLVariable variable)
An external variable is a ruleset parameter ruleset variable or an automatic variable.
variable - The variable to checktrue if the variable is considered as an external variable, and false otherwise.IlrBRLVariable© Copyright IBM Corp. 1987, 2017