1 package com.disid.fiebdc3; 2 3 /** 4 * A {@link Measurement} measurement. 5 * 6 * @author DiSiD Team 7 */ 8 public class MeasurementLine { 9 10 Integer type; 11 12 String comment; 13 14 Float units; 15 16 Float length; 17 18 Float width; 19 20 Float height; 21 22 /** 23 * Spec definition:<br/> 24 * <i>/* TIPO: Indica el tipo de línea de medición de que se trate. 25 * Usualmente este subcampo estará vacío. Los tipos establecidos en esta 26 * VERSION son: '1': Subtotal parcial: En esta línea aparecerá el 27 * subtotal de las líneas anteriores desde el último subtotal hasta la 28 * línea inmediatamente anterior a ésta. '2': Subtotal acumulado: En 29 * esta línea aparecerá el subtotal de todas las líneas anteriores desde 30 * la primera hasta la línea inmediatamente anterior a ésta. '3': 31 * Expresión: Indicará que en el subcampo COMENTARIO aparecerá una 32 * expresión algebraica a evaluar. Se podrán utilizar los operadores 33 * '(', ')', '+', '-', '*', '/' y '^'; las variables 'a', 'b', 'c' y 'd' 34 * (que tendrán por valor las cantidades introducidas en los subcampos 35 * UNIDADES, LONGITUD, LATITUD y ALTURA respectivamente); y la constante 36 * 'p' para el valor Pi=3.1415926. Esta expresión será válida hasta la 37 * siguiente línea de medición en la que se defina otra expresión. Solo 38 * se evalúa la expresión y no se multiplica por las unidades. Las 39 * expresiones fórmulas utilizan los criterios definidos en el anexo 2. 40 * </i> 41 */ 42 public Integer getType() { 43 return type; 44 } 45 46 public void setType(Integer type) { 47 this.type = type; 48 } 49 50 /** 51 * Spec definition:<br/> 52 * <i>COMENTARIO: Texto en la línea de medición. Podrá ser un comentario 53 * o una expresión algebraica.</i> 54 */ 55 public String getComment() { 56 return comment; 57 } 58 59 public void setComment(String comment) { 60 this.comment = comment; 61 } 62 63 /** 64 * Spec definition:<br/> 65 * <i>UNIDADES, LONGITUD, LATITUD, ALTURA: Cuatro número reales con las 66 * mediciones. Si alguna magnitud no existe se dejará este campo 67 * vacío</i> 68 */ 69 public Float getUnits() { 70 return units; 71 } 72 73 public void setUnits(Float units) { 74 this.units = units; 75 } 76 77 /** 78 * Spec definition:<br/> 79 * <i>UNIDADES, LONGITUD, LATITUD, ALTURA: Cuatro número reales con las 80 * mediciones. Si alguna magnitud no existe se dejará este campo 81 * vacío</i> 82 */ 83 public Float getLength() { 84 return length; 85 } 86 87 public void setLength(Float length) { 88 this.length = length; 89 } 90 91 /** 92 * Spec definition:<br/> 93 * <i>UNIDADES, LONGITUD, LATITUD, ALTURA: Cuatro número reales con las 94 * mediciones. Si alguna magnitud no existe se dejará este campo 95 * vacío</i> 96 */ 97 public Float getWidth() { 98 return width; 99 } 100 101 public void setWidth(Float width) { 102 this.width = width; 103 } 104 105 /** 106 * Spec definition:<br/> 107 * <i>UNIDADES, LONGITUD, LATITUD, ALTURA: Cuatro número reales con las 108 * mediciones. Si alguna magnitud no existe se dejará este campo 109 * vacío</i> 110 */ 111 public Float getHeight() { 112 return height; 113 } 114 115 public void setHeight(Float height) { 116 this.height = height; 117 } 118 119 @Override 120 public String toString() { 121 return "Measurment {" + "Type: " + type + ", Comment: " + comment 122 + ", Units: " + units + ", Length: " + length + ", Width: " 123 + width + ", Height: " + height + "}"; 124 } 125 126 }