use of org.hl7.fhir.dstu2.model.PrimitiveType in project org.hl7.fhir.core by hapifhir.
the class PrimitiveType method equalsShallow.
@Override
public boolean equalsShallow(Base obj) {
if (obj == null) {
return false;
}
if (!(obj.getClass() == getClass())) {
return false;
}
PrimitiveType<?> o = (PrimitiveType<?>) obj;
EqualsBuilder b = new EqualsBuilder();
b.append(getValue(), o.getValue());
return b.isEquals();
}
use of org.hl7.fhir.dstu2.model.PrimitiveType in project org.hl7.fhir.core by hapifhir.
the class PrimitiveType method equalsDeep.
@Override
public boolean equalsDeep(Base obj) {
if (!super.equalsDeep(obj))
return false;
if (obj == null) {
return false;
}
if (!(obj.getClass() == getClass())) {
return false;
}
PrimitiveType<?> o = (PrimitiveType<?>) obj;
EqualsBuilder b = new EqualsBuilder();
b.append(getValue(), o.getValue());
return b.isEquals();
}
use of org.hl7.fhir.dstu2.model.PrimitiveType in project org.hl7.fhir.core by hapifhir.
the class PrimitiveType method equalsDeep.
@Override
public boolean equalsDeep(Base obj) {
if (!super.equalsDeep(obj))
return false;
if (obj == null) {
return false;
}
if (!(obj.getClass() == getClass())) {
return false;
}
PrimitiveType<?> o = (PrimitiveType<?>) obj;
EqualsBuilder b = new EqualsBuilder();
b.append(getValue(), o.getValue());
return b.isEquals();
}
use of org.hl7.fhir.dstu2.model.PrimitiveType in project org.hl7.fhir.core by hapifhir.
the class PrimitiveType method equalsShallow.
@Override
public boolean equalsShallow(Base obj) {
if (obj == null) {
return false;
}
if (!(obj.getClass() == getClass())) {
return false;
}
PrimitiveType<?> o = (PrimitiveType<?>) obj;
EqualsBuilder b = new EqualsBuilder();
b.append(getValue(), o.getValue());
return b.isEquals();
}
use of org.hl7.fhir.dstu2.model.PrimitiveType in project org.hl7.fhir.core by hapifhir.
the class StructureMapUtilities method describeTransformCCorC.
@SuppressWarnings("rawtypes")
private String describeTransformCCorC(StructureMapGroupRuleTargetComponent tgt) throws FHIRException {
if (tgt.getParameter().size() < 2)
return null;
DataType p1 = tgt.getParameter().get(0).getValue();
DataType p2 = tgt.getParameter().get(1).getValue();
if (p1 instanceof IdType || p2 instanceof IdType)
return null;
if (!(p1 instanceof PrimitiveType) || !(p2 instanceof PrimitiveType))
return null;
String uri = ((PrimitiveType) p1).asStringValue();
String code = ((PrimitiveType) p2).asStringValue();
if (Utilities.noString(uri))
throw new FHIRException("Describe Transform, but the uri is blank");
if (Utilities.noString(code))
throw new FHIRException("Describe Transform, but the code is blank");
Coding c = buildCoding(uri, code);
return TerminologyRenderer.describeSystem(c.getSystem()) + "#" + c.getCode() + (c.hasDisplay() ? "(" + c.getDisplay() + ")" : "");
}
Aggregations