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 @@
skos:notation "source2" ;
dwh:mapFact [
a dwh:MapRule ; # optional
dwh:condition "fact.value.value==1"^^dwh:ECMAScript ;
dwh:condition "fact.value.stringValue==1"^^dwh:ECMAScript ;
dwh:target :t2 ;
dwh:modify dwh:removeValue
] .
......
......@@ -341,7 +341,7 @@ public class I2b2Inserter extends AbstractObservationHandler implements Observat
// valtype_cd
insertFact.setString(8, "T");
// tval_char
insertFact.setString(9, v.getValue());
insertFact.setString(9, v.getStringValue());
// nval_num
insertFact.setBigDecimal(10, null);
// value_flag_cd
......
......@@ -36,7 +36,7 @@ public interface Value {
* String value. Numeric values will be converted to String.
* @return String value
*/
String getValue();
String getStringValue();
BigDecimal getNumericValue();
......
......@@ -28,7 +28,7 @@ public class StringValueEqualsEngine implements Engine {
if( fact.getValue() == null ){
return expression == null;
}else{
return fact.getValue().getValue().equals(expression);
return fact.getValue().getStringValue().equals(expression);
}
}
......
......@@ -79,7 +79,7 @@ public class NumericValue extends AbstractValue {
@Override
public String getValue() {return value.toString();}
public String getStringValue() {return value.toString();}
@Override
public BigDecimal getNumericValue() {return value;}
......
......@@ -54,7 +54,7 @@ public class StringValue extends AbstractValue{
}
@Override
public String getValue() {return value;}
public String getStringValue() {return value;}
@Override
public BigDecimal getNumericValue() {return null;}
......
......@@ -142,7 +142,7 @@ public class ObservationImplJAXBTest {
Assert.assertNotNull(m);
Assert.assertNotNull(m.getValue());
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 {
(Observation o) -> {
Assert.assertEquals("T:type:str", o.getConceptId());
Assert.assertEquals(Value.Type.Text, o.getValue().getType());
Assert.assertEquals("abc123", o.getValue().getValue());
Assert.assertEquals("abc123", o.getValue().getStringValue());
},
(Observation o) -> {
Assert.assertEquals("T:type:int", o.getConceptId());
......@@ -134,7 +134,7 @@ public class FileObservationProviderTest {
(Observation o) -> {
Assert.assertEquals("T:group:1", o.getConceptId());
Assert.assertEquals(Value.Type.Text, o.getValue().getType());
Assert.assertEquals("groupvalue", o.getValue().getValue());
Assert.assertEquals("groupvalue", o.getValue().getStringValue());
Assert.assertTrue(o.hasModifiers());
Iterator<? extends Modifier> e = o.getModifiers();
// TODO check modifier count
......@@ -146,7 +146,7 @@ public class FileObservationProviderTest {
m = o.getModifier("T:mod:2");
Assert.assertNotNull(m);
Assert.assertEquals(Value.Type.Text, m.getValue().getType());
Assert.assertEquals("def456", m.getValue().getValue());
Assert.assertEquals("def456", m.getValue().getStringValue());
Assert.assertTrue(e.hasNext());
m = o.getModifier("T:mod:3");
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