1 package edu.iris.Fissures.model;
2
3 /***
4 * <ul>
5 * <li> <b>IDL Source</b> "Fissures.idl"
6 * <li> <b>IDL Name</b> ::Fissures::Quantity
7 * <li> <b>Repository Id</b> IDL:edu.iris/Fissures/Quantity:1.0
8 * </ul>
9 * <b>IDL definition:</b>
10 * <pre>
11 * valuetype Quantity {
12 ...
13 };
14 * </pre>
15 */
16 public class QuantityValueFactory implements org.omg.CORBA.portable.ValueFactory {
17 public java.io.Serializable read_value (org.omg.CORBA_2_3.portable.InputStream is) {
18 java.io.Serializable val = QuantityImpl.createEmpty();
19
20 val = is.read_value(val);
21 QuantityImpl q = (QuantityImpl)val;
22 UnitImpl unit = q.getUnit();
23 if (unit.isConvertableTo(UnitImpl.SECOND)) {
24 val = new TimeInterval(q.getValue(),
25 unit);
26 }
27 return val;
28 }
29 }