Commits

petermr  committed f73e4ea

finished refactoring types

  • Participants
  • Parent commits 26d05a3

Comments (0)

Files changed (67)

File jumbo-converters-chemdraw/src/main/java/org/xmlcml/cml/converters/chemdraw/CDX2CMLConverter.java

 import org.xmlcml.cml.converters.AbstractConverter;
 import org.xmlcml.cml.converters.Converter;
 import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.cml.CMLCommon;
 
 public class CDX2CMLConverter extends AbstractConverter implements
 		Converter {
 		LOG.setLevel(Level.INFO);
 	}
 	
-	public Type getInputType() {
-		return Type.CDX;
-	}
-
-	public Type getOutputType() {
-		return Type.CML;
-	}
-
 	/**
 	 * converts a CDK object to CML. returns cml:cml/cml:molecule
 	 * 
 		return cdxml2CmlConverter.convertToXML(cdxml);
 	}
 
-	@Override
-	public String getRegistryInputType() {
-		return CDXCommon.REG_CDX;
+	public Type getInputType() {
+		return CDXCommon.CDX_TYPE;
 	}
 	
-	@Override
-	public String getRegistryOutputType() {
-		return CDXCommon.REG_CDX_CML;
+	public Type getOutputType() {
+		return CMLCommon.CML_TYPE;
 	}
 	
 	@Override

File jumbo-converters-chemdraw/src/main/java/org/xmlcml/cml/converters/chemdraw/CDXML2CMLConverter.java

 
 import nu.xom.Element;
 
-
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.xmlcml.cml.base.CMLElement;
 import org.xmlcml.cml.converters.AbstractConverter;
 import org.xmlcml.cml.converters.Converter;
 import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.cml.CMLCommon;
 
 public class CDXML2CMLConverter extends AbstractConverter implements
 		Converter {
 	private boolean rescale = false;
 	private boolean removeCDXAttributes = true;
 	
-	public Type getInputType() {
-		return Type.CDXML;
-	}
-
-	public Type getOutputType() {
-		return Type.CML;
-	}
-
 	/**
 	 * converts a CDXML object to CML. returns cml:cml
 	 * 
 		return cml;
 	}
 	
-	@Override
-	public String getRegistryInputType() {
-		return CDXCommon.REG_CDXML;
+	public Type getInputType() {
+		return CDXCommon.CDXML_TYPE;
 	}
 	
-	@Override
-	public String getRegistryOutputType() {
-		return CDXCommon.REG_CDX_CML;
+	public Type getOutputType() {
+		return CMLCommon.CML_TYPE;
 	}
 	
 	@Override

File jumbo-converters-cif/src/main/java/org/xmlcml/cml/converters/cif/CIF2CIFXMLConverter.java

 	public CIF2CIFXMLConverter() {
 	}
 	
-	public Type getInputType() {
-		return Type.CIF;
-	}
-
-	public Type getOutputType() {
-		return Type.XML;
-	}
-
 	/**
 	 * converts a CIF file (text) to CML. 
 	 * 
 		return cif;
 	}
 
-	@Override
-	public String getRegistryInputType() {
-		return CIFCommon.REG_CIF;
+	public Type getInputType() {
+		return CIFCommon.CIF_TYPE;
 	}
 	
-	@Override
-	public String getRegistryOutputType() {
-		return CIFCommon.REG_CIFXML;
+	public Type getOutputType() {
+		return CIFCommon.CIFXML_TYPE;
 	}
 	
 	@Override

File jumbo-converters-cif/src/main/java/org/xmlcml/cml/converters/cif/CIF2CMLConverter.java

 import org.xmlcml.cif.CIF;
 import org.xmlcml.cml.converters.AbstractConverter;
 import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.cml.CMLCommon;
 
 
 /** 
 	}
 
 	public Type getInputType() {
-		return Type.CIF;
-	}
-
-	public Type getOutputType() {
-		return Type.CML;
+		return CIFCommon.CIF_TYPE;
 	}
 	
-	@Override
-	public String getRegistryInputType() {
-		return CIFCommon.REG_CIF;
-	}
-	
-	@Override
-	public String getRegistryOutputType() {
-		return CIFCommon.REG_CIF_CML;
+	public Type getOutputType() {
+		return CMLCommon.CML_TYPE;
 	}
 	
 	@Override

File jumbo-converters-cif/src/main/java/org/xmlcml/cml/converters/cif/CIFCommon.java

 package org.xmlcml.cml.converters.cif;
 
+import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.Type.ObjectType;
+
 public class CIFCommon {
 	public static final String REG_CIF = "cif";
 	public static final String REG_CIFXML = "cifxml";
 	public static final String REG_CIF_RAW_CML = "cif-raw-cml";
 	public static final String REG_CIF_CML = "cif-cml";
+	
+	public static final Type CIF_TYPE = new Type("chemical/x-cif", ObjectType.TEXT, ".cif");
+	public static final Type CIFXML_TYPE = new Type("chemical/x-cifxml", ObjectType.XML, ".cif.xml");
+	public static final Type CIF_RAW_CML_TYPE = new Type("chemical/x-cif-raw-xml", ObjectType.XML, ".cif.raw.xml");
 
 }

File jumbo-converters-cif/src/main/java/org/xmlcml/cml/converters/cif/CIFXML2CMLConverter.java

 import org.xmlcml.cml.base.CMLUtil;
 import org.xmlcml.cml.converters.AbstractConverter;
 import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.cml.CMLCommon;
 import org.xmlcml.cml.element.CMLArray;
 import org.xmlcml.cml.element.CMLAtom;
 import org.xmlcml.cml.element.CMLAtomArray;
 		this.converterOptions = converterOptions;
 	}
 
-	public Type getInputType() {
-		return Type.XML;
-	}
-
-	public Type getOutputType() {
-		return Type.CML;
-	}
-
 	/**
 	 * converts a CIFXML object to CML. returns cml:cml/cml:molecule
 	 * 
 		target.appendChild(table);
 	}
 	
-	@Override
-	public String getRegistryInputType() {
-		return CIFCommon.REG_CIFXML;
+	public Type getInputType() {
+		return CIFCommon.CIFXML_TYPE;
 	}
 	
-	@Override
-	public String getRegistryOutputType() {
-		return CIFCommon.REG_CIF_CML;
+	public Type getOutputType() {
+		return CMLCommon.CML_TYPE;
 	}
 	
 	@Override

File jumbo-converters-cif/src/main/java/org/xmlcml/cml/converters/cif/RawCML2CompleteCMLConverter.java

 import org.xmlcml.cml.converters.cif.CIF2CMLUtils.CompoundClass;
 import org.xmlcml.cml.converters.cif.dict.CifDictionaryBuilder;
 import org.xmlcml.cml.converters.cif.dict.units.UnitDictionaries;
+import org.xmlcml.cml.converters.cml.CMLCommon;
 import org.xmlcml.cml.element.CMLAtom;
 import org.xmlcml.cml.element.CMLAtomArray;
 import org.xmlcml.cml.element.CMLBond;
     private CIFDictionary cifDict = CIFDictionary.getInstance();
 
 
-    public Type getInputType() {
-        return Type.CML;
-    }
-
-    public Type getOutputType() {
-        return Type.CML;
-    }
-
     /**
      * converts a CIF object to CML. returns cml:cml/cml:molecule
      *
         }
     }
 
-	@Override
-	public String getRegistryInputType() {
-		return CIFCommon.REG_CIF_RAW_CML;
+	public Type getInputType() {
+		return CIFCommon.CIF_RAW_CML_TYPE;
 	}
 	
-	@Override
-	public String getRegistryOutputType() {
-		return CIFCommon.REG_CIF_CML;
+	public Type getOutputType() {
+		return CMLCommon.CML_TYPE;
 	}
 	
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-common/src/main/java/org/xmlcml/cml/converters/compchem/input/CMLJob2CMLAbsJobConverter.java

 import org.xmlcml.cml.base.CMLElement;
 import org.xmlcml.cml.converters.AbstractConverter;
 import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.cml.CMLCommon;
 import org.xmlcml.cml.converters.cml.CMLSelector;
 import org.xmlcml.cml.element.CMLCml;
 import org.xmlcml.cml.element.CMLMolecule;
 	static {
 		LOG.setLevel(Level.INFO);
 	}
-	public Type getInputType() {
-		return Type.CML;
-	}
-
-	public Type getOutputType() {
-		return Type.CML;
-	}
-	
 	/**
 	 * converts a CML object to XYZ. assumes a single CMLMolecule as descendant
 	 * of root
 		return molecule;
 	}
 	
-	@Override
-	public String getRegistryInputType() {
-		return null;
+	public Type getInputType() {
+		return CMLCommon.CML_TYPE;
 	}
 	
-	@Override
-	public String getRegistryOutputType() {
-		return null;
+	public Type getOutputType() {
+		return CMLCommon.CML_TYPE;
 	}
 	
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-dalton/src/main/java/org/xmlcml/cml/converters/compchem/dalton/DaltonCommon.java

 package org.xmlcml.cml.converters.compchem.dalton;
 
+import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.Type.ObjectType;
+
 public class DaltonCommon {
 
 	public static final String DALTON_LOG = "dalton-log";
 	public static final String DALTON_XML = "dalton-xml";
+	
+	public static final Type LOG_TYPE = new Type("chemical/x-dalton-log", ObjectType.TEXT, ".log");
+	public static final Type LOG_XML_TYPE = new Type("chemical/x-dalton-log-xml", ObjectType.XML, ".log.xml");
 }

File jumbo-converters-compchem/jumbo-converters-compchem-dalton/src/main/java/org/xmlcml/cml/converters/compchem/dalton/log/DaltonLog2XMLConverter.java

 
 import nu.xom.Element;
 
+import org.xmlcml.cml.converters.Type;
 import org.xmlcml.cml.converters.compchem.CompchemText2XMLTemplateConverter;
 import org.xmlcml.cml.converters.compchem.dalton.DaltonCommon;
 
 //		converter.convert(in, out);
 	}
 	
-	@Override
-	public String getRegistryInputType() {
-		return DaltonCommon.DALTON_LOG;
+	public Type getInputType() {
+		return DaltonCommon.LOG_TYPE;
 	}
 	
-	@Override
-	public String getRegistryOutputType() {
-		return DaltonCommon.DALTON_XML;
+	public Type getOutputType() {
+		return DaltonCommon.LOG_XML_TYPE;
 	}
 	
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-dlpoly/src/main/java/org/xmlcml/cml/converters/compchem/dlpoly/DLPolyCommon.java

 package org.xmlcml.cml.converters.compchem.dlpoly;
 
+import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.Type.ObjectType;
+
 public class DLPolyCommon {
 
 	public static final String DLPOLY_MOL = "dlpoly-mol";
 	public static final String DLPOLY_LOG = "dlpoly-log";
 	public static final String DLPOLY_XML = "dlpoly-xml";
+	
+	public static final Type LOG_TYPE = new Type("chemical/x-dlpoly-log", ObjectType.TEXT, ".log");
+	public static final Type LOG_XML_TYPE = new Type("chemical/x-dlpoly-log-xml", ObjectType.XML, ".log.xml");
+	public static final Type MOL_TYPE = new Type("chemical/x-dlpoly-config", ObjectType.TEXT, ".config");
 }

File jumbo-converters-compchem/jumbo-converters-compchem-dlpoly/src/main/java/org/xmlcml/cml/converters/compchem/dlpoly/config/DLPolyConfig2CMLConverter.java

 	
 	public static final String DLPOLY_MOL_TO_CML_CONVERTER = "DLPoly Molecule to CML Converter";
 
-	public Type getInputType() {
-		return Type.MDL;
-	}
-
-	public Type getOutputType() {
-		return Type.CML;
-	}
-
 	public DLPolyConfig2CMLConverter() {
 		
 	}
 		
 	}
 		
-	@Override
-	public String getRegistryInputType() {
-		return DLPolyCommon.DLPOLY_MOL;
+	public Type getInputType() {
+		return DLPolyCommon.MOL_TYPE;
 	}
 
-	@Override
-	public String getRegistryOutputType() {
-		return CMLCommon.CML;
+	public Type getOutputType() {
+		return CMLCommon.CML_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-dlpoly/src/main/java/org/xmlcml/cml/converters/compchem/dlpoly/log/DLPolyLog2XMLConverter.java

 
 import nu.xom.Element;
 
+import org.xmlcml.cml.converters.Type;
 import org.xmlcml.cml.converters.compchem.CompchemText2XMLTemplateConverter;
 import org.xmlcml.cml.converters.compchem.dlpoly.DLPolyCommon;
 
 		CompchemText2XMLTemplateConverter converter = new DLPolyLog2XMLConverter();
 	}
 
-	@Override
-	public String getRegistryInputType() {
-		return DLPolyCommon.DLPOLY_LOG;
+	public Type getInputType() {
+		return DLPolyCommon.LOG_TYPE;
 	}
 
-	@Override
-	public String getRegistryOutputType() {
-		return DLPolyCommon.DLPOLY_XML;
+	public Type getOutputType() {
+		return DLPolyCommon.LOG_XML_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-dummy/src/main/java/org/xmlcml/cml/converters/compchem/dummy/DummyCommon.java

 package org.xmlcml.cml.converters.compchem.dummy;
 
+import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.Type.ObjectType;
+
 public class DummyCommon {
 
 	public static final String DUMMY_MOL = "dummy-mol";
 	public static final String DUMMY_LOG = "dummy-log";
 	public static final String DUMMY_XML = "dummy-xml";
+	
+	public static final Type LOG_TYPE = new Type("chemical/x-dummy-log", ObjectType.TEXT, ".log");
+	public static final Type LOG_XML_TYPE = new Type("chemical/x-dummy-log-xml", ObjectType.XML, ".log.xml");
+	public static final Type MOL_TYPE = new Type("chemical/x-dummy-mol", ObjectType.TEXT, ".mol");
 }

File jumbo-converters-compchem/jumbo-converters-compchem-dummy/src/main/java/org/xmlcml/cml/converters/compchem/dummy/log/DummyLog2XMLConverter.java

 
 import nu.xom.Element;
 
+import org.xmlcml.cml.converters.Type;
 import org.xmlcml.cml.converters.compchem.CompchemText2XMLTemplateConverter;
 import org.xmlcml.cml.converters.compchem.dummy.DummyCommon;
 
 		CompchemText2XMLTemplateConverter converter = new DummyLog2XMLConverter();
 	}
 
-	@Override
-	public String getRegistryInputType() {
-		return DummyCommon.DUMMY_LOG;
+	public Type getInputType() {
+		return DummyCommon.LOG_TYPE;
 	}
 
-	@Override
-	public String getRegistryOutputType() {
-		return DummyCommon.DUMMY_XML;
+	public Type getOutputType() {
+		return DummyCommon.LOG_XML_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-dummy/src/main/java/org/xmlcml/cml/converters/compchem/dummy/mol/DummyMol2CMLConverter.java

 		super();
 	}
 	
-	public Type getInputType() {
-		return Type.TXT;
-	}
-
-	public Type getOutputType() {
-		return Type.CML;
-	}
-
 	public static void main(String[] args) throws IOException {
 		AbstractConverter converter = new DummyMol2CMLConverter();
 	}
 		
 	}
 
-	@Override
-	public String getRegistryInputType() {
-		return DummyCommon.DUMMY_MOL;
+	public Type getInputType() {
+		return DummyCommon.MOL_TYPE;
 	}
 
-	@Override
-	public String getRegistryOutputType() {
-		return CMLCommon.CML;
+	public Type getOutputType() {
+		return CMLCommon.CML_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-gamessuk/src/main/java/org/xmlcml/cml/converters/compchem/gamessuk/GamessUKXCommon.java

 
 import org.apache.log4j.Logger;
 import org.xmlcml.cml.converters.AbstractCommon;
+import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.Type.ObjectType;
 
 /**
  * A collection of common objects such as namespaces, dictionaries used
 	public static final String PUNCH = "punch";
 	public static final String PUNCH_XML = "gamessuk_punch";
 	
+	public static final Type LOG_TYPE = new Type("chemical/x-gamessuk-log", ObjectType.TEXT, ".log");
+	public static final Type LOG_XML_TYPE = new Type("chemical/x-gamessuk-log-xml", ObjectType.XML, ".log.xml");
+	public static final Type PUNCH_TYPE = new Type("chemical/x-gamessuk-punch", ObjectType.TEXT, ".punch");
+	public static final Type PUNCH_XML_TYPE = new Type("chemical/x-gamessuk-punch-xml", ObjectType.XML, ".punch.xml");
+
+	
     protected String getDictionaryResource() {
     	return "org/xmlcml/cml/converters/compchem/gamessuk/gamessukDict.xml";
     }

File jumbo-converters-compchem/jumbo-converters-compchem-gamessuk/src/main/java/org/xmlcml/cml/converters/compchem/gamessuk/log/GamessUKXLog2XMLConverter.java

 
 import nu.xom.Element;
 
+import org.xmlcml.cml.converters.Type;
 import org.xmlcml.cml.converters.compchem.CompchemText2XMLTemplateConverter;
 import org.xmlcml.cml.converters.compchem.gamessuk.GamessUKXCommon;
 
 //		converter.convert(in, out);
 	}
 	
-	@Override
-	public String getRegistryInputType() {
-		return GamessUKXCommon.GAMESSUK_LOG;
+	public Type getInputType() {
+		return GamessUKXCommon.LOG_TYPE;
 	}
 	
-	@Override
-	public String getRegistryOutputType() {
-		return GamessUKXCommon.GAMESSUK_LOG_XML;
+	public Type getOutputType() {
+		return GamessUKXCommon.LOG_XML_TYPE;
 	}
 	
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-gamessuk/src/main/java/org/xmlcml/cml/converters/compchem/gamessuk/punch/GamessUKXPunchXML2CMLConverter.java

 	   return new GamessUKXCommon();
    }
 
-	public Type getInputType() {
-		return Type.XML;
-	}
-
-	public Type getOutputType() {
-		return Type.CML;
-	}
-
 	/**
 	 * converts an MDL object to CML. returns cml:cml/cml:molecule
 	 *
 		return cml;
 	}
 
-	@Override
-	public String getRegistryInputType() {
-		return GamessUKXCommon.PUNCH;
+	public Type getInputType() {
+		return GamessUKXCommon.PUNCH_TYPE;
 	}
 
-	@Override
-	public String getRegistryOutputType() {
-		return GamessUKXCommon.PUNCH_XML;
+	public Type getOutputType() {
+		return GamessUKXCommon.PUNCH_XML_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-gamessus/src/main/java/org/xmlcml/cml/converters/compchem/gamessus/GamessUSXCommon.java

 
 import org.apache.log4j.Logger;
 import org.xmlcml.cml.converters.AbstractCommon;
+import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.Type.ObjectType;
 
 /**
  * A collection of common objects such as namespaces, dictionaries used
 
 	public static final String PUNCH = "gamessus_punch";
 	public static final String PUNCH_XML = "gamessus_punch_xml";
+
+	public static final Type LOG_TYPE = new Type("chemical/x-gamessus-log", ObjectType.TEXT, ".log");
+	public static final Type LOG_XML_TYPE = new Type("chemical/x-gamessus-log-xml", ObjectType.XML, ".log.xml");
+	public static final Type PUNCH_TYPE = new Type("chemical/x-gamessus-punch", ObjectType.TEXT, ".punch");
+	public static final Type PUNCH_XML_TYPE = new Type("chemical/x-gamessus-punch-xml", ObjectType.XML, ".punch.xml");
+
 	
     protected String getDictionaryResource() {
     	return "org/xmlcml/cml/converters/compchem/gamessus/gamessusDict.xml";

File jumbo-converters-compchem/jumbo-converters-compchem-gamessus/src/main/java/org/xmlcml/cml/converters/compchem/gamessus/log/GamessUSXLog2XMLConverter.java

 
 import nu.xom.Element;
 
+import org.xmlcml.cml.converters.Type;
 import org.xmlcml.cml.converters.compchem.CompchemText2XMLTemplateConverter;
 import org.xmlcml.cml.converters.compchem.gamessus.GamessUSXCommon;
 
 //		converter.convert(in, out);
 	}
 	
-	@Override
-	public String getRegistryInputType() {
-		return GamessUSXCommon.GAMESSUS_LOG;
+	public Type getInputType() {
+		return GamessUSXCommon.LOG_TYPE;
 	}
 	
-	@Override
-	public String getRegistryOutputType() {
-		return GamessUSXCommon.GAMESSUS_LOG_XML;
+	public Type getOutputType() {
+		return GamessUSXCommon.LOG_XML_TYPE;
 	}
 	
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-gamessus/src/main/java/org/xmlcml/cml/converters/compchem/gamessus/log/GamessUSXLogXML2CMLConverter.java

 import org.apache.log4j.Logger;
 import org.xmlcml.cml.converters.AbstractCommon;
 import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.cml.CMLCommon;
 import org.xmlcml.cml.converters.compchem.AbstractCompchem2CMLConverter;
 import org.xmlcml.cml.converters.compchem.gamessus.GamessUSXCommon;
 import org.xmlcml.cml.converters.compchem.gamessus.punch.GamessUSPunchXMLProcessor;
 		return new GamessUSXCommon();
 	}
 
-	public Type getInputType() {
-		return Type.XML;
-	}
-
-	public Type getOutputType() {
-		return Type.CML;
-	}
-
 	/**
 	 * @param xml
 	 */
 		return convert(xml);
 	}
 
