edu.sdsc.sirius.io
Class Mol2EntryLoader

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

public class Mol2EntryLoader
extends java.lang.Object
implements FileEntryLoader, java.io.Serializable

See Also:
Serialized Form

Constructor Summary
Mol2EntryLoader()
           
 
Method Summary
 boolean canLoad(java.io.File file)
          Returns true if the Entry can be read from the given File object.
 boolean canLoad(java.lang.String name)
          Returns true if the loader is capable of loading the structure, or false otherwise.
 boolean canLoad(java.net.URL url)
          Returns true if the Entry can be read from the given URL object.
 int getDataType()
           
 java.lang.String getLoaderName()
          Returns name of the loader.
 Entry load(java.io.File file, int number)
          Loads the Entry from a File object.
 Entry load(java.lang.String name, int number)
          Loads the Entry by file name.
 Entry load(java.net.URL url, int number)
          Loads the Entry from a URL object.
 Structure loadStructure(java.io.BufferedInputStream bufferedInputStream)
          Returns a reference to a Structure read from the given (uncompressed) InputStream.
 Structure loadStructure(java.io.File file)
          Returns a reference to a Structure read from the given File object.
 Structure loadStructure(java.net.URL url)
          Returns a reference to a Structure read from the given URL object.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mol2EntryLoader

public Mol2EntryLoader()
Method Detail

getLoaderName

public java.lang.String getLoaderName()
Returns name of the loader.

Specified by:
getLoaderName in interface EntryLoader

load

public Entry load(java.lang.String name,
                  int number)
Loads the Entry by file name.

Specified by:
load in interface EntryLoader

load

public Entry load(java.io.File file,
                  int number)
Loads the Entry from a File object.

Specified by:
load in interface FileEntryLoader

load

public Entry load(java.net.URL url,
                  int number)
Loads the Entry from a URL object.

Specified by:
load in interface FileEntryLoader

canLoad

public boolean canLoad(java.lang.String name)
Returns true if the loader is capable of loading the structure, or false otherwise. This enables higher-level code to be able to build a context sensative menu of only the loaders that can load a given structure name.

Specified by:
canLoad in interface EntryLoader

loadStructure

public Structure loadStructure(java.io.File file)
Returns a reference to a Structure read from the given File object.


canLoad

public boolean canLoad(java.io.File file)
Returns true if the Entry can be read from the given File object.

Specified by:
canLoad in interface FileEntryLoader

loadStructure

public Structure loadStructure(java.net.URL url)
Returns a reference to a Structure read from the given URL object.


canLoad

public boolean canLoad(java.net.URL url)
Returns true if the Entry can be read from the given URL object.

Specified by:
canLoad in interface FileEntryLoader

loadStructure

public Structure loadStructure(java.io.BufferedInputStream bufferedInputStream)
Returns a reference to a Structure read from the given (uncompressed) InputStream.


main

public static void main(java.lang.String[] args)

getDataType

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