Package org.jmol.adapter.smarter
Class Resolver
java.lang.Object
org.jmol.adapter.smarter.Resolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
From SmarterJmolAdapter.getFileTypeName(Object ascOrReader) just return the file type with no exception issuesstatic String
getFileTypefromFilter
(String filter) static Object
Get a reader based on its name.static final String
getReaderClassBase
(String type)
-
Constructor Details
-
Resolver
public Resolver()
-
-
Method Details
-
getReaderClassBase
-
getFileType
From SmarterJmolAdapter.getFileTypeName(Object ascOrReader) just return the file type with no exception issues- Parameters:
br
-- Returns:
- String file type
-
getReader
Get a reader based on its name.- Parameters:
readerName
-htParams
-- Returns:
- AtomSetCollectionReader or error message
-
DOMResolve
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 Exceptionthe 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
-
getFileTypefromFilter
-
fixDOSName
-