org.jmol.adapter.smarter
Class Resolver

java.lang.Object
  extended by org.jmol.adapter.smarter.Resolver

public class Resolver
extends java.lang.Object


Field Summary
(package private) static java.lang.String[] adfRecords
           
(package private) static java.lang.String[] cifRecords
           
private static java.lang.String classBase
           
private static java.lang.String CML_NAMESPACE_URI
           
(package private) static java.lang.String[][] containsRecords
           
(package private) static java.lang.String[] csfRecords
           
(package private) static java.lang.String[] cubeRecords
           
(package private) static java.lang.String[][] fileStartsWithRecords
           
(package private) static java.lang.String[] gamessUKRecords
           
(package private) static java.lang.String[] gamessUSRecords
           
(package private) static java.lang.String[] gaussianRecords
           
(package private) static java.lang.String[] ghemicalMMRecords
           
(package private) static java.lang.String[] hinRecords
           
(package private) static java.lang.String[] jaguarRecords
           
(package private) static int LEADER_CHAR_MAX
           
(package private) static java.lang.String[][] lineStartsWithRecords
           
(package private) static java.lang.String[] mdlRecords
           
(package private) static java.lang.String[] mol2Records
           
(package private) static java.lang.String[] moldenRecords
           
(package private) static java.lang.String[] mopacRecords
           
(package private) static java.lang.String[] nwchemRecords
           
(package private) static java.lang.String[] pdbRecords
           
(package private) static java.lang.String[] pqrRecords
           
(package private) static java.lang.String[] psiRecords
           
(package private) static java.lang.String[] qchemRecords
           
private static java.lang.String[] readerSets
           
(package private) static java.lang.String[] shelxRecords
           
(package private) static java.lang.String[] spartanBinaryRecords
           
(package private) static java.lang.String[] spartanRecords
           
(package private) static java.lang.String[] spartanSmolRecords
           
static int SPECIAL_ARGUS_DOM
           
static int SPECIAL_ARGUS_XML
           
static int SPECIAL_CHEM3D_DOM
           
static int SPECIAL_CHEM3D_XML
           
static int SPECIAL_CML_DOM
           
static int SPECIAL_CML_XML
           
(package private) static int SPECIAL_CUBE
           
(package private) static int SPECIAL_FOLDINGXYZ
           
(package private) static int SPECIAL_JME
           
(package private) static int SPECIAL_MOL
           
static int SPECIAL_MOLPRO_DOM
           
static int SPECIAL_MOLPRO_XML
           
(package private) static int SPECIAL_MOPACGRAPHF
           
(package private) static int SPECIAL_ODYSSEY
           
static int SPECIAL_ODYSSEY_DOM
           
static int SPECIAL_ODYSSEY_XML
           
(package private) static int SPECIAL_V3000
           
(package private) static int SPECIAL_XYZ
           
static java.lang.String[][] specialTags
           
private static java.lang.String[] uicrcifContainsRecords
           
(package private) static java.lang.String[] webmoRecords
           
(package private) static java.lang.String[] xmlRecords
           
 
Constructor Summary
Resolver()
           
 
Method Summary
private static boolean checkCube(java.lang.String[] lines)
           
private static boolean checkFoldingXyz(java.lang.String[] lines)
           
private static boolean checkMol(java.lang.String[] lines)
           
private static boolean checkMopacGraphf(java.lang.String[] lines)
           
private static boolean checkOdyssey(java.lang.String[] lines)
           
(package private) static java.lang.String checkSpecial(int nLines, java.lang.String[] lines)
           
private static java.lang.String checkType(java.lang.String[][] typeTags, java.lang.String type)
           
private static boolean checkV3000(java.lang.String[] lines)
           
private static boolean checkXyz(java.lang.String[] lines)
           
(package private) static java.lang.String determineAtomSetCollectionReader(java.io.BufferedReader bufferedReader, boolean returnLines)
           
(package private) static java.lang.Object DOMResolve(java.lang.Object DOMNode)
           
(package private) static java.lang.Object finalize(AtomSetCollection atomSetCollection, java.lang.String filename)
           
