Codota Logo
Annotation.getQueryContextEndIndex
Code IndexAdd Codota to your IDE (free)

How to use
getQueryContextEndIndex
method
in
org.wso2.siddhi.query.api.annotation.Annotation

Best Java code snippets using org.wso2.siddhi.query.api.annotation.Annotation.getQueryContextEndIndex (Showing top 5 results out of 315)

  • Common ways to obtain Annotation
private void myMethod () {
Annotation a =
  • Codota IconString annotationName;TableDefinition tableDefinition;AnnotationHelper.getAnnotation(annotationName, tableDefinition.getAnnotations())
  • Smart code suggestions by Codota
}
origin: wso2/siddhi

public static Annotation getAnnotation(String annotationName, List<Annotation> annotationList) {
  Annotation annotation = null;
  for (Annotation aAnnotation : annotationList) {
    if (annotationName.equalsIgnoreCase(aAnnotation.getName())) {
      if (annotation == null) {
        annotation = aAnnotation;
      } else {
        throw new DuplicateAnnotationException("Annotation @" + annotationName + " is defined twice",
            aAnnotation.getQueryContextStartIndex(), aAnnotation.getQueryContextEndIndex());
      }
    }
  }
  return annotation;
}
origin: org.wso2.siddhi/siddhi-query-api

public static Annotation getAnnotation(String annotationName, List<Annotation> annotationList) {
  Annotation annotation = null;
  for (Annotation aAnnotation : annotationList) {
    if (annotationName.equalsIgnoreCase(aAnnotation.getName())) {
      if (annotation == null) {
        annotation = aAnnotation;
      } else {
        throw new DuplicateAnnotationException("Annotation @" + annotationName + " is defined twice",
            aAnnotation.getQueryContextStartIndex(), aAnnotation.getQueryContextEndIndex());
      }
    }
  }
  return annotation;
}
origin: org.wso2.carbon.analytics/org.wso2.carbon.sp.jobmanager.core

/**
 * If the Stream definition string contains {@link SiddhiTopologyCreatorConstants#SINK_IDENTIFIER} or
 * {@link SiddhiTopologyCreatorConstants#SOURCE_IDENTIFIER} ,meta info related to Sink/Source configuration is
 * removed.
 *
 * @return Stream definition String after removing Sink/Source configuration
 */
private String removeMetaInfoStream(String streamId, String streamDefinition, String identifier) {
  int[] queryContextStartIndex;
  int[] queryContextEndIndex;
  for (Annotation annotation : siddhiApp.getStreamDefinitionMap().get(streamId).getAnnotations()) {
    if (annotation.getName().toLowerCase().equals(identifier.replace("@", ""))) {
      queryContextStartIndex = annotation.getQueryContextStartIndex();
      queryContextEndIndex = annotation.getQueryContextEndIndex();
      streamDefinition = streamDefinition.replace(
          ExceptionUtil.getContext(queryContextStartIndex, queryContextEndIndex,
              siddhiTopologyDataHolder.getUserDefinedSiddhiApp()), "");
    }
  }
  return streamDefinition;
}
origin: org.wso2.carbon.analytics/org.wso2.carbon.sp.jobmanager.core

/**
 * If {@link Query,Partition} string contains {@link SiddhiTopologyCreatorConstants#DISTRIBUTED_IDENTIFIER},
 * meta info related to distributed deployment is removed.
 */
private String removeMetaInfoQuery(ExecutionElement executionElement, String queryElement) {
  int[] queryContextStartIndex;
  int[] queryContextEndIndex;
  for (Annotation annotation : executionElement.getAnnotations()) {
    if (annotation.getName().toLowerCase()
        .equals(SiddhiTopologyCreatorConstants.DISTRIBUTED_IDENTIFIER)) {
      queryContextStartIndex = annotation.getQueryContextStartIndex();
      queryContextEndIndex = annotation.getQueryContextEndIndex();
      queryElement = queryElement.replace(
          ExceptionUtil.getContext(queryContextStartIndex, queryContextEndIndex,
              siddhiTopologyDataHolder.getUserDefinedSiddhiApp()), "");
      break;
    }
  }
  return queryElement;
}
origin: org.wso2.carbon.analytics/org.wso2.carbon.sp.jobmanager.core

/**
 * Removes the @dist annotation from given aggregation definition.
 * @param aggregationDefinition Aggregation definition of which meta info to be removed.
 * @return String definition after the removal of @dist annotation.
 */
//This method is not necessary for the current design of aggregation distribution. But this left here considering
// the future works on adding parallel annotation to aggregations.
private String removeMetaInfoAggregation(AggregationDefinition aggregationDefinition) {
  int[] queryContextStartIndex;
  int[] queryContextEndIndex;
  String aggregationDef = ExceptionUtil.getContext(aggregationDefinition.getQueryContextStartIndex(),
      aggregationDefinition.getQueryContextEndIndex(), siddhiTopologyDataHolder.getUserDefinedSiddhiApp());
  for (Annotation annotation : aggregationDefinition.getAnnotations()) {
    if (annotation.getName().toLowerCase()
        .equals(SiddhiTopologyCreatorConstants.DISTRIBUTED_IDENTIFIER)) {
      queryContextStartIndex = annotation.getQueryContextStartIndex();
      queryContextEndIndex = annotation.getQueryContextEndIndex();
      aggregationDef = aggregationDef.replace(ExceptionUtil.getContext(queryContextStartIndex,
          queryContextEndIndex, siddhiTopologyDataHolder.getUserDefinedSiddhiApp()), "");
      break;
    }
  }
  return aggregationDef;
}
org.wso2.siddhi.query.api.annotationAnnotationgetQueryContextEndIndex

Popular methods of Annotation

  • getElements
  • getElement
  • getName
  • getAnnotations
  • <init>
  • annotation
  • element
  • getQueryContextStartIndex
  • toString

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Join (org.hibernate.mapping)
  • Runner (org.openjdk.jmh.runner)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now