private static void renderUses(StringBuilder b, StructureMap map) { for (StructureMapStructureComponent s : map.getStructure()) { b.append("uses \""); b.append(s.getUrl()); b.append("\" "); if (s.hasAlias()) { b.append("alias "); b.append(s.getAlias()); b.append(" "); } b.append("as "); b.append(s.getMode().toCode()); b.append("\r\n"); renderDoco(b, s.getDocumentation()); } if (map.hasStructure()) b.append("\r\n"); }
if (uses.getMode() == StructureMapModelMode.TARGET && uses.hasAlias() && tn.equals(uses.getAlias())) { tn = uses.getUrl(); break;
private String getActualType(StructureMap map, String statedType) throws FHIRException { // check the aliases for (StructureMapStructureComponent imp : map.getStructure()) { if (imp.hasAlias() && statedType.equals(imp.getAlias())) { StructureDefinition sd = worker.fetchResource(StructureDefinition.class, imp.getUrl()); if (sd == null) throw new FHIRException("Unable to resolve structure "+imp.getUrl()); return sd.getId(); // should be sd.getType(), but R2... } } return statedType; }
if (uses.getMode() == StructureMapModelMode.TARGET && uses.hasAlias() && tn.equals(uses.getAlias())) { tn = uses.getUrl(); break;
private boolean matchesType(StructureMap map, String actualType, String statedType) throws FHIRException { // check the aliases for (StructureMapStructureComponent imp : map.getStructure()) { if (imp.hasAlias() && statedType.equals(imp.getAlias())) { StructureDefinition sd = worker.fetchResource(StructureDefinition.class, imp.getUrl()); if (sd != null) statedType = sd.getType(); break; } } if (Utilities.isAbsoluteUrl(actualType)) { StructureDefinition sd = worker.fetchResource(StructureDefinition.class, actualType); if (sd != null) actualType = sd.getType(); } if (Utilities.isAbsoluteUrl(statedType)) { StructureDefinition sd = worker.fetchResource(StructureDefinition.class, statedType); if (sd != null) statedType = sd.getType(); } return actualType.equals(statedType); }
private static void renderUses(StringBuilder b, StructureMap map) { for (StructureMapStructureComponent s : map.getStructure()) { b.append("uses \""); b.append(s.getUrl()); b.append("\" "); if (s.hasAlias()) { b.append("alias "); b.append(s.getAlias()); b.append(" "); } b.append("as "); b.append(s.getMode().toCode()); b.append("\r\n"); renderDoco(b, s.getDocumentation()); } if (map.hasStructure()) b.append("\r\n"); }
private String getActualType(StructureMap map, String statedType) throws FHIRException { // check the aliases for (StructureMapStructureComponent imp : map.getStructure()) { if (imp.hasAlias() && statedType.equals(imp.getAlias())) { StructureDefinition sd = worker.fetchResource(StructureDefinition.class, imp.getUrl()); if (sd == null) throw new FHIRException("Unable to resolve structure "+imp.getUrl()); return sd.getId(); // should be sd.getType(), but R2... } } return statedType; }
private boolean matchesType(StructureMap map, String actualType, String statedType) throws FHIRException { // check the aliases for (StructureMapStructureComponent imp : map.getStructure()) { if (imp.hasAlias() && statedType.equals(imp.getAlias())) { StructureDefinition sd = worker.fetchResource(StructureDefinition.class, imp.getUrl()); if (sd != null) statedType = sd.getType(); break; } } if (Utilities.isAbsoluteUrl(actualType)) { StructureDefinition sd = worker.fetchResource(StructureDefinition.class, actualType); if (sd != null) actualType = sd.getType(); } if (Utilities.isAbsoluteUrl(statedType)) { StructureDefinition sd = worker.fetchResource(StructureDefinition.class, statedType); if (sd != null) statedType = sd.getType(); } return actualType.equals(statedType); }