X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fio%2Fparsers%2Fphyloxml%2Fdata%2FSequenceRelationParser.java;h=23df0da0c6b3b8f228d9f16c882da63b5e83788b;hb=674c900e024974cf75807c29a177404146757704;hp=6c0a8495e25137eec971e8ff9c4761fe0648c7c8;hpb=48f7a89be9d34f1930a1f863e608235cc27184c5;p=jalview.git diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/SequenceRelationParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/SequenceRelationParser.java index 6c0a849..23df0da 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/SequenceRelationParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/SequenceRelationParser.java @@ -21,17 +21,17 @@ // 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.io.parsers.phyloxml.data; import java.util.HashMap; import java.util.Map; +import org.forester.io.parsers.phyloxml.PhyloXmlDataFormatException; import org.forester.io.parsers.phyloxml.PhyloXmlHandler; import org.forester.io.parsers.phyloxml.PhyloXmlMapping; import org.forester.io.parsers.phyloxml.XmlElement; -import org.forester.io.parsers.util.PhylogenyParserException; import org.forester.phylogeny.Phylogeny; import org.forester.phylogeny.data.Confidence; import org.forester.phylogeny.data.Sequence; @@ -46,29 +46,29 @@ public class SequenceRelationParser implements PhylogenyDataPhyloXmlParser { } @Override - public SequenceRelation parse( final XmlElement element ) throws PhylogenyParserException { + public SequenceRelation parse( final XmlElement element ) throws PhyloXmlDataFormatException { final SequenceRelation seqRelation = new SequenceRelation(); if ( element.isHasAttribute( PhyloXmlMapping.SEQUENCE_RELATION_TYPE ) ) { final String sType = element.getAttribute( PhyloXmlMapping.SEQUENCE_RELATION_TYPE ); seqRelation.setType( SequenceRelation.SEQUENCE_RELATION_TYPE.valueOf( sType ) ); } if ( element.isHasAttribute( PhyloXmlMapping.SEQUENCE_RELATION_ID_REF0 ) && ( _phylogeny != null ) ) { - final Sequence ref = PhyloXmlHandler.getSequenceMapByIdForPhylogeny( _phylogeny ).get( element - .getAttribute( PhyloXmlMapping.SEQUENCE_RELATION_ID_REF0 ) ); + final Sequence ref = PhyloXmlHandler.getSequenceMapByIdForPhylogeny( _phylogeny ) + .get( element.getAttribute( PhyloXmlMapping.SEQUENCE_RELATION_ID_REF0 ) ); if ( ref != null ) { seqRelation.setRef0( ref ); } } if ( element.isHasAttribute( PhyloXmlMapping.SEQUENCE_RELATION_ID_REF1 ) && ( _phylogeny != null ) ) { - final Sequence ref = PhyloXmlHandler.getSequenceMapByIdForPhylogeny( _phylogeny ).get( element - .getAttribute( PhyloXmlMapping.SEQUENCE_RELATION_ID_REF1 ) ); + final Sequence ref = PhyloXmlHandler.getSequenceMapByIdForPhylogeny( _phylogeny ) + .get( element.getAttribute( PhyloXmlMapping.SEQUENCE_RELATION_ID_REF1 ) ); if ( ref != null ) { seqRelation.setRef1( ref ); } } if ( element.isHasAttribute( PhyloXmlMapping.SEQUENCE_RELATION_DISTANCE ) ) { - seqRelation.setDistance( Double - .valueOf( element.getAttribute( PhyloXmlMapping.SEQUENCE_RELATION_DISTANCE ) ) ); + seqRelation + .setDistance( Double.valueOf( element.getAttribute( PhyloXmlMapping.SEQUENCE_RELATION_DISTANCE ) ) ); } for( int i = 0; i < element.getNumberOfChildElements(); ++i ) { final XmlElement child_element = element.getChildElement( i );