1. petermr
  2. jumboconverters-react

Commits

petermr  committed 255f92b

cleaned poms

  • Participants
  • Parent commits 3049431
  • Branches default

Comments (0)

Files changed (2)

File pom.xml

View file
  • Ignore whitespace
 
    <artifactId>jc-reaction</artifactId>
    <name>jc-reaction</name>
+   <packaging>pom</packaging>
 
 	<repositories>
 	  <repository>
 	
    <dependencies>
         <dependency>
-            <groupId>${jumbo.groupId}</groupId>
-            <artifactId>jumbo</artifactId>
-            <version>${jumbo.version}</version>
+            <groupId>cml</groupId>
+            <artifactId>jc-top-core</artifactId>
+            <version>${project.version}</version>
         </dependency>
-      <dependency>
-         <groupId>cml</groupId>
-         <artifactId>jc-top-core</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-      <dependency>
-         <groupId>${cml.groupId}</groupId>
-         <artifactId>jumbo-units</artifactId>
-         <version>${jumbounits.version}</version>
-      </dependency>
 
-      <dependency>
-         <groupId>junit</groupId>
-         <artifactId>junit</artifactId>
-         <scope>test</scope>
-      </dependency>
-   </dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>cml</groupId>
+			<artifactId>jc-top-testutils</artifactId>
+            <version>${project.version}</version>
+			<scope>test</scope>
+		</dependency>
+    </dependencies>
 
 </project>

File src/main/java/org/xmlcml/cml/converters/reaction/ReactionTransformer.java

View file
  • Ignore whitespace
 package org.xmlcml.cml.converters.reaction;
 
 import static org.xmlcml.cml.base.CMLConstants.CML_XPATH;
-
 import static org.xmlcml.euclid.EuclidConstants.S_COMMA;
 import static org.xmlcml.euclid.EuclidConstants.S_EMPTY;
 import static org.xmlcml.euclid.EuclidConstants.S_SPACE;
 
+import java.sql.Time;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import org.apache.log4j.Logger;
 import org.xmlcml.cml.base.CMLElement;
 import org.xmlcml.cml.base.CMLElements;
-import org.xmlcml.cml.converters.AbstractConverter;
 import org.xmlcml.cml.element.CMLConditionList;
 import org.xmlcml.cml.element.CMLLabel;
 import org.xmlcml.cml.element.CMLMolecule;
 import org.xmlcml.cml.element.CMLScalar;
 import org.xmlcml.cml.element.CMLSubstance;
 import org.xmlcml.cml.element.CMLSubstanceList;
-import org.xmlcml.cml.units.Pressure;
-import org.xmlcml.cml.units.Quantity;
-import org.xmlcml.cml.units.Temperature;
-import org.xmlcml.cml.units.Time;
 import org.xmlcml.euclid.EuclidRuntimeException;
 import org.xmlcml.euclid.Real2Range;
 /**
 				if (addSolvent(v)) {
 					continue;
 				}
-				if (addTime(v)) {
-					continue;
-				}
-				if (addPressure(v)) {
-					continue;
-				}
+//				if (addTime(v)) {
+//					continue;
+//				}
+//				if (addPressure(v)) {
+//					continue;
+//				}
 				if (addReagent(v)) {
 					continue;
 				}
-				if (addTemperature(v)) {
-					continue;
-				}
+//				if (addTemperature(v)) {
+//					continue;
+//				}
 				if (addYield(v)) {
 					continue;
 				}
 		return isSolv;
 	}
 
-	/**
-	 * @param v
-	 * @param parameter
-	 * @param scalar
-	 * @return time
-	 * @throws RuntimeException
-	 */
-	private boolean addTime(String v) {
-		boolean foundTime = false;
-		Quantity t = Time.getTime(v);
-		if (t != null) {
-			CMLParameter parameter = new CMLParameter();
-			CMLScalar scalar = new CMLScalar();
-			scalar.setValue(t.getValue());
-			scalar.setUnits("units:"+t.getUnits().getId());
-			parameter.setRole("duration");
-			parameter.addScalar(scalar);
-			ensureConditionList();
-			conditionList.appendChild(parameter);
-			foundTime = true;
-		}
-		return foundTime;
-	}
+//	/**
+//	 * @param v
+//	 * @param parameter
+//	 * @param scalar
+//	 * @return time
+//	 * @throws RuntimeException
+//	 */
+//	private boolean addTime(String v) {
+//		boolean foundTime = false;
+//		Quantity t = Time.getTime(v);
+//		if (t != null) {
+//			CMLParameter parameter = new CMLParameter();
+//			CMLScalar scalar = new CMLScalar();
+//			scalar.setValue(t.getValue());
+//			scalar.setUnits("units:"+t.getUnits().getId());
+//			parameter.setRole("duration");
+//			parameter.addScalar(scalar);
+//			ensureConditionList();
+//			conditionList.appendChild(parameter);
+//			foundTime = true;
+//		}
+//		return foundTime;
+//	}
 
