예제 #1
0
 public static Indicator createUserDefIndicator(IndicatorDefinition indicatorDefinition) {
   UserDefIndicator userDefIndicator = IndicatorSqlFactory.eINSTANCE.createUserDefIndicator();
   IndicatorParameters indicParams = IndicatorsFactory.eINSTANCE.createIndicatorParameters();
   userDefIndicator.setParameters(indicParams);
   userDefIndicator.setName(indicatorDefinition.getName());
   return userDefIndicator;
 }
예제 #2
0
 /**
  * DOC xqliu Comment method "createUserDefIndicator".
  *
  * @param indicatorDefinition
  * @param pattern
  * @return
  */
 public static Indicator createUserDefIndicator(
     IndicatorDefinition indicatorDefinition, Pattern pattern) {
   UserDefIndicator indicator = IndicatorSqlFactory.eINSTANCE.createUserDefIndicator();
   IndicatorParameters indicParams = IndicatorsFactory.eINSTANCE.createIndicatorParameters();
   Domain validData = DomainFactory.eINSTANCE.createDomain();
   validData.getPatterns().add(pattern);
   indicParams.setDataValidDomain(validData);
   indicator.setParameters(indicParams);
   indicator.setName(UDIHelper.getMatchingIndicatorName(indicatorDefinition, pattern));
   return indicator;
 }