-	@Override
-	public String getRegistryInputType() {
-		return GamessUSXCommon.GAMESSUS_LOG_XML;
+	public Type getInputType() {
+		return GamessUSXCommon.LOG_XML_TYPE;
 	}
 	
-	@Override
-	public String getRegistryOutputType() {
-		return GamessUSXCommon.GAMESSUS_LOG_CML;
+	public Type getOutputType() {
+		return CMLCommon.CML_TYPE;
 	}
 	
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-gamessus/src/main/java/org/xmlcml/cml/converters/compchem/gamessus/punch/GamessUSPunchXML2CMLConverter.java

 		return new GamessUSXCommon();
 	}
 
-	public Type getInputType() {
-		return Type.XML;
-	}
-
-	public Type getOutputType() {
-		return Type.CML;
-	}
-
 	/**
 	 * @param xml
 	 */
 		return convert(xml);
 	}
 
-	@Override
-	public String getRegistryInputType() {
-		return GamessUSXCommon.PUNCH;
+	public Type getInputType() {
+		return GamessUSXCommon.PUNCH_TYPE;
 	}
 
 	@Override
-	public String getRegistryOutputType() {
-		return GamessUSXCommon.PUNCH_XML;
+	public Type getOutputType() {
+		return GamessUSXCommon.PUNCH_XML_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-gaussian/src/main/java/org/xmlcml/cml/converters/compchem/gaussian/GaussianCommon.java

 package org.xmlcml.cml.converters.compchem.gaussian;
 
 import org.xmlcml.cml.converters.AbstractCommon;
+import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.Outputter.OutputLevel;
+import org.xmlcml.cml.converters.Type.ObjectType;
 
 /**
  * A collection of common objects such as namespaces, dictionaries used
 	public static final String LOG_XML = "gaussian_log_xml";
 	public static final String LOG_CML = "gaussian_log_compchem";
 	
+	public static final Type ARCHIVE_TYPE = new Type("chemical/x-gaussian-arc", ObjectType.TEXT, ".arc");
+	public static final Type ARCHIVE_XML_TYPE = new Type("chemical/x-gaussian-arc-xml", ObjectType.XML, ".arc.xml");
+	public static final Type INPUT_TYPE = new Type("chemical/x-gaussian-inp", ObjectType.TEXT, ".inp");
+	public static final Type LOG_TYPE = new Type("chemical/x-gaussian-log", ObjectType.TEXT, ".log");
+	public static final Type LOG_XML_TYPE = new Type("chemical/x-gaussian-log-xml", ObjectType.XML, ".log.xml");
+
+	
     protected String getDictionaryResource() {
     	return "org/xmlcml/cml/converters/compchem/gaussian/gaussianDictionary.xml";
     }

File jumbo-converters-compchem/jumbo-converters-compchem-gaussian/src/main/java/org/xmlcml/cml/converters/compchem/gaussian/archive/GaussianArchiveXML2CMLConverter.java

 import org.apache.log4j.Logger;
 import org.xmlcml.cml.converters.AbstractCommon;
 import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.cml.CMLCommon;
 import org.xmlcml.cml.converters.compchem.AbstractCompchem2CMLConverter;
 import org.xmlcml.cml.converters.compchem.gaussian.GaussianCommon;
 
    protected AbstractCommon getCommon() {
 	   return new GaussianCommon();
    }
-	public Type getInputType() {
-		return Type.XML;
-	}
-
-	public Type getOutputType() {
-		return Type.CML;
-	}
-
 	/**
 	 * @param xml
 	 */
 		return convert(xml);
 	}
 
-	@Override
-	public String getRegistryInputType() {
-		return GaussianCommon.ARCHIVE_XML;
+	public Type getInputType() {
+		return GaussianCommon.ARCHIVE_XML_TYPE;
 	}
 
-	@Override
-	public String getRegistryOutputType() {
-		return GaussianCommon.ARCHIVE_CML;
+	public Type getOutputType() {
+		return CMLCommon.CML_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-gaussian/src/main/java/org/xmlcml/cml/converters/compchem/gaussian/input/CML2GaussianInputConverter.java

    protected AbstractCommon getCommon() {
 	   return new GaussianCommon();
    }
-   public Type getInputType() {
-      return Type.CML;
-   }
-
-   public Type getOutputType() {
-      return Type.GAU_IN;
-   }
-
    /**
     * converts an MDL object to CML. returns cml:cml/cml:molecule
     *
       this.controlFile = controlFile;
    }
 
-	@Override
-	public String getRegistryInputType() {
-		return CMLCommon.CML;
-
+	public Type getInputType() {
+		return CMLCommon.CML_TYPE;
 	}
 
-	@Override
-	public String getRegistryOutputType() {
-		return GaussianCommon.INPUT;
+	public Type getOutputType() {
+		return GaussianCommon.INPUT_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-gaussian/src/main/java/org/xmlcml/cml/converters/compchem/gaussian/log/GaussianLog2CompchemConverter.java

 import org.apache.log4j.Logger;
 import org.xmlcml.cml.converters.AbstractConverter;
 import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.cml.CMLCommon;
 import org.xmlcml.cml.converters.compchem.gaussian.GaussianCommon;
 
 public class GaussianLog2CompchemConverter extends AbstractConverter {
     	return new GaussianLog2CompchemConverter(999);
     }
 
-    public Type getInputType() {
-    	return logConverter.getInputType();
-    }
-
-    public Type getOutputType() {
-    	return xmlConverter.getOutputType();
-    }
-
     private void ensureLogConverter() {
     	if (logConverter == null) {
     		logConverter = GaussianLog2XMLConverter.createDefaultConverter();
 		}
 	}
 
-	@Override
-	public String getRegistryInputType() {
-		return GaussianCommon.LOG;
+	public Type getInputType() {
+		return GaussianCommon.LOG_TYPE;
 	}
 
-	@Override
-	public String getRegistryOutputType() {
-		return GaussianCommon.LOG_CML;
+	public Type getOutputType() {
+		return CMLCommon.CML_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-gaussian/src/main/java/org/xmlcml/cml/converters/compchem/gaussian/log/GaussianLog2XMLConverter.java

 import nu.xom.Element;
 
 import org.apache.log4j.Logger;
+import org.xmlcml.cml.converters.Type;
 import org.xmlcml.cml.converters.compchem.CompchemText2XMLTemplateConverter;
 import org.xmlcml.cml.converters.compchem.gaussian.GaussianCommon;
 import org.xmlcml.cml.converters.util.ConverterUtils;
 		}
 	}
 	
-	@Override
-	public String getRegistryInputType() {
-		return GaussianCommon.LOG;
+	public Type getInputType() {
+		return GaussianCommon.LOG_TYPE;
 	}
 
-	@Override
-	public String getRegistryOutputType() {
-		return GaussianCommon.LOG_XML;
+	public Type getOutputType() {
+		return GaussianCommon.LOG_XML_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-gaussian/src/main/java/org/xmlcml/cml/converters/compchem/gaussian/log/GaussianLogXML2CompchemConverter.java

 import nu.xom.Element;
 
 import org.apache.log4j.Logger;
+import org.xmlcml.cml.converters.Type;
 import org.xmlcml.cml.converters.XML2XMLConverter;
+import org.xmlcml.cml.converters.cml.CMLCommon;
 import org.xmlcml.cml.converters.compchem.gaussian.GaussianCommon;
 import org.xmlcml.cml.converters.text.XML2XMLTransformConverter;
 import org.xmlcml.cml.converters.util.ConverterUtils;
         }
     }
     
-	@Override
-	public String getRegistryInputType() {
-		return GaussianCommon.LOG_XML;
+	public Type getInputType() {
+		return GaussianCommon.LOG_XML_TYPE;
 	}
 
-	@Override
-	public String getRegistryOutputType() {
-		return GaussianCommon.LOG_CML;
+	public Type getOutputType() {
+		return CMLCommon.CML_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-jaguar/src/main/java/org/xmlcml/cml/converters/compchem/jaguar/JaguarCommon.java

 package org.xmlcml.cml.converters.compchem.jaguar;
 
 import org.xmlcml.cml.converters.AbstractCommon;
+import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.Type.ObjectType;
 
 /**
  * A collection of common objects such as namespaces, dictionaries used
 	public static final String LOG_XML = "jaguar_log_xml";
 	public static final String LOG_CML = "jaguar_log_compchem";
 
+	public static final Type LOG_TYPE = new Type("chemical/x-jaguar-log", ObjectType.TEXT, ".log");
+	public static final Type LOG_XML_TYPE = new Type("chemical/x-jaguar-log-xml", ObjectType.XML, ".log.xml");
+
     protected String getDictionaryResource() {
     	return "org/xmlcml/cml/converters/compchem/jaguar/jaguarDictionary.xml";
     }

File jumbo-converters-compchem/jumbo-converters-compchem-jaguar/src/main/java/org/xmlcml/cml/converters/compchem/jaguar/log/JaguarLog2XMLConverter.java

 import nu.xom.Element;
 
 import org.apache.log4j.Logger;
+import org.xmlcml.cml.converters.Type;
 import org.xmlcml.cml.converters.compchem.CompchemText2XMLTemplateConverter;
 import org.xmlcml.cml.converters.compchem.jaguar.JaguarCommon;
 import org.xmlcml.cml.converters.util.ConverterUtils;
 		}
 	}
 	
-	@Override
-	public String getRegistryInputType() {
-		return JaguarCommon.LOG;
+	public Type getInputType() {
+		return JaguarCommon.LOG_TYPE;
 	}
 
-	@Override
-	public String getRegistryOutputType() {
-		return JaguarCommon.LOG_XML;
+	public Type getOutputType() {
+		return JaguarCommon.LOG_XML_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-molcas/src/main/java/org/xmlcml/cml/converters/compchem/molcas/MolcasCommon.java

 package org.xmlcml.cml.converters.compchem.molcas;
 
 import org.xmlcml.cml.converters.AbstractCommon;
+import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.Type.ObjectType;
 
 /**
  * A collection of common objects such as namespaces, dictionaries used
 	public static final String LOG_XML = "molcas_log_xml";
 	public static final String LOG_CML = "molcas_log_compchem";
 
+	public static final Type LOG_TYPE = new Type("chemical/x-molcas-log", ObjectType.TEXT, ".log");
+	public static final Type LOG_XML_TYPE = new Type("chemical/x-molcas-log-xml", ObjectType.XML, ".log.xml");
+	
     protected String getDictionaryResource() {
     	return "org/xmlcml/cml/converters/compchem/molcas/molcasDictionary.xml";
     }

File jumbo-converters-compchem/jumbo-converters-compchem-molcas/src/main/java/org/xmlcml/cml/converters/compchem/molcas/log/MolcasLog2XMLConverter.java

 
 import nu.xom.Element;
 
+import org.xmlcml.cml.converters.Type;
 import org.xmlcml.cml.converters.compchem.CompchemText2XMLTemplateConverter;
 import org.xmlcml.cml.converters.compchem.molcas.MolcasCommon;
 
 //		converter.convert(in, out);
 	}
 	
-	@Override
-	public String getRegistryInputType() {
-		return MolcasCommon.LOG;
+	public Type getInputType() {
+		return MolcasCommon.LOG_TYPE;
 	}
 
-	@Override
-	public String getRegistryOutputType() {
-		return MolcasCommon.LOG_XML;
+	public Type getOutputType() {
+		return MolcasCommon.LOG_XML_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-mopac/src/main/java/org/xmlcml/cml/converters/compchem/mopac/MopacCommon.java

 package org.xmlcml.cml.converters.compchem.mopac;
 
 import org.xmlcml.cml.converters.AbstractCommon;
+import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.Type.ObjectType;
 
 /**
  * A collection of common objects such as namespaces, dictionaries used
 	public static final String AUX = "mopac_aux";
 	public static final String XML = "mopac_xml";
 
+	public static final Type AUX_TYPE = new Type("chemical/x-mopac-aux", ObjectType.TEXT, ".aux");
+	public static final Type AUX_XML_TYPE = new Type("chemical/x-mopac-aux-xml", ObjectType.XML, ".aux.xml");
+
     protected String getDictionaryResource() {
     	return "org/xmlcml/cml/converters/compchem/mopac/mopacDictionary.xml";
     }

File jumbo-converters-compchem/jumbo-converters-compchem-mopac/src/main/java/org/xmlcml/cml/converters/compchem/mopac/auxx/MopacAux2XMLConverter.java

 
 import nu.xom.Element;
 
+import org.xmlcml.cml.converters.Type;
 import org.xmlcml.cml.converters.compchem.CompchemText2XMLTemplateConverter;
 import org.xmlcml.cml.converters.compchem.mopac.MopacCommon;
 
 //		File out = new File("test-out.xml");
 //		converter.convert(in, out);
 	}
-	@Override
-	public String getRegistryInputType() {
-		return MopacCommon.AUX;
+	public Type getInputType() {
+		return MopacCommon.AUX_TYPE;
 	}
 
 	@Override
-	public String getRegistryOutputType() {
-		return MopacCommon.XML;
+	public Type getOutputType() {
+		return MopacCommon.AUX_XML_TYPE;
 	}
 
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-nwchem/src/main/java/org/xmlcml/cml/converters/compchem/nwchem/log/NWChemLogXML2CompchemConverter.java

 package org.xmlcml.cml.converters.compchem.nwchem.log;
 
 import java.io.File;
+
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 //		JumboTestUtils.assertEqualsCanonically(title, refNode, testNode, true);
 	}
 	
-	@Override
 	public Type getInputType() {
 		return NWChemCommon.LOG_XML_TYPE;
 	}
 	
-	@Override
 	public Type getOutputType() {
 		return CMLCommon.CML_TYPE;
 	}

File jumbo-converters-compchem/jumbo-converters-compchem-qespresso/src/main/java/org/xmlcml/cml/converters/compchem/qespresso/QespressoCommon.java

 package org.xmlcml.cml.converters.compchem.qespresso;
 
 import org.xmlcml.cml.converters.AbstractCommon;
+import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.Type.ObjectType;
 
 /**
  * A collection of common objects such as namespaces, dictionaries used
  * @author pm286
  *
  */
-public class QespressoCommon extends AbstractCommon {
+public class QEspressoCommon extends AbstractCommon {
 
 	private static final String QE_PREFIX = "qespresso";
 	private static final String QE_URI = "http://wwmm.ch.cam.ac.uk/dict/qespresso";
 
 	public static final String LOG = "qespresso_logfile";
+	
+	public static final Type LOG_TYPE = new Type("chemical/x-qespresso-log", ObjectType.TEXT, ".log");
+	public static final Type LOG_XML_TYPE = new Type("chemical/x-qespresso-log-xml", ObjectType.XML, ".log.xml");
 
     protected String getDictionaryResource() {
     	return "org/xmlcml/cml/converters/compchem/qespresso/qespressoDict.xml";

File jumbo-converters-compchem/jumbo-converters-compchem-qespresso/src/main/java/org/xmlcml/cml/converters/compchem/qespresso/log/QEspressoCommon.java

-package org.xmlcml.cml.converters.compchem.qespresso.log;
-
-public class QEspressoCommon {
-
-	public static final String LOG = "qespresso_log";
-	public static final String XML = "qespresso_xml";
-
-}

File jumbo-converters-compchem/jumbo-converters-compchem-qespresso/src/main/java/org/xmlcml/cml/converters/compchem/qespresso/log/QuantumEspressoLog2XMLConverter.java

 
 import nu.xom.Element;
 
+import org.xmlcml.cml.converters.Type;
 import org.xmlcml.cml.converters.compchem.CompchemText2XMLTemplateConverter;
+import org.xmlcml.cml.converters.compchem.qespresso.QEspressoCommon;
 
 public class QuantumEspressoLog2XMLConverter extends CompchemText2XMLTemplateConverter {
 	
 //		converter.convert(in, out);
 	}
 	
-	@Override
-	public String getRegistryInputType() {
-		return QEspressoCommon.LOG;
+	public Type getInputType() {
+		return QEspressoCommon.LOG_TYPE;
 	}
 	
-	@Override
-	public String getRegistryOutputType() {
-		return QEspressoCommon.XML;
+	public Type getOutputType() {
+		return QEspressoCommon.LOG_XML_TYPE;
 	}
 	
 	@Override

File jumbo-converters-compchem/jumbo-converters-compchem-turbomole/src/main/java/org/xmlcml/cml/converters/compchem/turbomole/TurbomoleCommon.java

 package org.xmlcml.cml.converters.compchem.turbomole;
 
 import org.xmlcml.cml.converters.AbstractCommon;
+import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.converters.Type.ObjectType;
 
 /**
  * A collection of common objects such as namespaces, dictionaries used
 	public static final String LOG_XML = "turbomole_log_xml";
 	public static final String LOG_CML = "turbomole_log_compchem";
 
+	public static final Type LOG_TYPE = new Type("chemical/x-turbomole-log", ObjectType.TEXT, ".log");
+	public static final Type LOG_XML_TYPE = new Type("chemical/x-tuebomole-log-xml", ObjectType.XML, ".log.xml");
+	
     protected String getDictionaryResource() {
     	return "org/xmlcml/cml/converters/compchem/turbomole/turbomoleDictionary.xml";
     }

File jumbo-converters-compchem/jumbo-converters-compchem-turbomole/src/main/java/org/xmlcml/cml/converters/compchem/turbomole/log/TurbomoleLog2XMLConverter.java

 
 import nu.xom.Element;
 
+import org.xmlcml.cml.converters.Type;
 import org.xmlcml.cml.converters.compchem.CompchemText2XMLTemplateConverter;
 import org.xmlcml.cml.converters.compchem.turbomole.TurbomoleCommon;
 
 //		converter.convert(in, out);
 	}
 	
-	@Override
-	public String getRegistryInputType() {
-		return TurbomoleCommon.LOG;
+	public Type getInputType() {
+		return TurbomoleCommon.LOG_TYPE;
 	}
 	
-	@Override
-	public String getRegistryOutputType() {
-		return TurbomoleCommon.LOG_XML;
+	public Type getOutputType() {
+		return TurbomoleCommon.LOG_XML_TYPE;
 	}
 	
 	@Override

File jumbo-converters-core/src/main/java/org/xmlcml/cml/converters/AbstractConverter.java

       return outputCMLLite;
    }
    
-	public String getRegistryInputType() {
-		   return "override getRegistryInputType in: "+this.getClass().getName();
-	}
-	
-	public String getRegistryOutputType() {
-		   return "override getRegistryOutputType in: "+this.getClass().getName();
-	}
+//	public String getRegistryInputType() {
+//		   return "override getRegistryInputType in: "+this.getClass().getName();
+//	}
+//	
+//	public String getRegistryOutputType() {
+//		   return "override getRegistryOutputType in: "+this.getClass().getName();
+//	}
 	
    public String getRegistryMessage() {
 	   return "override RegistryFoo in: "+this.getClass().getName();

File jumbo-converters-core/src/main/java/org/xmlcml/cml/converters/TransformConverter.java

 	}
 	
 	@Override
-	public String getRegistryInputType() {
+	public Type getInputType() {
 		return null;
 	}
 	
 	@Override
-	public String getRegistryOutputType() {
+	public Type getOutputType() {
 		return null;
 	}
 	

File jumbo-converters-core/src/main/java/org/xmlcml/cml/converters/cml/CML2CMLLiteConverter.java

 		LOG.setLevel(Level.INFO);
 	}
 	
-	public Type getInputType() {
-		return Type.CML;
-	}
-
-	public Type getOutputType() {
-		return Type.CML;
-	}
-
 	/**
 	 * converts a CML object to CMLLite. returns cml:cml
 	 * 
 		return cml;
 	}
 
-	@Override
-	public String getRegistryInputType() {
-		return null;
+	public Type getInputType() {
+		return CMLCommon.CML_TYPE;
 	}
 	
-	@Override
-	public String getRegistryOutputType() {
-		return null;
+	public Type getOutputType() {
+		return CMLCommon.CML_TYPE;