Class Resolver
java.lang.Object
org.jmol.adapter.smarter.Resolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckBCIF(byte[] magic, boolean forCoord) static StringdetermineAtomSetCollectionReader(Object readerOrDocument, Map<String, Object> htParams) the main resolver method.static ObjectDOMResolve(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 StringfixDOSName(String fileName) static StringgetBinaryType(InputStream inputStream) static StringFrom SmarterJmolAdapter.getFileTypeName(Object ascOrReader) just return the file type with no exception issuesstatic StringgetFileTypefromFilter(String filter) static ObjectGet a reader based on its name.static final StringgetReaderClassBase(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
-
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
-
checkBCIF
public static boolean checkBCIF(byte[] magic, boolean forCoord) -
getFileTypefromFilter
-
fixDOSName
-