src/main/java/org/helm/notation2/parser/annotationsection/AnnotationsParser.java
@Override
  public void doAction(char cha) throws AnnotationSectionException {
    /* list of attributes is finished */
    if (cha == '$') {
      if (checkBracketsParenthesis()) {
        LOG.info("Annotation section is finished:");
        if (annotation != "") {
          _parser.notationContainer.addAnnotation(new AnnotationNotation(annotation));
        }
        LOG.info("Transition to FinalState:");
        _parser.setState(new FinalState());
      } else {
        LOG.info("Annotation section is not valid: " + annotation);
        throw new AnnotationSectionException("Annotation section is not valid: " + annotation);
      }
    } else if (cha == '|') {
      if (checkBracketsParenthesis()) {
        LOG.info(" new annotation is starting");
        if (annotation != "") {
          _parser.notationContainer.addAnnotation(new AnnotationNotation(annotation));
          _parser.setState(new AnnotationsParser(_parser));
        } else {
          LOG.info("Annotation section is not valid: ");
          throw new AnnotationSectionException("Annotation section is not valid: ");
        }
      }
    } else {
      annotation += cha;
      if (cha == '{') {
        curlyBracketCounterOpen++;
      }
      if (cha == '}') {
        curlyBracketCounterClose++;
      }
      if (cha == '[') {
        bracketCounterOpen++;
      }
      if (cha == ']') {
        bracketCounterClose++;
      }
      if (cha == '(') {
        parenthesisCounterOpen++;
      }
      if (cha == ')') {
        parenthesisCounterClose++;
      }
    }

  }
@Override
  public void doAction(char cha) throws AnnotationSectionException {
    /* list of attributes is finished */
    if (cha == '$') {
      if (checkBracketsParenthesis()) {
        LOG.info("Annotation section is finished:");
        if (annotation != "") {
          _parser.notationContainer.addAnnotation(new AnnotationNotation(annotation));
        }
        LOG.info("Transition to FinalState:");
        _parser.setState(new FinalState());
      } else {
        LOG.info("Annotation section is not valid: " + annotation);
        throw new AnnotationSectionException("Annotation section is not valid: " + annotation);
      }
    } else if (cha == '|') {
      if (checkBracketsParenthesis()) {
        LOG.info(" new annotation is starting");
        if (annotation != "") {
          _parser.notationContainer.addAnnotation(new AnnotationNotation(annotation));
          _parser.setState(new AnnotationsParser(_parser));
        } else {
          LOG.info("Annotation section is not valid: ");
          throw new AnnotationSectionException("Annotation section is not valid: ");
        }
      }
    } else {
      annotation += cha;
      if (cha == '{') {
        curlyBracketCounterOpen++;
      }
      if (cha == '}') {
        curlyBracketCounterClose++;
      }
      if (cha == '[') {
        bracketCounterOpen++;
      }
      if (cha == ']') {
        bracketCounterClose++;
      }
      if (cha == '(') {
        parenthesisCounterOpen++;
      }
      if (cha == ')') {
        parenthesisCounterClose++;
      }
    }

  }
@ Override public void doAction ( char cha ) throws AnnotationSectionException { /* list of attributes is finished */ if ( cha == ' ' ) { if ( checkBracketsParenthesis ( ) ) { LOG . info ( "Annotation section is finished:" ) ; if ( annotation != "" ) { _parser . notationContainer . addAnnotation ( new AnnotationNotation ( annotation ) ) ; } LOG . info ( "Transition to FinalState:" ) ; _parser . setState ( new FinalState ( ) ) ; } else { LOG . info ( "Annotation section is not valid: " + annotation ) ; throw new AnnotationSectionException ( "Annotation section is not valid: " + annotation ) ; } } else if ( cha == ' ' ) { if ( checkBracketsParenthesis ( ) ) { LOG . info ( " new annotation is starting" ) ; if ( annotation != "" ) { _parser . notationContainer . addAnnotation ( new AnnotationNotation ( annotation ) ) ; _parser . setState ( new AnnotationsParser ( _parser ) ) ; } else { LOG . info ( "Annotation section is not valid: " ) ; throw new AnnotationSectionException ( "Annotation section is not valid: " ) ; } } } else { annotation += cha ; if ( cha == ' ' ) { curlyBracketCounterOpen ++ ; } if ( cha == ' ' ) { curlyBracketCounterClose ++ ; } if ( cha == ' ' ) { bracketCounterOpen ++ ; } if ( cha == ' ' ) { bracketCounterClose ++ ; } if ( cha == ' ' ) { parenthesisCounterOpen ++ ; } if ( cha == ' ' ) { parenthesisCounterClose ++ ; } } }
{@inheritDoc}
{