예제 #1
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public static boolean compareDeep(Base e1, Base e2, boolean allowNull) {
   if (e1 == null && e2 == null && allowNull) return true;
   if (e1 == null || e2 == null) return false;
   if (e2.isMetadataBased()
       && !e1
           .isMetadataBased()) // respect existing order for debugging consistency; outcome must be
                               // the same either way
   return e2.equalsDeep(e1);
   else return e1.equalsDeep(e2);
 }
예제 #2
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public CodeableConcept castToCodeableConcept(Base b) throws FHIRException {
   if (b instanceof CodeableConcept) return (CodeableConcept) b;
   else if (b instanceof CodeType) {
     CodeableConcept cc = new CodeableConcept();
     cc.addCoding().setCode(((CodeType) b).asStringValue());
     return cc;
   } else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a CodeableConcept");
 }
예제 #3
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public SimpleQuantity castToSimpleQuantity(Base b) throws FHIRException {
   if (b instanceof SimpleQuantity) return (SimpleQuantity) b;
   else if (b instanceof Quantity) {
     Quantity q = (Quantity) b;
     SimpleQuantity sq = new SimpleQuantity();
     sq.setValueElement(q.getValueElement());
     sq.setComparatorElement(q.getComparatorElement());
     sq.setUnitElement(q.getUnitElement());
     sq.setSystemElement(q.getSystemElement());
     sq.setCodeElement(q.getCodeElement());
     return sq;
   } else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to an SimpleQuantity");
 }
예제 #4
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public DecimalType castToDecimal(Base b) throws FHIRException {
   if (b instanceof DecimalType) return (DecimalType) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Decimal");
 }
예제 #5
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Duration castToDuration(Base b) throws FHIRException {
   if (b instanceof Duration) return (Duration) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to an Duration");
 }
예제 #6
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public ContactPoint castToContactPoint(Base b) throws FHIRException {
   if (b instanceof ContactPoint) return (ContactPoint) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a ContactPoint");
 }
예제 #7
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public StringType castToString(Base b) throws FHIRException {
   if (b instanceof StringType) return (StringType) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a String");
 }
예제 #8
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public SampledData castToSampledData(Base b) throws FHIRException {
   if (b instanceof SampledData) return (SampledData) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a SampledData");
 }
예제 #9
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public HumanName castToHumanName(Base b) throws FHIRException {
   if (b instanceof HumanName) return (HumanName) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a HumanName");
 }
예제 #10
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public PositiveIntType castToPositiveInt(Base b) throws FHIRException {
   if (b instanceof PositiveIntType) return (PositiveIntType) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a PositiveInt");
 }
예제 #11
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public MarkdownType castToMarkdown(Base b) throws FHIRException {
   if (b instanceof MarkdownType) return (MarkdownType) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Markdown");
 }
예제 #12
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public IdType castToId(Base b) throws FHIRException {
   if (b instanceof IdType) return (IdType) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Id");
 }
예제 #13
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public UnsignedIntType castToUnsignedInt(Base b) throws FHIRException {
   if (b instanceof UnsignedIntType) return (UnsignedIntType) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a UnsignedInt");
 }
예제 #14
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public CodeType castToCode(Base b) throws FHIRException {
   if (b instanceof CodeType) return (CodeType) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Code");
 }
예제 #15
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public DateTimeType castToDateTime(Base b) throws FHIRException {
   if (b instanceof DateTimeType) return (DateTimeType) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a DateTime");
 }
예제 #16
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public UriType castToUri(Base b) throws FHIRException {
   if (b instanceof UriType) return (UriType) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Uri");
 }
예제 #17
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Period castToPeriod(Base b) throws FHIRException {
   if (b instanceof Period) return (Period) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Period");
 }
예제 #18
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Attachment castToAttachment(Base b) throws FHIRException {
   if (b instanceof Attachment) return (Attachment) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to an Attachment");
 }
예제 #19
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Ratio castToRatio(Base b) throws FHIRException {
   if (b instanceof Ratio) return (Ratio) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Ratio");
 }
예제 #20
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Identifier castToIdentifier(Base b) throws FHIRException {
   if (b instanceof Identifier) return (Identifier) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to an Identifier");
 }
예제 #21
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Signature castToSignature(Base b) throws FHIRException {
   if (b instanceof Signature) return (Signature) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Signature");
 }
예제 #22
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Meta castToMeta(Base b) throws FHIRException {
   if (b instanceof Meta) return (Meta) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Meta");
 }
예제 #23
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Address castToAddress(Base b) throws FHIRException {
   if (b instanceof Address) return (Address) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Address");
 }
예제 #24
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Narrative castToNarrative(Base b) throws FHIRException {
   if (b instanceof Narrative) return (Narrative) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Narrative");
 }
예제 #25
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Timing castToTiming(Base b) throws FHIRException {
   if (b instanceof Timing) return (Timing) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Timing");
 }
예제 #26
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Base64BinaryType castToBase64Binary(Base b) throws FHIRException {
   if (b instanceof Base64BinaryType) return (Base64BinaryType) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a Base64Binary");
 }
예제 #27
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Resource castToResource(Base b) throws FHIRException {
   if (b instanceof Resource) return (Resource) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Resource");
 }
예제 #28
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Quantity castToQuantity(Base b) throws FHIRException {
   if (b instanceof Quantity) return (Quantity) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to an Quantity");
 }
예제 #29
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public ElementDefinition castToElementDefinition(Base b) throws FHIRException {
   if (b instanceof ElementDefinition) return (ElementDefinition) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a ElementDefinition");
 }
예제 #30
0
파일: Base.java 프로젝트: hl7-fhir/fhir-svn
 public Money castToMoney(Base b) throws FHIRException {
   if (b instanceof Money) return (Money) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to an Money");
 }