-	/**
-	 * @param v
-	 * @param parameter
-	 * @param scalar
-	 * @return pressure
-	 * @throws RuntimeException
-	 */
-	private boolean addPressure(String v) {
-		boolean foundPressure = false;
-		Quantity p = Pressure.getPressure(v);
-		if (p != null) {
-			CMLParameter parameter = new CMLParameter();
-			CMLScalar scalar = new CMLScalar();
-			scalar.setValue(p.getValue());
-			scalar.setUnits("units:"+p.getUnits().getId());
-			parameter.setRole("pressure");
-			parameter.addScalar(scalar);
-			ensureConditionList();
-			conditionList.appendChild(parameter);
-			foundPressure = true;
-		}
-		return foundPressure;
-	}
+//	/**
+//	 * @param v
+//	 * @param parameter
+//	 * @param scalar
+//	 * @return pressure
+//	 * @throws RuntimeException
+//	 */
+//	private boolean addPressure(String v) {
+//		boolean foundPressure = false;
+//		Quantity p = Pressure.getPressure(v);
+//		if (p != null) {
+//			CMLParameter parameter = new CMLParameter();
+//			CMLScalar scalar = new CMLScalar();
+//			scalar.setValue(p.getValue());
+//			scalar.setUnits("units:"+p.getUnits().getId());
+//			parameter.setRole("pressure");
+//			parameter.addScalar(scalar);
+//			ensureConditionList();
+//			conditionList.appendChild(parameter);
+//			foundPressure = true;
+//		}
+//		return foundPressure;
+//	}
 
-	/**
-	 * @param v
-	 * @param parameter
-	 * @param scalar
-	 * @return temperature
-	 * @throws RuntimeException
-	 */
-	private boolean addTemperature(String v) {
-		boolean foundTemp = false;
-		Temperature t = Temperature.getTemperature(v);
-		if (t != null) {
-			CMLParameter parameter = new CMLParameter();
-			CMLScalar scalar = new CMLScalar();
-			scalar.setValue(t.getValue());
-			scalar.setUnits("units:"+t.getUnits().getId());
-			parameter.setRole("temperature");
-			parameter.addScalar(scalar);
-			ensureConditionList();
-			conditionList.appendChild(parameter);
-			foundTemp = true;
-		}
-		return foundTemp;
-	}
+//	/**
+//	 * @param v
+//	 * @param parameter
+//	 * @param scalar
+//	 * @return temperature
+//	 * @throws RuntimeException
+//	 */
+//	private boolean addTemperature(String v) {
+//		boolean foundTemp = false;
+//		Temperature t = Temperature.getTemperature(v);
+//		if (t != null) {
+//			CMLParameter parameter = new CMLParameter();
+//			CMLScalar scalar = new CMLScalar();
+//			scalar.setValue(t.getValue());
+//			scalar.setUnits("units:"+t.getUnits().getId());
+//			parameter.setRole("temperature");
+//			parameter.addScalar(scalar);
+//			ensureConditionList();
+//			conditionList.appendChild(parameter);
+//			foundTemp = true;
+//		}
+//		return foundTemp;
+//	}
 
 	/**
 	 * @param element