Commit 0ce50d26 authored by R.W.Majeed's avatar R.W.Majeed
Browse files

Value.getValue renamed to Value.getStringValue

parent f5cbff6a
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
skos:notation "source2" ; skos:notation "source2" ;
dwh:mapFact [ dwh:mapFact [
a dwh:MapRule ; # optional a dwh:MapRule ; # optional
dwh:condition "fact.value.value==1"^^dwh:ECMAScript ; dwh:condition "fact.value.stringValue==1"^^dwh:ECMAScript ;
dwh:target :t2 ; dwh:target :t2 ;
dwh:modify dwh:removeValue dwh:modify dwh:removeValue
] . ] .
......
...@@ -341,7 +341,7 @@ public class I2b2Inserter extends AbstractObservationHandler implements Observat ...@@ -341,7 +341,7 @@ public class I2b2Inserter extends AbstractObservationHandler implements Observat
// valtype_cd // valtype_cd
insertFact.setString(8, "T"); insertFact.setString(8, "T");
// tval_char // tval_char
insertFact.setString(9, v.getValue()); insertFact.setString(9, v.getStringValue());
// nval_num // nval_num
insertFact.setBigDecimal(10, null); insertFact.setBigDecimal(10, null);
// value_flag_cd // value_flag_cd
......
...@@ -36,7 +36,7 @@ public interface Value { ...@@ -36,7 +36,7 @@ public interface Value {
* String value. Numeric values will be converted to String. * String value. Numeric values will be converted to String.
* @return String value * @return String value
*/ */
String getValue(); String getStringValue();
BigDecimal getNumericValue(); BigDecimal getNumericValue();
......
...@@ -28,7 +28,7 @@ public class StringValueEqualsEngine implements Engine { ...@@ -28,7 +28,7 @@ public class StringValueEqualsEngine implements Engine {
if( fact.getValue() == null ){ if( fact.getValue() == null ){
return expression == null; return expression == null;
}else{ }else{
return fact.getValue().getValue().equals(expression); return fact.getValue().getStringValue().equals(expression);
} }
} }
......
...@@ -79,7 +79,7 @@ public class NumericValue extends AbstractValue { ...@@ -79,7 +79,7 @@ public class NumericValue extends AbstractValue {
@Override @Override
public String getValue() {return value.toString();} public String getStringValue() {return value.toString();}
@Override @Override
public BigDecimal getNumericValue() {return value;} public BigDecimal getNumericValue() {return value;}
......
...@@ -54,7 +54,7 @@ public class StringValue extends AbstractValue{ ...@@ -54,7 +54,7 @@ public class StringValue extends AbstractValue{
} }
@Override @Override
public String getValue() {return value;} public String getStringValue() {return value;}
@Override @Override
public BigDecimal getNumericValue() {return null;} public BigDecimal getNumericValue() {return null;}
......
...@@ -142,7 +142,7 @@ public class ObservationImplJAXBTest { ...@@ -142,7 +142,7 @@ public class ObservationImplJAXBTest {
Assert.assertNotNull(m); Assert.assertNotNull(m);
Assert.assertNotNull(m.getValue()); Assert.assertNotNull(m.getValue());
Assert.assertEquals(Value.Type.Text, m.getValue().getType()); Assert.assertEquals(Value.Type.Text, m.getValue().getType());
Assert.assertEquals("123", m.getValue().getValue()); Assert.assertEquals("123", m.getValue().getStringValue());
} }
} }
......
...@@ -103,7 +103,7 @@ public class FileObservationProviderTest { ...@@ -103,7 +103,7 @@ public class FileObservationProviderTest {
(Observation o) -> { (Observation o) -> {
Assert.assertEquals("T:type:str", o.getConceptId()); Assert.assertEquals("T:type:str", o.getConceptId());
Assert.assertEquals(Value.Type.Text, o.getValue().getType()); Assert.assertEquals(Value.Type.Text, o.getValue().getType());
Assert.assertEquals("abc123", o.getValue().getValue()); Assert.assertEquals("abc123", o.getValue().getStringValue());
}, },
(Observation o) -> { (Observation o) -> {
Assert.assertEquals("T:type:int", o.getConceptId()); Assert.assertEquals("T:type:int", o.getConceptId());
...@@ -134,7 +134,7 @@ public class FileObservationProviderTest { ...@@ -134,7 +134,7 @@ public class FileObservationProviderTest {
(Observation o) -> { (Observation o) -> {
Assert.assertEquals("T:group:1", o.getConceptId()); Assert.assertEquals("T:group:1", o.getConceptId());
Assert.assertEquals(Value.Type.Text, o.getValue().getType()); Assert.assertEquals(Value.Type.Text, o.getValue().getType());
Assert.assertEquals("groupvalue", o.getValue().getValue()); Assert.assertEquals("groupvalue", o.getValue().getStringValue());
Assert.assertTrue(o.hasModifiers()); Assert.assertTrue(o.hasModifiers());
Iterator<? extends Modifier> e = o.getModifiers(); Iterator<? extends Modifier> e = o.getModifiers();
// TODO check modifier count // TODO check modifier count
...@@ -146,7 +146,7 @@ public class FileObservationProviderTest { ...@@ -146,7 +146,7 @@ public class FileObservationProviderTest {
m = o.getModifier("T:mod:2"); m = o.getModifier("T:mod:2");
Assert.assertNotNull(m); Assert.assertNotNull(m);
Assert.assertEquals(Value.Type.Text, m.getValue().getType()); Assert.assertEquals(Value.Type.Text, m.getValue().getType());
Assert.assertEquals("def456", m.getValue().getValue()); Assert.assertEquals("def456", m.getValue().getStringValue());
Assert.assertTrue(e.hasNext()); Assert.assertTrue(e.hasNext());
m = o.getModifier("T:mod:3"); m = o.getModifier("T:mod:3");
Assert.assertNotNull(m); Assert.assertNotNull(m);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment