src/main/java/org/helm/notation2/parser/simplepolymerssection/SimplePolymersParser.java
@Override
  public void doAction(char cha) throws SimplePolymerSectionException, NotationException {

    /* list of simple polymers is finished */
    if (cha == '$') {
      // id has to be empty
      if (polymerId == "") {
        if (!(_parser.isEmpty())) {
          LOG.info("Simple polymer section is finished:");
          LOG.info("Transition to connection section:");
          _parser.setState(new ConnectionsParser(_parser));
        } else {
          LOG.error("Simple polymer ID has to be defined:");
          throw new SimplePolymerSectionException("A simple polymer has to be defined");
        }
      } else {
        LOG.error("Incorrect input in the simple polymer section:");
        throw new SimplePolymerSectionException("Incorrect input in the simple polymer section:");
      }

    } /* simple polymer notation is starting */ else if (cha == '{') {
      if ((_parser.checkPolymerId(polymerId)) && polymerId != "") {
        LOG.info("Simple polymer ID is read:");
        _parser.notationContainer.addPolymer(new PolymerNotation(polymerId));
        _parser.addPolymer(polymerId);
        _parser.setState(new SimplePolymersNotationParser(_parser));
      } else {
        LOG.error("Polymer ID is not correct: " + polymerId);
        throw new SimplePolymerSectionException("Polymer ID is not correct: " + polymerId);
      }
    } /* add characters to polymer id */ else {
      polymerId += cha;
    }

  }
@Override
  public void doAction(char cha) throws SimplePolymerSectionException, NotationException {

    /* list of simple polymers is finished */
    if (cha == '$') {
      // id has to be empty
      if (polymerId == "") {
        if (!(_parser.isEmpty())) {
          LOG.info("Simple polymer section is finished:");
          LOG.info("Transition to connection section:");
          _parser.setState(new ConnectionsParser(_parser));
        } else {
          LOG.error("Simple polymer ID has to be defined:");
          throw new SimplePolymerSectionException("A simple polymer has to be defined");
        }
      } else {
        LOG.error("Incorrect input in the simple polymer section:");
        throw new SimplePolymerSectionException("Incorrect input in the simple polymer section:");
      }

    } /* simple polymer notation is starting */ else if (cha == '{') {
      if ((_parser.checkPolymerId(polymerId)) && polymerId != "") {
        LOG.info("Simple polymer ID is read:");
        _parser.notationContainer.addPolymer(new PolymerNotation(polymerId));
        _parser.addPolymer(polymerId);
        _parser.setState(new SimplePolymersNotationParser(_parser));
      } else {
        LOG.error("Polymer ID is not correct: " + polymerId);
        throw new SimplePolymerSectionException("Polymer ID is not correct: " + polymerId);
      }
    } /* add characters to polymer id */ else {
      polymerId += cha;
    }

  }
{@inheritDoc}

@throws NotationException if notation is not valid
@throws SimplePolymerSectionException if simple polymer section is not valid