public void loadJalviewDataFile(String file)
{
try{
+ String protocol = "File";
+
+ if (file.indexOf("http:") > -1 || file.indexOf("file:") > -1)
+ {
+ protocol = "URL";
+ }
+
boolean isAnnotation = new AnnotationFile().readAnnotationFile(viewport.
alignment, file);
if (!isAnnotation)
{
- boolean isGroupsFile = parseFeaturesFile(file,
- AppletFormatAdapter.FILE);
+ boolean isGroupsFile = parseFeaturesFile(file,protocol);
if (!isGroupsFile)
{
- String format = new IdentifyFile().Identify(file, FormatAdapter.FILE);
- new FileLoader().LoadFile(viewport, file, FormatAdapter.FILE, format);
+ String format = new IdentifyFile().Identify(file, protocol);
+
+ if(format.equalsIgnoreCase("JnetFile"))
+ {
+ jalview.io.JPredFile predictions = new jalview.io.JPredFile(
+ file, protocol);
+ new JnetAnnotationMaker().add_annotation(predictions,
+ viewport.getAlignment(),
+ 0, false);
+ alignPanel.adjustAnnotationHeight();
+ alignPanel.repaint();
+ }
+ else
+ new FileLoader().LoadFile(viewport, file, protocol, format);
}
}
else