Tabnine Logo
OutputAttribute
Code IndexAdd Tabnine to your IDE (free)

How to use
OutputAttribute
in
org.wso2.siddhi.query.api.execution.query.selection

Best Java code snippets using org.wso2.siddhi.query.api.execution.query.selection.OutputAttribute (Showing top 11 results out of 315)

origin: wso2/siddhi

private void checkSelection(OutputAttribute newAttribute) {
  for (OutputAttribute attribute : selectionList) {
    if (attribute.getRename().equals(newAttribute.getRename())) {
      throw new DuplicateAttributeException(newAttribute.getRename() + " is already defined as an output " +
          "attribute ", newAttribute.getQueryContextStartIndex(), attribute.getQueryContextEndIndex());
    }
  }
}
origin: wso2/siddhi

public Selector select(Variable variable) {
  OutputAttribute outputAttribute = new OutputAttribute(variable);
  checkSelection(outputAttribute);
  selectionList.add(outputAttribute);
  return this;
}
origin: apache/eagle

  private static List<StreamColumn> convertOutputStreamColumns(List<OutputAttribute> outputAttributeList) {
    return outputAttributeList.stream().map(outputAttribute -> {
      StreamColumn streamColumn = new StreamColumn();
      streamColumn.setName(outputAttribute.getRename());
      streamColumn.setDescription(outputAttribute.getExpression().toString());
      return streamColumn;
    }).collect(Collectors.toList());
  }
}
origin: org.apache.eagle/eagle-policy-base

List<OutputAttribute> list = query.getSelector().getSelectionList();
for (OutputAttribute output : list) {
  outputFields.add(output.getRename());
origin: org.wso2.carbon.analytics/org.wso2.carbon.stream.processor.core

/**
 * obtains information of all the user defined Functions.
 */
private void loadFunctionData(SiddhiApp siddhiApp, List<OutputAttribute> functionList, SiddhiAppElements
    siddhiAppElements, String appData) {
  for (FunctionDefinition functionDefinition : siddhiApp.getFunctionDefinitionMap().values()) {
    for (OutputAttribute app : functionList) {
      if (app.getExpression() instanceof AttributeFunction) {
        if (functionDefinition.getId().equals(((AttributeFunction) app.getExpression()).getName())) {
          String functionDefinitionStr = getDefinition(functionDefinition, appData);
          siddhiAppElements.setFunction(functionDefinition.getId());
          siddhiAppElements.setFunctionQuery(functionDefinitionStr);
          break;
        }
      }
    }
  }
}
origin: org.wso2.carbon.analytics/org.wso2.carbon.siddhi.editor.core

  /**
   * Generates a SelectedAttribute object from the given Siddhi OutputAttribute
   * @param outputAttribute                   Siddhi OutputAttribute object
   * @return                                  SelectedAttribute object
   * @throws DesignGenerationException        Error while getting the definition of the OutputAttribute
   */
  private SelectedAttribute generateSelectedAttribute(OutputAttribute outputAttribute)
      throws DesignGenerationException {
    SelectedAttribute selectedAttribute =
        new SelectedAttribute(
            ConfigBuildingUtilities.getDefinition(outputAttribute.getExpression(), siddhiAppString),
            outputAttribute.getRename());
    preserveAndBindCodeSegment(outputAttribute, selectedAttribute);
    return selectedAttribute;

  }
}
origin: org.wso2.siddhi/siddhi-query-api

private void checkSelection(OutputAttribute newAttribute) {
  for (OutputAttribute attribute : selectionList) {
    if (attribute.getRename().equals(newAttribute.getRename())) {
      throw new DuplicateAttributeException(newAttribute.getRename() + " is already defined as an output " +
          "attribute ", newAttribute.getQueryContextStartIndex(), attribute.getQueryContextEndIndex());
    }
  }
}
origin: wso2/siddhi

public Selector select(String rename, Expression expression) {
  OutputAttribute outputAttribute = new OutputAttribute(rename, expression);
  checkSelection(outputAttribute);
  selectionList.add(outputAttribute);
  return this;
}
origin: org.wso2.siddhi/siddhi-query-api

public Selector select(Variable variable) {
  OutputAttribute outputAttribute = new OutputAttribute(variable);
  checkSelection(outputAttribute);
  selectionList.add(outputAttribute);
  return this;
}
origin: org.wso2.siddhi/siddhi-query-api

public Selector select(String rename, Expression expression) {
  OutputAttribute outputAttribute = new OutputAttribute(rename, expression);
  checkSelection(outputAttribute);
  selectionList.add(outputAttribute);
  return this;
}
origin: org.wso2.siddhi/siddhi-query-compiler

  /**
   * {@inheritDoc}
   * <p>The default implementation returns the result of calling
   * {@link #visitChildren} on {@code ctx}.</p>
   *
   * @param ctx
   */
  @Override
  public Object visitOutput_attribute(@NotNull SiddhiQLParser.Output_attributeContext ctx) {

//        output_attribute
//                :attribute AS attribute_name
//                |attribute_reference
//        ;
    if (ctx.AS() != null) {
      OutputAttribute outputAttribute = new OutputAttribute((String) visit(ctx.attribute_name()),
          (Expression) visit(ctx.attribute()));
      populateQueryContext(outputAttribute, ctx);
      return outputAttribute;
    } else {
      OutputAttribute outputAttribute = new OutputAttribute((Variable) visit(ctx.attribute_reference()));
      populateQueryContext(outputAttribute, ctx);
      return outputAttribute;
    }
  }

org.wso2.siddhi.query.api.execution.query.selectionOutputAttribute

Javadoc

Query output stream attributes

Most used methods

  • getRename
  • getExpression
  • <init>
  • getQueryContextEndIndex
  • getQueryContextStartIndex

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JFileChooser (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now