public static final String TAXONOMY_RANK = "rank";
public static final String TAXONOMY_SCIENTIFIC_NAME = "scientific_name";
public static final String TAXONOMY_SYNONYM = "synonym";
- public static final String TAXONOMY_LINEAGE = "lineage";
public static final String TYPE_ATTR = "type";
public static final String URI = "uri";
public static final String URI_DESC_ATTR = "desc";
else if ( child_element.getQualifiedName().equals( PhyloXmlMapping.URI ) ) {
taxonomy.addUri( ( Uri ) UriParser.getInstance().parse( child_element ) );
}
- else if ( child_element.getQualifiedName().equals( PhyloXmlMapping.TAXONOMY_LINEAGE ) ) {
- final String[] lineage = child_element.getValueAsString().split( "," );
- if ( lineage != null && lineage.length > 0 ) {
- taxonomy.setLineage( Arrays.asList(lineage) );
- }
- }
}
}
return taxonomy;
}
}
}
- if ( getLineage() != null ) {
- final StringBuilder sb = new StringBuilder();
- boolean first = true;
- for( final String lin : getLineage() ) {
- if ( !ForesterUtil.isEmpty( lin ) ) {
- if ( first ) {
- first = false;
- }
- else {
- sb.append( "," );
- }
- sb.append( lin );
- }
- }
- if ( sb.length() > 0 ) {
- PhylogenyDataUtil.appendElement( writer, PhyloXmlMapping.TAXONOMY_LINEAGE, sb.toString(), indentation );
- }
- }
writer.write( ForesterUtil.LINE_SEPARATOR );
writer.write( indentation );
PhylogenyDataUtil.appendClose( writer, PhyloXmlMapping.TAXONOMY );