b.append(prefixesSrc.get(cg.getSource())); b.append(" = "); b.append(cg.getUnmapped().getMode().toCode()); b.append("\r\n");
@Override public Base addChild(String name) throws FHIRException { if (name.equals("source")) { throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.source"); } else if (name.equals("sourceVersion")) { throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.sourceVersion"); } else if (name.equals("target")) { throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.target"); } else if (name.equals("targetVersion")) { throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.targetVersion"); } else if (name.equals("element")) { return addElement(); } else if (name.equals("unmapped")) { this.unmapped = new ConceptMapGroupUnmappedComponent(); return this.unmapped; } else return super.addChild(name); }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("mode")) { value = new ConceptMapGroupUnmappedModeEnumFactory().fromType(castToCode(value)); this.mode = (Enumeration) value; // Enumeration<ConceptMapGroupUnmappedMode> } else if (name.equals("code")) { this.code = castToCode(value); // CodeType } else if (name.equals("display")) { this.display = castToString(value); // StringType } else if (name.equals("url")) { this.url = castToCanonical(value); // CanonicalType } else return super.setProperty(name, value); return value; }
b.append(prefixesSrc.get(cg.getSource())); b.append(" = "); b.append(cg.getUnmapped().getMode().toCode()); b.append("\r\n");
@Override public Base addChild(String name) throws FHIRException { if (name.equals("source")) { throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.source"); } else if (name.equals("sourceVersion")) { throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.sourceVersion"); } else if (name.equals("target")) { throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.target"); } else if (name.equals("targetVersion")) { throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.targetVersion"); } else if (name.equals("element")) { return addElement(); } else if (name.equals("unmapped")) { this.unmapped = new ConceptMapGroupUnmappedComponent(); return this.unmapped; } else return super.addChild(name); }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case 3357091: // mode value = new ConceptMapGroupUnmappedModeEnumFactory().fromType(castToCode(value)); this.mode = (Enumeration) value; // Enumeration<ConceptMapGroupUnmappedMode> return value; case 3059181: // code this.code = castToCode(value); // CodeType return value; case 1671764162: // display this.display = castToString(value); // StringType return value; case 116079: // url this.url = castToCanonical(value); // CanonicalType return value; default: return super.setProperty(hash, name, value); } }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("mode")) { value = new ConceptMapGroupUnmappedModeEnumFactory().fromType(castToCode(value)); this.mode = (Enumeration) value; // Enumeration<ConceptMapGroupUnmappedMode> } else if (name.equals("code")) { this.code = castToCode(value); // CodeType } else if (name.equals("display")) { this.display = castToString(value); // StringType } else if (name.equals("url")) { this.url = castToCanonical(value); // CanonicalType } else return super.setProperty(name, value); return value; }
public ConceptMapGroupComponent copy() { ConceptMapGroupComponent dst = new ConceptMapGroupComponent(); copyValues(dst); dst.source = source == null ? null : source.copy(); dst.sourceVersion = sourceVersion == null ? null : sourceVersion.copy(); dst.target = target == null ? null : target.copy(); dst.targetVersion = targetVersion == null ? null : targetVersion.copy(); if (element != null) { dst.element = new ArrayList<SourceElementComponent>(); for (SourceElementComponent i : element) dst.element.add(i.copy()); }; dst.unmapped = unmapped == null ? null : unmapped.copy(); return dst; }
/** * Returns the children of a given concept map to which the parent * may delegate mapped items. */ private static Set<String> getMapChildren(ConceptMap map) { return map.getGroup() .stream() .filter(group -> group.getUnmapped() != null && group.getUnmapped().getMode() == ConceptMapGroupUnmappedMode.OTHERMAP) .map(group -> group.getUnmapped().getUrl()) .collect(Collectors.toSet()); } }
/** * Returns the children of a given concept map to which the parent * may delegate mapped items. */ private static Set<String> getMapChildren(ConceptMap map) { return map.getGroup() .stream() .filter(group -> group.getUnmapped() != null && group.getUnmapped().getMode() == ConceptMapGroupUnmappedMode.OTHERMAP) .map(group -> group.getUnmapped().getUrl()) .collect(Collectors.toSet()); } }
@Override public boolean equalsDeep(Base other_) { if (!super.equalsDeep(other_)) return false; if (!(other_ instanceof ConceptMapGroupUnmappedComponent)) return false; ConceptMapGroupUnmappedComponent o = (ConceptMapGroupUnmappedComponent) other_; return compareDeep(mode, o.mode, true) && compareDeep(code, o.code, true) && compareDeep(display, o.display, true) && compareDeep(url, o.url, true); }
/** * @return {@link #unmapped} (What to do when there is no mapping for the source concept. "Unmapped" does not include codes that are unmatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched.) */ public ConceptMapGroupUnmappedComponent getUnmapped() { if (this.unmapped == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ConceptMapGroupComponent.unmapped"); else if (Configuration.doAutoCreate()) this.unmapped = new ConceptMapGroupUnmappedComponent(); // cc return this.unmapped; }
@Override public boolean equalsShallow(Base other_) { if (!super.equalsShallow(other_)) return false; if (!(other_ instanceof ConceptMapGroupUnmappedComponent)) return false; ConceptMapGroupUnmappedComponent o = (ConceptMapGroupUnmappedComponent) other_; return compareValues(mode, o.mode, true) && compareValues(code, o.code, true) && compareValues(display, o.display, true) ; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 3357091: return getModeElement(); case 3059181: return getCodeElement(); case 1671764162: return getDisplayElement(); case 116079: return getUrlElement(); default: return super.makeProperty(hash, name); } }
public ConceptMapGroupUnmappedComponent copy() { ConceptMapGroupUnmappedComponent dst = new ConceptMapGroupUnmappedComponent(); copyValues(dst); dst.mode = mode == null ? null : mode.copy(); dst.code = code == null ? null : code.copy(); dst.display = display == null ? null : display.copy(); dst.url = url == null ? null : url.copy(); return dst; }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case 3357091: // mode value = new ConceptMapGroupUnmappedModeEnumFactory().fromType(castToCode(value)); this.mode = (Enumeration) value; // Enumeration<ConceptMapGroupUnmappedMode> return value; case 3059181: // code this.code = castToCode(value); // CodeType return value; case 1671764162: // display this.display = castToString(value); // StringType return value; case 116079: // url this.url = castToCanonical(value); // CanonicalType return value; default: return super.setProperty(hash, name, value); } }
public ConceptMapGroupComponent copy() { ConceptMapGroupComponent dst = new ConceptMapGroupComponent(); copyValues(dst); dst.source = source == null ? null : source.copy(); dst.sourceVersion = sourceVersion == null ? null : sourceVersion.copy(); dst.target = target == null ? null : target.copy(); dst.targetVersion = targetVersion == null ? null : targetVersion.copy(); if (element != null) { dst.element = new ArrayList<SourceElementComponent>(); for (SourceElementComponent i : element) dst.element.add(i.copy()); }; dst.unmapped = unmapped == null ? null : unmapped.copy(); return dst; }
/** * @return {@link #unmapped} (What to do when there is no mapping for the source concept. "Unmapped" does not include codes that are unmatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched.) */ public ConceptMapGroupUnmappedComponent getUnmapped() { if (this.unmapped == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ConceptMapGroupComponent.unmapped"); else if (Configuration.doAutoCreate()) this.unmapped = new ConceptMapGroupUnmappedComponent(); // cc return this.unmapped; }
@Override public boolean equalsShallow(Base other_) { if (!super.equalsShallow(other_)) return false; if (!(other_ instanceof ConceptMapGroupUnmappedComponent)) return false; ConceptMapGroupUnmappedComponent o = (ConceptMapGroupUnmappedComponent) other_; return compareValues(mode, o.mode, true) && compareValues(code, o.code, true) && compareValues(display, o.display, true) ; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 3357091: return getModeElement(); case 3059181: return getCodeElement(); case 1671764162: return getDisplayElement(); case 116079: return getUrlElement(); default: return super.makeProperty(hash, name); } }