(package private) static java.lang.String getFileType(java.io.BufferedReader br)
           
private static java.lang.String getReaderClassBase(java.lang.String type)
           
static java.lang.String getReaderFromType(java.lang.String type)
           
private static java.lang.String getXmlType(netscape.javascript.JSObject DOMNode)
           
private static java.lang.String getXmlType(java.lang.String header)
           
(package private) static java.lang.Object resolve(java.lang.String name, java.lang.String type, java.io.BufferedReader bufferedReader)
           
(package private) static java.lang.Object resolve(java.lang.String fullName, java.lang.String type, java.io.BufferedReader bufferedReader, java.util.Hashtable htParams)
           
static java.lang.String[] specialLoad(java.lang.String name, java.lang.String type)
          In the case of spt files, no need to load them; here we are just checking for type In the case of .spardir directories, we need to provide a list of the critical files that need loading and concatenation for the SpartanSmolReader we return an array for which: [0] file type (class prefix) or null for SPT file [1] header to add for each BEGIN/END block [2...] files to load and concatenate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classBase

private static final java.lang.String classBase
See Also:
Constant Field Values

readerSets

private static final java.lang.String[] readerSets

CML_NAMESPACE_URI

private static final java.lang.String CML_NAMESPACE_URI
See Also:
Constant Field Values

SPECIAL_JME

static final int SPECIAL_JME
See Also:
Constant Field Values

SPECIAL_MOPACGRAPHF

static final int SPECIAL_MOPACGRAPHF
See Also:
Constant Field Values

SPECIAL_V3000

static final int SPECIAL_V3000
See Also:
Constant Field Values

SPECIAL_ODYSSEY

static final int SPECIAL_ODYSSEY
See Also:
Constant Field Values

SPECIAL_MOL

static final int SPECIAL_MOL
See Also:
Constant Field Values

SPECIAL_XYZ

static final int SPECIAL_XYZ
See Also:
Constant Field Values

SPECIAL_FOLDINGXYZ

static final int SPECIAL_FOLDINGXYZ
See Also:
Constant Field Values

SPECIAL_CUBE

static final int SPECIAL_CUBE
See Also:
Constant Field Values

SPECIAL_ARGUS_XML

public static final int SPECIAL_ARGUS_XML
See Also:
Constant Field Values

SPECIAL_CML_XML

public static final int SPECIAL_CML_XML
See Also:
Constant Field Values

SPECIAL_CHEM3D_XML

public static final int SPECIAL_CHEM3D_XML
See Also:
Constant Field Values

SPECIAL_MOLPRO_XML

public static final int SPECIAL_MOLPRO_XML
See Also:
Constant Field Values

SPECIAL_ODYSSEY_XML

public static final int SPECIAL_ODYSSEY_XML
See Also:
Constant Field Values

SPECIAL_ARGUS_DOM

public static final int SPECIAL_ARGUS_DOM
See Also:
Constant Field Values

SPECIAL_CML_DOM

public static final int SPECIAL_CML_DOM
See Also:
Constant Field Values

SPECIAL_CHEM3D_DOM

public static final int SPECIAL_CHEM3D_DOM
See Also:
Constant Field Values

SPECIAL_MOLPRO_DOM

public static final int SPECIAL_MOLPRO_DOM
See Also:
Constant Field Values

SPECIAL_ODYSSEY_DOM

public static final int SPECIAL_ODYSSEY_DOM
See Also:
Constant Field Values

specialTags

public static final java.lang.String[][] specialTags

LEADER_CHAR_MAX

static final int LEADER_CHAR_MAX
See Also:
Constant Field Values

cubeRecords

static final java.lang.String[] cubeRecords

mol2Records

static final java.lang.String[] mol2Records

webmoRecords

static final java.lang.String[] webmoRecords

moldenRecords

static final java.lang.String[] moldenRecords

fileStartsWithRecords

static final java.lang.String[][] fileStartsWithRecords

pqrRecords

static final java.lang.String[] pqrRecords

pdbRecords

static final java.lang.String[] pdbRecords

shelxRecords

static final java.lang.String[] shelxRecords

cifRecords

static final java.lang.String[] cifRecords

