Commit 1d0c3614 authored by R.W.Majeed's avatar R.W.Majeed
Browse files

resource type added, needs further work

parent 63459eee
......@@ -53,7 +53,7 @@ import de.sekmi.histream.ext.ExternalSourceType;
public class ObservationImpl implements Observation, Cloneable{
public static final String XML_NAMESPACE="";
package de.sekmi.histream.impl;
* #%L
* histream
* %%
* Copyright (C) 2013 - 2015 R.W.Majeed
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
import java.math.BigDecimal;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
* Resource value type. The value of this type indicates
* a reference to an external resource.
* TODO: how serialize this to i2b2?
* @author R.W.Majeed
public class ResourceValue extends AbstractValue{
protected static final String EMPTY_STRING = "";
private String value;
// TODO XMLAttributes namespace/ns, ...
public ResourceValue(){
this.value = EMPTY_STRING;
public ResourceValue(String reference){
this.value = reference;
public boolean equals(Object other){
if( !ResourceValue.class.equals(other.getClass()) )return false;
if( other == this )return true;
if( !equals((AbstractValue)other) )return false;
return value.equals(((ResourceValue)other).value);
public String getStringValue() {return value;}
public BigDecimal getNumericValue() {return null;}
@Override // TODO native resource type, implement i2b2 serialisation
public Type getType() {return Type.Text;}
public Operator getOperator() {return null;}
public BigDecimal getReferenceLow() {return null;}
public BigDecimal getReferenceHigh() {return null;}
......@@ -74,7 +74,13 @@
<fact concept="T:group:2">
<modifier code="T:mod:1"/>
<!-- TODO resource reference value type (e.g. reference to biomaterial id, image reference, etc.)
<fact concept="T:resource">
<value xsi:type="resource" ns="psn">234231xxx</value>
<modifier code="imgref"><value xsi:type="resource">msk23232l</value></modifier>
Markdown is supported
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