Class pmr.chemime.ChemTree
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.chemime.ChemTree
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----pmr.simplegraph.SimpleApplet
|
+----pmr.sgml.SGMLApplet
|
+----pmr.sgml.SGMLTree
|
+----pmr.cml.CMLTree
|
+----pmr.chemime.ChemTree
- public class ChemTree
- extends CMLTree
a superclass for all the ChemicalMIME objects
- Author:
- P.Murray-Rust, Copyright 1997
-
cmlIndex
-
-
docroot
-
-
headIndex
-
-
omitTable
-
-
title
-
-
titleIndex
-
-
ChemTree()
- create from an SGMLStream (either text/sgml or chemical/x-cml)
-
ChemTree(SGMLStream)
- create from an SGMLStream (either text/sgml or chemical/x-cml)
-
createTitle()
- and an optional title; I'm not sure this is a good idea for all cases.
-
createTree()
- all ChemTrees have a default root structure
-
getChemTree(String, String, StringList)
- returns a CMLTree from a file/URL.
-
getTreeName()
- return the tree name ("ChemTree")
-
init()
- when an applet
-
main(String[])
- this is only run when an application.
-
mimeViewer(String[], StringList)
- simple chemical/MIME viewer; takes input from filename if lines==null,
else uses lines
-
readObject(String, StringList)
- static routine to read a CMLTree as a Drawable object if possible.
-
showHelp()
- display Help
docroot
protected int docroot
title
protected String title
headIndex
protected int headIndex
titleIndex
protected int titleIndex
cmlIndex
protected int cmlIndex
omitTable
protected Hashtable omitTable
ChemTree
public ChemTree()
- create from an SGMLStream (either text/sgml or chemical/x-cml)
ChemTree
public ChemTree(SGMLStream sgmlStream) throws BadAttributeException, BadSGMLFileException
- create from an SGMLStream (either text/sgml or chemical/x-cml)
- Throws: BadAttributeException
- SGMLStream was corrupt
- Throws: BadSGMLFileException
- SGMLStream was corrupt
init
public void init()
- when an applet
- Overrides:
- init in class CMLTree
showHelp
public void showHelp()
- display Help
- Overrides:
- showHelp in class CMLTree
getTreeName
public String getTreeName()
- return the tree name ("ChemTree")
- Overrides:
- getTreeName in class SGMLTree
createTree
public void createTree()
- all ChemTrees have a default root structure
- Overrides:
- createTree in class SGMLApplet
createTitle
public void createTitle()
- and an optional title; I'm not sure this is a good idea for all cases.
readObject
public static DrawableX_Node readObject(String filename,
StringList lines)
- static routine to read a CMLTree as a Drawable object if possible. i.e.
it will navigate down the tree to find something useful to display. This
will be much better done with TEI navigation :-)
experimental!
getChemTree
public static ChemTree getChemTree(String filename,
String mime,
StringList lines) throws BadFileException, FileNotFoundException, IOException
- returns a CMLTree from a file/URL. Takes a MIME type; if this is
nulll or "", makes a guess; returns null if fails, without Exception
- Parameters:
- filename - reads inpu from filename
- mime - defines type of file (e.g. chemical/x-pdb)
- lines - if not null, provides file content instead of filename
- Throws: BadFileException
- cannot interpret file as given MIME type, or cannot guess
mimeViewer
public static void mimeViewer(String args[],
StringList lines)
- simple chemical/MIME viewer; takes input from filename if lines==null,
else uses lines
main
public static void main(String args[])
- this is only run when an application.
All Packages Class Hierarchy This Package Previous Next Index