Hi as far as I can see currently jmol supports only predefined list of the protocols:
form FileManager source:
final String[] urlPrefixes = {"http:", "https:", "ftp:", "file:"};and it's used in the classifyName method
for (int i = 0; i < urlPrefixes.length; ++i) {
.....
}so if we want to use our custom protocol there is no way as to handle it by ourself and use loading model from the string
that's wasting memory I think (especially if models are huge)
I would like to have more flexible scheme when user can add/remove desirable protocols (urlPrefixes)
I don't think it's a big deal to do with your permission I can do that
currently I have to do something like that:
public synchronized void loadMolecule(URL url){
....
String urlString = url.toExternalForm();
boolean isCCProtocols = isURLCCProtocols(urlString);
if(isCCProtocols){
loadFileFromCCProtocols(urlString);
}else{
jMolViewer.openFile(urlString);
lastError = jMolViewer.getOpenFileError();
}
.....
}
BTW, that's why I can not use script command to load our filesthanks
Dmitry Markman
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Jmol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-developers
