src/main/java/org/helm/notation2/parser/notation/polymer/MonomerNotationUnitRNA.java
private void setRNAContents(String str) throws NotationException {
    /* Nucleotide with all contents */
    String[] list;

    // if (str.contains("(")) {
    List<String> items = extractContents(str);
    for (String item : items) {
    	if(item.length()> 1){
    		if(!(item.startsWith("[") && item.endsWith("]"))){
    			throw new NotationException("Monomers have to be in brackets "+ item);
    		}
    	}
      contents.add(new MonomerNotationUnit(item, type));

    }

    // } /* nucleotide contains no base, but a modified sugar or phosphat */
    // else if (str.contains("[")) {
    // if (str.startsWith("[")) {
    // str = str.replace("]", "]$");
    // } else {
    // str = str.replace("[", "$[");
    // }
    // list = str.split("\\$");
    // for (int i = 0; i < list.length; i++) {
    // contents.add(new MonomerNotationUnit(list[i], type));
    // }
    // } /* nucleotide contains only standard sugar and/or phosphat */ else {
    // for (int i = 0; i < str.length(); i++) {
    // contents.add(new MonomerNotationUnit(Character.toString(str.charAt(i)),
    // type));
    // }
    // }

  }
private void setRNAContents(String str) throws NotationException {
    /* Nucleotide with all contents */
    String[] list;

    // if (str.contains("(")) {
    List<String> items = extractContents(str);
    for (String item : items) {
    	if(item.length()> 1){
    		if(!(item.startsWith("[") && item.endsWith("]"))){
    			throw new NotationException("Monomers have to be in brackets "+ item);
    		}
    	}
      contents.add(new MonomerNotationUnit(item, type));

    }

    // } /* nucleotide contains no base, but a modified sugar or phosphat */
    // else if (str.contains("[")) {
    // if (str.startsWith("[")) {
    // str = str.replace("]", "]$");
    // } else {
    // str = str.replace("[", "$[");
    // }
    // list = str.split("\\$");
    // for (int i = 0; i < list.length; i++) {
    // contents.add(new MonomerNotationUnit(list[i], type));
    // }
    // } /* nucleotide contains only standard sugar and/or phosphat */ else {
    // for (int i = 0; i < str.length(); i++) {
    // contents.add(new MonomerNotationUnit(Character.toString(str.charAt(i)),
    // type));
    // }
    // }

  }
private void setRNAContents ( String str ) throws NotationException { /* Nucleotide with all contents */ String [ ] list ; // if (str.contains("(")) {
 List < String > items = extractContents ( str ) ; for ( String item : items ) { if ( item . length ( ) > 1 ) { if ( ! ( item . startsWith ( "[" ) && item . endsWith ( "]" ) ) ) { throw new NotationException ( "Monomers have to be in brackets " + item ) ; } } contents . add ( new MonomerNotationUnit ( item , type ) ) ; } // } /* nucleotide contains no base, but a modified sugar or phosphat */
 // else if (str.contains("[")) {
 // if (str.startsWith("[")) {
 // str = str.replace("]", "]$");
 // } else {
 // str = str.replace("[", "$[");
 // }
 // list = str.split("\\$");
 // for (int i = 0; i < list.length; i++) {
 // contents.add(new MonomerNotationUnit(list[i], type));
 // }
 // } /* nucleotide contains only standard sugar and/or phosphat */ else {
 // for (int i = 0; i < str.length(); i++) {
 // contents.add(new MonomerNotationUnit(Character.toString(str.charAt(i)),
 // type));
 // }
 // }
 }
method to set for each nucleotide the sugar, the base and the phosphat

@param str monomer notation
@throws NotationException if  single monomers are not in brackets
method to set for each nucleotide the sugar the base and the phosphat