public class IlrBRLService extends ilog.rules.studio.model.base.impl.IlrRuleProjectServiceImpl implements IlrBRLParser
IlrStudioBRLPlugin.getDefault().getBRLService(project).org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImplorg.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SERVICE_ID
Identification of the BRL Service Rule Project service.
|
SERVICE_ID_EDEFAULT, serviceIDeAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
convertToLocale(IlrBRLRule rule,
java.util.Locale targetLocale)
This method converts the definition of the given BRL rule from its original locale to the specified target locale.
|
static java.lang.String |
getHTMLDefinition(IlrBRLRule brlRule)
This method return an HTML representation of the given BRLRule.
|
static java.util.Collection<java.lang.String> |
getUsedVocabularyElements(IlrModelElement elt,
IlrRuleProject ruleProject)
Returns the list of
IlrVocabularyElement
that are used by the given model element. |
IlrBRLVariableProvider |
getVariableProvider()
This method returns the variable provider associated to this service.
|
boolean |
hasParser(java.lang.String definitionName,
java.util.Locale locale) |
static boolean |
hasSyntacticErrors(java.util.Collection errs)
this method returns true if the collection contains syntactic or lexical errors
|
IlrSyntaxTree |
parse(IlrBRLParserInput input,
IlrBRLParserConfigurationDef configuration,
IlrBRLPredictionConfigurationDef predictionConfiguration)
Retrieves a parsed representation of the input as a syntax tree.
|
static IlrSyntaxTree |
parse(IlrBRLRule rule,
java.util.Collection errors)
This method parses a specified BRL Rule and returns the corresponding syntax tree.
|
static IlrSyntaxTree |
parse(org.eclipse.core.resources.IProject project,
java.lang.String text,
java.lang.String language,
java.util.Locale locale,
java.util.Collection errors)
This method parses a specified rule text written in a specified language and Locale.
|
basicSetRuleProject, dispose, eBasicRemoveFromContainerFeature, eGet, eInverseAdd, eInverseRemove, eIsSet, eSet, eStaticClass, eUnset, getRuleProject, getServiceID, initialize, setRuleProject, setServiceID, toStringeAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURIeAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseRemove, eInvocationDelegate, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStaticOperationCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValueseBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotifyclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetVocabularyeAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnsetpublic static java.lang.String SERVICE_ID
public IlrBRLVariableProvider getVariableProvider()
public boolean hasParser(java.lang.String definitionName,
java.util.Locale locale)
public static IlrSyntaxTree parse(org.eclipse.core.resources.IProject project, java.lang.String text, java.lang.String language, java.util.Locale locale, java.util.Collection errors)
project - The project in the context of which this rule is parsed. The project determines the vocabulary and the variable provider used.text - The text of the rule to parse.language - The language definition.locale - The Locale.errors - If provided, this collection is filled with parsing errors. Parsing errors are an instance of IlrBRLMarker.public static IlrSyntaxTree parse(IlrBRLRule rule, java.util.Collection errors)
rule - The BRL rule to parse.errors - A collection to collect parsing errors. If null, parsing errors are not collected.public IlrSyntaxTree parse(IlrBRLParserInput input, IlrBRLParserConfigurationDef configuration, IlrBRLPredictionConfigurationDef predictionConfiguration)
IlrBRLParser
The input is parsed using the BRL parser configuration and the
prediction configuration passed as parameters.
parse in interface IlrBRLParserinput - The input to parse.configuration - The parser configuration used to parse the input.predictionConfiguration - The parser prediction configuration used by this method to
compute predictions. This parameter can be set to
null.IlrSyntaxTree,
IlrBRLParserInput,
IlrBRLParserConfigurationDef,
IlrBRLPredictionConfigurationDefpublic static java.util.Collection<java.lang.String> getUsedVocabularyElements(IlrModelElement elt, IlrRuleProject ruleProject)
IlrVocabularyElement
that are used by the given model element.elt - the model elementruleProject - the project to searchpublic static java.lang.String getHTMLDefinition(IlrBRLRule brlRule)
brlRule - the rule for which we request an HTML representationpublic static boolean hasSyntacticErrors(java.util.Collection errs)
errs - a collection of BRLProblempublic static java.lang.String convertToLocale(IlrBRLRule rule, java.util.Locale targetLocale) throws java.lang.RuntimeException
java.lang.RuntimeException - if an error occurs reading the rule language for the target locale or when converting the rule.rule - the BRLRule for which a translation is requestedtargetLocale - the target locale© Copyright IBM Corp. 1987, 2017