ghemicalMMRecords

static final java.lang.String[] ghemicalMMRecords

jaguarRecords

static final java.lang.String[] jaguarRecords

hinRecords

static final java.lang.String[] hinRecords

mdlRecords

static final java.lang.String[] mdlRecords

spartanSmolRecords

static final java.lang.String[] spartanSmolRecords

csfRecords

static final java.lang.String[] csfRecords

lineStartsWithRecords

static final java.lang.String[][] lineStartsWithRecords

xmlRecords

static final java.lang.String[] xmlRecords

gaussianRecords

static final java.lang.String[] gaussianRecords

mopacRecords

static final java.lang.String[] mopacRecords

qchemRecords

static final java.lang.String[] qchemRecords

gamessUKRecords

static final java.lang.String[] gamessUKRecords

gamessUSRecords

static final java.lang.String[] gamessUSRecords

spartanBinaryRecords

static final java.lang.String[] spartanBinaryRecords

spartanRecords

static final java.lang.String[] spartanRecords

adfRecords

static final java.lang.String[] adfRecords

psiRecords

static final java.lang.String[] psiRecords

nwchemRecords

static final java.lang.String[] nwchemRecords

uicrcifContainsRecords

private static final java.lang.String[] uicrcifContainsRecords

containsRecords

static final java.lang.String[][] containsRecords
Constructor Detail

Resolver

public Resolver()
Method Detail

getReaderClassBase

private static final java.lang.String getReaderClassBase(java.lang.String type)

getFileType

static java.lang.String getFileType(java.io.BufferedReader br)

specialLoad

public static java.lang.String[] specialLoad(java.lang.String name,
                                             java.lang.String type)
In the case of spt files, no need to load them; here we are just checking for type In the case of .spardir directories, we need to provide a list of the critical files that need loading and concatenation for the SpartanSmolReader we return an array for which: [0] file type (class prefix) or null for SPT file [1] header to add for each BEGIN/END block [2...] files to load and concatenate

Parameters:
name -
type -
Returns:
array detailing action for this set of files

resolve

static java.lang.Object resolve(java.lang.String name,
                                java.lang.String type,
                                java.io.BufferedReader bufferedReader)
                         throws java.lang.Exception
Throws:
java.lang.Exception

resolve

static java.lang.Object resolve(java.lang.String fullName,
                                java.lang.String type,
                                java.io.BufferedReader bufferedReader,
                                java.util.Hashtable htParams)
                         throws java.lang.Exception
Throws:
java.lang.Exception

DOMResolve

static java.lang.Object DOMResolve(java.lang.Object DOMNode)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getXmlType

private static java.lang.String getXmlType(netscape.javascript.JSObject DOMNode)

finalize

static java.lang.Object finalize(AtomSetCollection atomSetCollection,
                                 java.lang.String filename)

determineAtomSetCollectionReader

static java.lang.String determineAtomSetCollectionReader(java.io.BufferedReader bufferedReader,
                                                         boolean returnLines)
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

getXmlType

private static java.lang.String getXmlType(java.lang.String header)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

checkSpecial

static final java.lang.String checkSpecial(int nLines,
                                           java.lang.String[] lines)

getReaderFromType

public static final java.lang.String getReaderFromType(java.lang.String type)

checkType

private static final java.lang.String checkType(java.lang.String[][] typeTags,
                                                java.lang.String type)

checkOdyssey

private static boolean checkOdyssey(java.lang.String[] lines)

checkV3000

private static boolean checkV3000(java.lang.String[] lines)

checkMol

private static boolean checkMol(java.lang.String[] lines)

checkXyz

private static boolean checkXyz(java.lang.String[] lines)

checkFoldingXyz

private static boolean checkFoldingXyz(java.lang.String[] lines)
Parameters:
lines - First lines of the files.
Returns:
Indicates if the file may be a Folding@Home file.

checkMopacGraphf

private static boolean checkMopacGraphf(java.lang.String[] lines)
Parameters:
lines - First lines of the files.
Returns:
Indicates if the file is a Mopac GRAPHF output file.

checkCube

private static boolean checkCube(java.lang.String[] lines)