+ private static String extractBracketedTaxCodes6( final PhylogenyNode node, final String new_value ) {
+ final Matcher m = ParserUtils.TAXOMONY_CODE_PATTERN_6.matcher( new_value );
+ String tc = "?";
+ if ( m.find() ) {
+ tc = m.group( 1 );
+ }
+ ForesterUtil.ensurePresenceOfTaxonomy( node );
+ try {
+ if ( tc.length() == 6 ) {
+ final String t = tc.substring( 0, 5 );
+ System.out.println( "WARNING: taxonomy code " + tc + " -> " + t );
+ tc = t;
+ }
+ else {
+ throw new IllegalArgumentException();
+ }
+ node.getNodeData().getTaxonomy().setTaxonomyCode( tc );
+ }
+ catch ( final PhyloXmlDataFormatException e ) {
+ throw new IllegalArgumentException( "illegal format for taxonomy code: " + tc );
+ }
+ return new_value; //TODO //FIXME
+ }
+