src/main/java/org/helm/notation2/parser/StateMachineParser.java
public boolean checkPolymerId(String polymerId) {
    LOG.debug("Validation of polymerID: " + polymerId);
    String pattern = "PEPTIDE[1-9][0-9]*|RNA[1-9][0-9]*|CHEM[1-9][0-9]*|BLOB[1-9][0-9]*";

    Pattern p = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE);
    Matcher m = p.matcher(polymerId);
    if (m.matches()) {
      LOG.debug("PolymerID is valid: " + polymerId);
      return true;
    }

    LOG.debug("PolymerID is not valid: " + polymerId);
    return false;
  }
public boolean checkPolymerId(String polymerId) {
    LOG.debug("Validation of polymerID: " + polymerId);
    String pattern = "PEPTIDE[1-9][0-9]*|RNA[1-9][0-9]*|CHEM[1-9][0-9]*|BLOB[1-9][0-9]*";

    Pattern p = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE);
    Matcher m = p.matcher(polymerId);
    if (m.matches()) {
      LOG.debug("PolymerID is valid: " + polymerId);
      return true;
    }

    LOG.debug("PolymerID is not valid: " + polymerId);
    return false;
  }
method to validate the polymer id in the simple polymer section the id can
be peptide, rna, chem or blob

@param polymerId ID of a polymer
@return true if the ID is valid, false otherwise