X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FIdentifyFile.java;h=5a3d700f74c020e3514295215de1fb9d6e3d91ce;hb=9d2408483e451285fd555c3cd6e0273977acbaa7;hp=b3124745d3596ff562e65e291027505ba83bfe08;hpb=0424fec4a6d71684f56978f61eadd4ceb0652a60;p=jalview.git diff --git a/src/jalview/io/IdentifyFile.java b/src/jalview/io/IdentifyFile.java index b312474..5a3d700 100755 --- a/src/jalview/io/IdentifyFile.java +++ b/src/jalview/io/IdentifyFile.java @@ -20,6 +20,8 @@ */ package jalview.io; +import java.util.Locale; + import java.io.File; import java.io.IOException; @@ -178,13 +180,26 @@ public class IdentifyFile break; } } - data = data.toUpperCase(); + data = data.toUpperCase(Locale.ROOT); if (data.startsWith(ScoreMatrixFile.SCOREMATRIX)) { reply = FileFormat.ScoreMatrix; break; } + if (data.startsWith("LOCUS")) + { + reply = FileFormat.GenBank; + break; + } + if (data.startsWith("ID ")) + { + if (data.substring(2).trim().split(";").length == 7) + { + reply = FileFormat.Embl; + break; + } + } if (data.startsWith("H ") && !aaIndexHeaderRead) { aaIndexHeaderRead = true; @@ -319,7 +334,7 @@ public class IdentifyFile if ((lessThan > -1)) // possible Markup Language data i.e HTML, // RNAML, XML { - String upper = data.toUpperCase(); + String upper = data.toUpperCase(Locale.ROOT); if (upper.substring(lessThan).startsWith("