ilog.rules.studio.model.dt

Class IlrDTService

  • java.lang.Object
    • org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      • org.eclipse.emf.ecore.impl.BasicEObjectImpl
        • org.eclipse.emf.ecore.impl.EObjectImpl
          • ilog.rules.studio.model.base.impl.IlrRuleProjectServiceImpl
            • ilog.rules.studio.model.dt.IlrDTService
  • All Implemented Interfaces:
    IlrDTEnvironment, IlrRuleProjectService, java.io.Serializable, org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject


    public class IlrDTService
    extends ilog.rules.studio.model.base.impl.IlrRuleProjectServiceImpl
    implements IlrDTEnvironment
    A Rule Project service dedicated to the management of DT Rule in Rule Designer.

    It implements IlrDTEnvironment and provides the integration environment for DT Rule. This class provides a vocabulary and links the DT Rules to Rule Designer. This class also provides helper API to manipulate Decision Table and Decision Tree artifacts in the context of Rule Designer.

    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl

        org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImpl
      • Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl

        org.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
      • Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject

        org.eclipse.emf.ecore.InternalEObject.EStore
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String SERVICE_ID
      Identification of the DT Service Rule Project service.
      • Fields inherited from class ilog.rules.studio.model.base.impl.IlrRuleProjectServiceImpl

        SERVICE_ID_EDEFAULT, serviceID
      • Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl

        eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY
      • Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl

        EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET
      • Fields inherited from interface org.eclipse.emf.ecore.InternalEObject

        EOPPOSITE_FEATURE_BASE
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void commitDTController(IlrDTController dtController)
      Commits changes in the DT model of the DT controller to its corresponding rule.
      static IlrDTRule convertToLocale(IlrDTRule rule, IlrDTRule target)
      This method converts the definition of the given DT rule from its original locale to the specified target locale.
      static java.lang.String getDecisionTableHTMLDefinition(IlrDecisionTable dt)
      This method computes the HTML definition of the given Decision Table.
      IlrDTController getOrCreateDTController(IlrDTRule dtRule, boolean storeInCache)
      Retrieves the DT Controller from the cache for the corresponding DT Rule.
      IlrBRLParser getParser(IlrDTRuleElement dt)
      Returns a BRL parser on the BAL grammar for a given DT element.
      IlrBRLVariableProvider getVariableProvider()
      This method returns the variable provider associated to this service.
      IlrVocabulary getVocabulary(java.util.Locale locale)
      Returns the vocabulary associated to the rule project.
      • Methods inherited from class ilog.rules.studio.model.base.impl.IlrRuleProjectServiceImpl

        basicSetRuleProject, dispose, eBasicRemoveFromContainerFeature, eGet, eInverseAdd, eInverseRemove, eIsSet, eSet, eStaticClass, eUnset, getRuleProject, getServiceID, initialize, setRuleProject, setServiceID, toString
      • Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl

        eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI
      • Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl

        eAddVirtualValue, 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, eVirtualValues
      • Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl

        eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.emf.ecore.EObject

        eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
      • Methods inherited from interface org.eclipse.emf.common.notify.Notifier

        eAdapters, eDeliver, eNotify, eSetDeliver
      • Methods inherited from interface org.eclipse.emf.ecore.InternalEObject

        eNotificationRequired
    • Field Detail

      • SERVICE_ID

        public static java.lang.String SERVICE_ID
        Identification of the DT Service Rule Project service.
    • Method Detail

      • getVocabulary

        public IlrVocabulary getVocabulary(java.util.Locale locale)
        Returns the vocabulary associated to the rule project.
        Specified by:
        getVocabulary in interface IlrDTEnvironment
        Parameters:
        locale - The locale associated with the vocabulary.
        Returns:
        The vocabulary associated with locale.
      • getOrCreateDTController

        public IlrDTController getOrCreateDTController(IlrDTRule dtRule,
                                              boolean storeInCache)
        Retrieves the DT Controller from the cache for the corresponding DT Rule.

        If it is not in the cache, the DT Controller is created and returned.

        Parameters:
        dtRule - The DT Rule.
        storeInCache - Specifies whether the DT Controller that may be built by calling this method should be stored in the cache associated with this DT Service.
        Returns:
        A corresponding DT Controller.
      • commitDTController

        public void commitDTController(IlrDTController dtController)
        Commits changes in the DT model of the DT controller to its corresponding rule.

        This method is useful when DT Model updates are done out of the Rule Designer editor.

        Parameters:
        dtController - The DT controller to be committed.
      • getDecisionTableHTMLDefinition

        public static java.lang.String getDecisionTableHTMLDefinition(IlrDecisionTable dt)
        This method computes the HTML definition of the given Decision Table. To generate the image of a Decision Tree you should use the API: IlrDTTreeUIHelper.computeImageBytes(IlrDTController controller).
        Parameters:
        dt - the decision table for which the HTML definition is requested
        Returns:
        an HTML representation of the table or null if the decision table rule project is not loaded.
      • convertToLocale

        public static IlrDTRule convertToLocale(IlrDTRule rule,
                                IlrDTRule target)
                                         throws java.lang.RuntimeException
        This method converts the definition of the given DT rule from its original locale to the specified target locale. Note that the translation to the target locale is not guaranteed if the vocabulary of the target locale does not contains all required terms and phrases or if the given DT has Syntax Errors. In this last case, the translated DT could not be the exact translation of the original one. In both case a Runtime Exception could be raised by this method. Note that the resulting translation could be ambiguous while interpreted in the context of the target vocabulary. The original DT definition is copied to the given target after having been translated to the target locale. Note that the target element is NOT saved by this method.
        Since:
        6.6
        Throws:
        java.lang.RuntimeException - if an error occurs when converting the DT rule.
        Parameters:
        rule - the DT Rule for which a translation is requested
        target - the target DT to which the new definition is set
        Returns:
        the target associated to a new definition which is a translation of the source one to the target locale or null if the vocabulary of the target locale has not been found or for any other erroneous cases.
      • getParser

        public IlrBRLParser getParser(IlrDTRuleElement dt)
        Description copied from interface: IlrDTEnvironment
        Returns a BRL parser on the BAL grammar for a given DT element. The returned parser is supposed to be based on the vocabulary returned by this environment and the locale of dt.
        Specified by:
        getParser in interface IlrDTEnvironment
        Parameters:
        dt - The DT element the returned parser will be used for.
        Returns:
        The BAL parser for the given DT element.

© Copyright IBM Corp. 1987, 2017