// Copyright (C) 2000-2001 Washington University School of Medicine
// and Howard Hughes Medical Institute
// All rights reserved
-//
+//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
-//
+//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
//
// Contact: phylosoft @ gmail . com
-// WWW: www.phylosoft.org/forester
+// WWW: https://sites.google.com/site/cmzmasek/home/software/forester
package org.forester.phylogeny.data;
}
public boolean isEmpty() {
+ if ( ForesterUtil.isEmpty( _desc ) && ( ( getPoints() != null ) && ( getPoints().size() == 1 ) )
+ && ForesterUtil.isEmpty( _polygons ) ) {
+ if ( Point.isSeemsEmpty( getPoints().get( 0 ) ) ) {
+ return true;
+ }
+ }
return ForesterUtil.isEmpty( _desc ) && ForesterUtil.isEmpty( _points ) && ForesterUtil.isEmpty( _polygons );
}
int i = 0;
if ( getPoints() != null ) {
for( final Point point : getPoints() ) {
- if ( point != null ) {
+ if ( ( point != null ) && !Point.isSeemsEmpty( point ) ) {
sb.append( ForesterUtil.LINE_SEPARATOR );
sb.append( " Point " + i + ": " );
sb.append( point.asSimpleText() );
final String ind = indentation + PhylogenyWriter.PHYLO_XML_INTENDATION_BASE;
if ( getPoints() != null ) {
for( final Point point : getPoints() ) {
- point.toPhyloXML( writer, level, ind );
+ if ( ( point != null ) && !Point.isSeemsEmpty( point ) ) {
+ point.toPhyloXML( writer, level, ind );
+ }
}
}
if ( getPolygons() != null ) {
for( final Polygon polygon : getPolygons() ) {
- polygon.toPhyloXML( writer, level, ind );
+ if ( polygon != null ) {
+ polygon.toPhyloXML( writer, level, ind );
+ }
}
}
writer.write( ForesterUtil.LINE_SEPARATOR );