@@ -260,31 +260,31 @@ public static AFPChain[] parseMultiXML(String xml) throws IOException {
260260 if ( version != null )
261261 a .setVersion (version );
262262
263- a .setAlnLength ( new Integer (getAttribute (rootElement ,"alnLength" )). intValue ( ));
264- a .setBlockNum ( new Integer (getAttribute (rootElement ,"blockNum" )). intValue ( ));
265- a .setGapLen ( new Integer (getAttribute (rootElement ,"gapLen" )). intValue ( ));
266- a .setOptLength ( new Integer (getAttribute (rootElement ,"optLength" )). intValue ( ));
267- a .setTotalLenIni ( new Integer (getAttribute (rootElement ,"totalLenIni" )). intValue ( ));
268- a .setBlockNum ( new Integer (getAttribute (rootElement ,"blockNum" )). intValue ( ));
263+ a .setAlnLength ( Integer . parseInt (getAttribute (rootElement ,"alnLength" )));
264+ a .setBlockNum ( Integer . parseInt (getAttribute (rootElement ,"blockNum" )));
265+ a .setGapLen ( Integer . parseInt (getAttribute (rootElement ,"gapLen" )));
266+ a .setOptLength ( Integer . parseInt (getAttribute (rootElement ,"optLength" )));
267+ a .setTotalLenIni ( Integer . parseInt (getAttribute (rootElement ,"totalLenIni" )));
268+ a .setBlockNum ( Integer . parseInt (getAttribute (rootElement ,"blockNum" )));
269269
270270 if ( a .getAlgorithmName ().equals (CeCPMain .algorithmName )){
271271 a .setSequentialAlignment (a .getBlockNum () == 1 );
272272 }
273273
274- a .setAlignScore (new Double (getAttribute (rootElement ,"alignScore" )). doubleValue ( ));
275- a .setChainRmsd (new Double (getAttribute (rootElement ,"chainRmsd" )). doubleValue ( ));
276- Double identity = new Double (getAttribute (rootElement ,"identity" )). doubleValue ( );
274+ a .setAlignScore (Double . parseDouble (getAttribute (rootElement ,"alignScore" )));
275+ a .setChainRmsd (Double . parseDouble (getAttribute (rootElement ,"chainRmsd" )));
276+ Double identity = Double . parseDouble (getAttribute (rootElement ,"identity" ));
277277 a .setIdentity (identity );
278278
279- a .setNormAlignScore (new Double (getAttribute (rootElement ,"normAlignScore" )). doubleValue ( ));
280- a .setProbability (new Double (getAttribute (rootElement ,"probability" )). doubleValue ( ));
281- a .setSimilarity (new Double (getAttribute (rootElement ,"similarity" )). doubleValue ( ));
282- a .setTotalRmsdIni (new Double (getAttribute (rootElement ,"totalRmsdIni" )). doubleValue ( ));
283- a .setTotalRmsdOpt (new Double (getAttribute (rootElement ,"totalRmsdOpt" )). doubleValue ( ));
284- a .setAlignScoreUpdate (new Double (getAttribute (rootElement ,"alignScoreUpdate" )). doubleValue ( ));
285- int ca1Length = new Integer (getAttribute (rootElement ,"ca1Length" )). intValue ( );
279+ a .setNormAlignScore (Double . parseDouble (getAttribute (rootElement ,"normAlignScore" )));
280+ a .setProbability (Double . parseDouble (getAttribute (rootElement ,"probability" )));
281+ a .setSimilarity (Double . parseDouble (getAttribute (rootElement ,"similarity" )));
282+ a .setTotalRmsdIni (Double . parseDouble (getAttribute (rootElement ,"totalRmsdIni" )));
283+ a .setTotalRmsdOpt (Double . parseDouble (getAttribute (rootElement ,"totalRmsdOpt" )));
284+ a .setAlignScoreUpdate (Double . parseDouble (getAttribute (rootElement ,"alignScoreUpdate" )));
285+ int ca1Length = Integer . parseInt (getAttribute (rootElement ,"ca1Length" ));
286286 a .setCa1Length (ca1Length );
287- int ca2Length = new Integer (getAttribute (rootElement ,"ca2Length" )). intValue ( );
287+ int ca2Length = Integer . parseInt (getAttribute (rootElement ,"ca2Length" ));
288288 a .setCa2Length (ca2Length );
289289
290290 String tmScoreS = getAttribute (rootElement ,"tmScore" );
@@ -315,7 +315,7 @@ public static AFPChain[] parseMultiXML(String xml) throws IOException {
315315 Atom [] blockShiftVector = new Atom [a .getBlockNum ()];
316316 a .setBlockShiftVector (blockShiftVector );
317317
318- int afpNum = new Integer (getAttribute (rootElement ,"afpNum" )). intValue ( );
318+ int afpNum = Integer . parseInt (getAttribute (rootElement ,"afpNum" ));
319319 List <AFP > afpSet = new ArrayList <AFP >();
320320 for (int afp =0 ;afp <afpNum ;afp ++){
321321 afpSet .add ( new AFP ());
@@ -398,18 +398,18 @@ private static void processBlock(Node block, AFPChain a, int minLength){
398398 Matrix [] ms = a .getBlockRotationMatrix ();
399399 Atom [] shifts = a .getBlockShiftVector ();
400400
401- int blockNr = new Integer ( map .getNamedItem ("blockNr" ).getTextContent ()). intValue ( );
401+ int blockNr = Integer . parseInt ( map .getNamedItem ("blockNr" ).getTextContent ());
402402
403- int thisBlockGap = new Integer (map .getNamedItem ("blockGap" ).getTextContent ()). intValue ( );
403+ int thisBlockGap = Integer . parseInt (map .getNamedItem ("blockGap" ).getTextContent ());
404404 blockGap [blockNr ] = thisBlockGap ;
405405
406- int thisBlockSize = new Integer (map .getNamedItem ("blockSize" ).getTextContent ()). intValue ( );
406+ int thisBlockSize = Integer . parseInt (map .getNamedItem ("blockSize" ).getTextContent ());
407407 blockSize [blockNr ] = thisBlockSize ;
408408
409- double thisBlockScore = new Double (map .getNamedItem ("blockScore" ).getTextContent ()). doubleValue ( );
409+ double thisBlockScore = Double . parseDouble (map .getNamedItem ("blockScore" ).getTextContent ());
410410 blockScore [blockNr ] = thisBlockScore ;
411411
412- double thisBlockRmsd = new Double (map .getNamedItem ("blockRmsd" ).getTextContent ()). doubleValue ( );
412+ double thisBlockRmsd = Double . parseDouble (map .getNamedItem ("blockRmsd" ).getTextContent ());
413413 blockRmsd [blockNr ] = thisBlockRmsd ;
414414
415415
@@ -425,7 +425,7 @@ private static void processBlock(Node block, AFPChain a, int minLength){
425425 nrEqr ++;
426426 NamedNodeMap atts = eqr .getAttributes ();
427427
428- int eqrNr = new Integer (atts .getNamedItem ("eqrNr" ).getTextContent ()). intValue ( );
428+ int eqrNr = Integer . parseInt (atts .getNamedItem ("eqrNr" ).getTextContent ());
429429
430430 String pdbres1 = atts .getNamedItem ("pdbres1" ).getTextContent ();
431431 String chain1 = atts .getNamedItem ("chain1" ).getTextContent ();
0 commit comments