# Class Resolver

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

public class Resolver extends Object

## Constructor Summary

Constructors
Constructor
Description
`Resolver()`

## Method Summary

Modifier and Type
Method
Description
`static boolean`
`checkBCIF(byte[] magic, boolean forCoord)`
`static String`
`determineAtomSetCollectionReader(Object readerOrDocument, Map<String,Object> htParams)`
the main resolver method.
`static Object`
`DOMResolve(Map<String,Object> htParams)`
a largely untested reader of the DOM - where in a browser there is model actually in XML format already present on the page.
`static String`
`fixDOSName(String fileName)`
`static String`
`getBinaryType(InputStream inputStream)`
`static String`
`getFileType(BufferedReader br)`
From SmarterJmolAdapter.getFileTypeName(Object ascOrReader) just return the file type with no exception issues
`static String`
`getFileTypefromFilter(String filter)`
`static Object`
`getReader(String readerName, Map<String,Object> htParams)`
Get a reader based on its name.
`static final String`
`getReaderClassBase(String type)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Resolver

public Resolver()

## Method Details

### getReaderClassBase

public static final String getReaderClassBase(String type)

### getFileType

public static String getFileType(BufferedReader br)
From SmarterJmolAdapter.getFileTypeName(Object ascOrReader) just return the file type with no exception issues

Parameters:
  `br` -
Returns:
  String file type

### getReader

public static Object getReader(String readerName, Map<String,Object> htParams)
Get a reader based on its name.

Parameters:
  `readerName` -
  `htParams` -
Returns:
  AtomSetCollectionReader or error message

### DOMResolve

public static Object DOMResolve(Map<String,Object> htParams) throws Exception
a largely untested reader of the DOM - where in a browser there is model actually in XML format already present on the page. -- Egon Willighagen

Parameters:
  `htParams` -
Returns:
  an AtomSetCollection or a String error
Throws:
  `Exception`

### determineAtomSetCollectionReader

public static String determineAtomSetCollectionReader(Object readerOrDocument, Map<String,Object> htParams) throws Exception
the main resolver method. One of the great advantages of Jmol is that it can smartly determine a file type from its contents. In cases where this is not possible, one can force a file type using a prefix to a filename. For example: load mol2::xxxx.whatever This is only necessary for a few file types, where only numbers are involved -- molecular dynamics coordinate files, for instance (mdcrd).

Parameters:
  `readerOrDocument` -
  `htParams` -
Returns:
  readerName or a few lines, if requested, or null
Throws:
  `Exception`

### getBinaryType

public static String getBinaryType(InputStream inputStream)

### checkBCIF

public static boolean checkBCIF(byte[] magic, boolean forCoord)

### getFileTypefromFilter

public static String getFileTypefromFilter(String filter)

### fixDOSName

public static String fixDOSName(String fileName)