/* * BioJava development code * * This code may be freely distributed and modified under the * terms of the GNU Lesser General Public Licence. This should * be distributed with the code. If you do not have a copy, * see: * * http://www.gnu.org/copyleft/lesser.html * * Copyright for this code is held jointly by the individual * authors. These should be listed in @author doc comments. * * For more information on the BioJava project and its aims, * or to join the biojava-l mailing list, visit the home page * at: * * http://www.biojava.org/ * */ package nativeapps; import org.xml.sax.ContentHandler; import org.xml.sax.XMLReader; import org.xml.sax.SAXException; import java.util.*; import org.biojava.bio.program.sax.PdbSAXParser; import org.biojava.bio.program.xml.SimpleXMLEmitter; import org.biojava.bio.program.PdbToXMLConverter; /** * Blast2XML is an application for the conversion native output from * BLAST-like bioinformatics software into an XML format. For * currently supported bioinformatics programs, please see the * documentation for the BlastLikeSaxParser. *
* The XML produced should validate against the biojava * BlastLikeDataSetCollection DTD. * * Usage is:
* java Blast2XML <blastlike pathname> [-mode <strict|lazy>] ** -mode is optional paramater. Choosing strict mode will mean the * application throws exceptions if the precise version of a given * piece of bioinformatics software is not recognised. Lazy mode will * attempt to parse the file regardless of version number. *
* For programs currently supported, please see the documentation * for the BlastLikeSAXParser. *
* Copyright © 2000 Cambridge Antibody Technology. * *
* Primary author -
String[]
representation of a pathname
* @exception Exception if an error occurs
*/
public static void main(String[] args) throws Exception {
String oInput = null;
String oMode = null;
boolean tStrict = true;
// Catch wrong number of arguments or help requests
if ( ( (args.length != 1) &&
(args.length != 3) ) ||
(args[0].equals("-help")) ||
(args[0].equals("-h")) ) {
System.out.println();
System.out.println(
"Utility program to convert descriptions of macromolecular ");
System.out.println(
"structures in formats resembline PDB format ");
System.out.println(
"into an XML format that should validate correctly");
System.out.println(
"against the biojava MacromolecularStructureCollection DTD.");
System.out.println();
System.out.println ("Usage: java Pdb2XML " +
"[-mode