Tabnine Logo
NFACompiler$NFAFactoryCompiler.checkPatternNameUniqueness
Code IndexAdd Tabnine to your IDE (free)

How to use
checkPatternNameUniqueness
method
in
org.apache.flink.cep.nfa.compiler.NFACompiler$NFAFactoryCompiler

Best Java code snippets using org.apache.flink.cep.nfa.compiler.NFACompiler$NFAFactoryCompiler.checkPatternNameUniqueness (Showing top 9 results out of 315)

origin: org.apache.flink/flink-cep

/**
 * Compiles the given pattern into a {@link NFAFactory}. The NFA factory can be used to create
 * multiple NFAs.
 */
void compileFactory() {
  if (currentPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) {
    throw new MalformedPatternException("NotFollowedBy is not supported as a last part of a Pattern!");
  }
  checkPatternNameUniqueness();
  checkPatternSkipStrategy();
  // we're traversing the pattern from the end to the beginning --> the first state is the final state
  State<T> sinkState = createEndingState();
  // add all the normal states
  sinkState = createMiddleStates(sinkState);
  // add the beginning state
  createStartState(sinkState);
}
origin: org.apache.flink/flink-cep_2.11

/**
 * Check if the given pattern's name is already used or not. If yes, it
 * throws a {@link MalformedPatternException}.
 *
 * @param pattern The pattern to be checked
 */
private void checkPatternNameUniqueness(final Pattern pattern) {
  if (pattern instanceof GroupPattern) {
    Pattern patternToCheck = ((GroupPattern) pattern).getRawPattern();
    while (patternToCheck != null) {
      checkPatternNameUniqueness(patternToCheck);
      patternToCheck = patternToCheck.getPrevious();
    }
  } else {
    stateNameHandler.checkNameUniqueness(pattern.getName());
  }
}
origin: org.apache.flink/flink-cep

/**
 * Check if the given pattern's name is already used or not. If yes, it
 * throws a {@link MalformedPatternException}.
 *
 * @param pattern The pattern to be checked
 */
private void checkPatternNameUniqueness(final Pattern pattern) {
  if (pattern instanceof GroupPattern) {
    Pattern patternToCheck = ((GroupPattern) pattern).getRawPattern();
    while (patternToCheck != null) {
      checkPatternNameUniqueness(patternToCheck);
      patternToCheck = patternToCheck.getPrevious();
    }
  } else {
    stateNameHandler.checkNameUniqueness(pattern.getName());
  }
}
origin: org.apache.flink/flink-cep_2.11

/**
 * Compiles the given pattern into a {@link NFAFactory}. The NFA factory can be used to create
 * multiple NFAs.
 */
void compileFactory() {
  if (currentPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) {
    throw new MalformedPatternException("NotFollowedBy is not supported as a last part of a Pattern!");
  }
  checkPatternNameUniqueness();
  checkPatternSkipStrategy();
  // we're traversing the pattern from the end to the beginning --> the first state is the final state
  State<T> sinkState = createEndingState();
  // add all the normal states
  sinkState = createMiddleStates(sinkState);
  // add the beginning state
  createStartState(sinkState);
}
origin: org.apache.flink/flink-cep

/**
 * Check if there are duplicate pattern names. If yes, it
 * throws a {@link MalformedPatternException}.
 */
private void checkPatternNameUniqueness() {
  // make sure there is no pattern with name "$endState$"
  stateNameHandler.checkNameUniqueness(ENDING_STATE_NAME);
  Pattern patternToCheck = currentPattern;
  while (patternToCheck != null) {
    checkPatternNameUniqueness(patternToCheck);
    patternToCheck = patternToCheck.getPrevious();
  }
  stateNameHandler.clear();
}
origin: org.apache.flink/flink-cep_2.11

/**
 * Check if there are duplicate pattern names. If yes, it
 * throws a {@link MalformedPatternException}.
 */
private void checkPatternNameUniqueness() {
  // make sure there is no pattern with name "$endState$"
  stateNameHandler.checkNameUniqueness(ENDING_STATE_NAME);
  Pattern patternToCheck = currentPattern;
  while (patternToCheck != null) {
    checkPatternNameUniqueness(patternToCheck);
    patternToCheck = patternToCheck.getPrevious();
  }
  stateNameHandler.clear();
}
origin: apache/flink

/**
 * Compiles the given pattern into a {@link NFAFactory}. The NFA factory can be used to create
 * multiple NFAs.
 */
void compileFactory() {
  if (currentPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) {
    throw new MalformedPatternException("NotFollowedBy is not supported as a last part of a Pattern!");
  }
  checkPatternNameUniqueness();
  checkPatternSkipStrategy();
  // we're traversing the pattern from the end to the beginning --> the first state is the final state
  State<T> sinkState = createEndingState();
  // add all the normal states
  sinkState = createMiddleStates(sinkState);
  // add the beginning state
  createStartState(sinkState);
}
origin: apache/flink

/**
 * Check if the given pattern's name is already used or not. If yes, it
 * throws a {@link MalformedPatternException}.
 *
 * @param pattern The pattern to be checked
 */
private void checkPatternNameUniqueness(final Pattern pattern) {
  if (pattern instanceof GroupPattern) {
    Pattern patternToCheck = ((GroupPattern) pattern).getRawPattern();
    while (patternToCheck != null) {
      checkPatternNameUniqueness(patternToCheck);
      patternToCheck = patternToCheck.getPrevious();
    }
  } else {
    stateNameHandler.checkNameUniqueness(pattern.getName());
  }
}
origin: apache/flink

/**
 * Check if there are duplicate pattern names. If yes, it
 * throws a {@link MalformedPatternException}.
 */
private void checkPatternNameUniqueness() {
  // make sure there is no pattern with name "$endState$"
  stateNameHandler.checkNameUniqueness(ENDING_STATE_NAME);
  Pattern patternToCheck = currentPattern;
  while (patternToCheck != null) {
    checkPatternNameUniqueness(patternToCheck);
    patternToCheck = patternToCheck.getPrevious();
  }
  stateNameHandler.clear();
}
org.apache.flink.cep.nfa.compilerNFACompiler$NFAFactoryCompilercheckPatternNameUniqueness

Javadoc

Check if there are duplicate pattern names. If yes, it throws a MalformedPatternException.

Popular methods of NFACompiler$NFAFactoryCompiler

  • <init>
  • compileFactory
    Compiles the given pattern into a NFAFactory. The NFA factory can be used to create multiple NFAs.
  • getStates
  • addStopStateToLooping
  • addStopStates
  • convertPattern
  • copyWithoutTransitiveNots
    This method creates an alternative state that is target for TAKE transition from an optional State.
  • createEndingState
    Creates the dummy Final State of the NFA graph.
  • createLooping
    Creates the given state as a looping one. Looping state is one with TAKE edge to itself and PROCEED
  • createMiddleStates
    Creates all the states between Start and Final state.
  • createSingletonState
    Creates a simple single state. For an OPTIONAL state it also consists of a similar state without the
  • createStartState
    Creates the Start State of the resulting NFA graph.
  • createSingletonState,
  • createStartState,
  • createState,
  • createStopState,
  • createTimesState,
  • getCurrentNotCondition,
  • getIgnoreCondition,
  • getInnerIgnoreCondition,
  • getWindowTime

Popular in Java

  • Start an intent from android
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Table (org.hibernate.mapping)
    A relational table
  • Top 12 Jupyter Notebook extensions
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