X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FModellerDescription.java;h=fa6ef6d013ac861d592f08959574827cff4fe46f;hb=6ebb5015f90d293322fb3af0c7b20313359fe97d;hp=300a9ba2eecba039f26526e2bc9b99ef699d6822;hpb=0d6e36143a2d7471edb7ef386d0b79095e0cd63e;p=jalview.git diff --git a/src/jalview/io/ModellerDescription.java b/src/jalview/io/ModellerDescription.java index 300a9ba..fa6ef6d 100755 --- a/src/jalview/io/ModellerDescription.java +++ b/src/jalview/io/ModellerDescription.java @@ -1,15 +1,33 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer + * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ package jalview.io; -import jalview.datamodel.SequenceI; -import java.util.Vector; +import jalview.datamodel.*; + public class ModellerDescription { - /** - * Translates between a String containing a set of colon-separated values - * on a single line, and sequence start/end and other properties. - * See PIRFile IO for its use. - */ - final String[] seqTypes = + /** + * Translates between a String containing a set of colon-separated values + * on a single line, and sequence start/end and other properties. + * See PIRFile IO for its use. + */ + final String[] seqTypes = { "sequence", "structure", "structureX", "structureN"}; final String[] Fields = @@ -69,7 +87,8 @@ public class ModellerDescription private resCode validResidueCode(String field) { Integer val = null; - com.stevesoft.pat.Regex r = new com.stevesoft.pat.Regex("\\s*((([-0-9]+).?)|FIRST|LAST|@)"); + com.stevesoft.pat.Regex r = new com.stevesoft.pat.Regex( + "\\s*((([-0-9]+).?)|FIRST|LAST|@)"); if (!r.search(field)) { @@ -80,8 +99,8 @@ public class ModellerDescription { value = r.stringMatched(1); } - // jalview.bin.Cache.log.debug("from '" + field + "' matched '" + value + - // "'"); + // jalview.bin.Cache.log.debug("from '" + field + "' matched '" + value + + // "'"); try { val = Integer.valueOf(value); @@ -106,7 +125,7 @@ public class ModellerDescription field = st.nextToken(":"); do { - if (seqTypes[i].equalsIgnoreCase(field) ) + if (seqTypes[i].equalsIgnoreCase(field)) { break; } @@ -132,8 +151,8 @@ public class ModellerDescription } else { - // jalview.bin.Cache.log.debug( - // "Ignoring non-Modeller description: invalid integer-like field '" + field + "'"); + // jalview.bin.Cache.log.debug( + // "Ignoring non-Modeller description: invalid integer-like field '" + field + "'"); type = -1; /* invalid field! - throw the FieldSet away */ } ; @@ -224,7 +243,7 @@ public class ModellerDescription if (seq.getDatasetSequence() != null && seq.getDatasetSequence().getDBRef() != null) { - jalview.datamodel.DBRefEntry [] dbr = seq.getDatasetSequence().getDBRef(); + jalview.datamodel.DBRefEntry[] dbr = seq.getDatasetSequence().getDBRef(); int i, j; for (i = 0, j = dbr.length; i < j; i++) { @@ -370,4 +389,3 @@ public class ModellerDescription return false; } } -