removed lineage
authorcmzmasek <czmasek@czamseklt-w7.jcvi.ORG>
Mon, 13 Feb 2017 18:08:47 +0000 (10:08 -0800)
committercmzmasek <czmasek@czamseklt-w7.jcvi.ORG>
Mon, 13 Feb 2017 18:08:47 +0000 (10:08 -0800)
forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlMapping.java
forester/java/src/org/forester/io/parsers/phyloxml/data/TaxonomyParser.java
forester/java/src/org/forester/phylogeny/data/Taxonomy.java

index d9db39d..1db3384 100644 (file)
@@ -125,7 +125,6 @@ public final class PhyloXmlMapping {
     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";
index 74d11df..d226801 100644 (file)
@@ -79,12 +79,6 @@ public class TaxonomyParser implements PhylogenyDataPhyloXmlParser {
                 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;
index 24846e4..8548fe6 100644 (file)
@@ -404,24 +404,6 @@ public class Taxonomy implements PhylogenyData, MultipleUris, Comparable<Taxonom
                 }
             }
         }
-        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 );