// 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 );