edu.sdsc.sirius.io
Class MsfEntryLoader

java.lang.Object
  extended byedu.sdsc.sirius.io.MsfEntryLoader
All Implemented Interfaces:
EntryLoader, FileEntryLoader

public class MsfEntryLoader
extends java.lang.Object
implements FileEntryLoader

This class loads Entries from a file in MSF alignment format.

Author:
Oleksandr V. Buzko

Constructor Summary
MsfEntryLoader()
           
 
Method Summary
 boolean canLoad(java.io.File file)
          Checks whether an EntrySet can be loaded from the given File.
 boolean canLoad(java.lang.String name)
          Checks whether the file can be used to load entries.
 boolean canLoad(java.net.URL url)
          Checks whether an EntrySet can be loaded from the given URL.
 int getDataType()
           
 java.lang.String getEntryName(java.lang.String name)
          Returns the name of the Entry in the event of its loading.
 java.lang.String getLoaderName()
          Returns the common name for the loader implementation.
 Entry load(java.io.BufferedInputStream bufferedInputStream)
          Loads an EntrySet from a BufferedInputStream.
 Entry load(java.io.File file, int index)
          Load an EntrySet from a file.
 Entry load(java.lang.String name, int index)
          Loads an EntrySet from a file identified by a name
 Entry load(java.net.URL url, int index)
          Load an EntrySet from a URL.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MsfEntryLoader

public MsfEntryLoader()
Method Detail

getLoaderName

public java.lang.String getLoaderName()
Description copied from interface: EntryLoader
Returns the common name for the loader implementation. This is the string that might appear in a user-selectable menu.

Specified by:
getLoaderName in interface EntryLoader

load

public Entry load(java.lang.String name,
                  int index)
Loads an EntrySet from a file identified by a name

Specified by:
load in interface EntryLoader
Parameters:
name - file name as a String
Returns:
EntrySet

canLoad

public boolean canLoad(java.lang.String name)
Checks whether the file can be used to load entries.

Specified by:
canLoad in interface EntryLoader
Parameters:
name - file name
Returns:

load

public Entry load(java.io.File file,
                  int index)
Load an EntrySet from a file.

Specified by:
load in interface FileEntryLoader
Parameters:
file - File object
Returns:
EntrySet

getEntryName

public java.lang.String getEntryName(java.lang.String name)
Returns the name of the Entry in the event of its loading.


canLoad

public boolean canLoad(java.io.File file)
Checks whether an EntrySet can be loaded from the given File.

Specified by:
canLoad in interface FileEntryLoader
Parameters:
file - File object

load

public Entry load(java.net.URL url,
                  int index)
Load an EntrySet from a URL.

Specified by:
load in interface FileEntryLoader
Parameters:
url - URL object
Returns:
EntrySet

canLoad

public boolean canLoad(java.net.URL url)
Checks whether an EntrySet can be loaded from the given URL.

Specified by:
canLoad in interface FileEntryLoader
Parameters:
url - URL object

load

public Entry load(java.io.BufferedInputStream bufferedInputStream)
Loads an EntrySet from a BufferedInputStream.

Parameters:
bufferedInputStream - input stream
Returns:

getDataType

public int getDataType()
Specified by:
getDataType in interface EntryLoader