public StructureMap parse(String text, String srcName) throws FHIRException { FHIRLexer lexer = new FHIRLexer(text, srcName); if (lexer.done()) throw lexer.error("Map Input cannot be empty"); lexer.skipComments(); lexer.token("map"); StructureMap result = new StructureMap(); result.setUrl(lexer.readConstant("url")); lexer.token("="); result.setName(lexer.readConstant("name")); lexer.skipComments(); while (lexer.hasToken("conceptmap")) parseConceptMap(result, lexer); while (lexer.hasToken("uses")) parseUses(result, lexer); while (lexer.hasToken("imports")) parseImports(result, lexer); while (!lexer.done()) { parseGroup(result, lexer); } return result; }
org.hl7.fhir.r4.model.StructureMap tgt = new org.hl7.fhir.r4.model.StructureMap(); copyDomainResource(src, tgt); tgt.setUrl(src.getUrl()); if (src.hasVersion()) tgt.setVersion(src.getVersion());
public StructureMap parse(String text, String srcName) throws FHIRException { FHIRLexer lexer = new FHIRLexer(text, srcName); if (lexer.done()) throw lexer.error("Map Input cannot be empty"); lexer.skipComments(); lexer.token("map"); StructureMap result = new StructureMap(); result.setUrl(lexer.readConstant("url")); lexer.token("="); result.setName(lexer.readConstant("name")); lexer.skipComments(); while (lexer.hasToken("conceptmap")) parseConceptMap(result, lexer); while (lexer.hasToken("uses")) parseUses(result, lexer); while (lexer.hasToken("imports")) parseImports(result, lexer); while (!lexer.done()) { parseGroup(result, lexer); } return result; }
org.hl7.fhir.r4.model.StructureMap tgt = new org.hl7.fhir.r4.model.StructureMap(); copyDomainResource(src, tgt); tgt.setUrl(src.getUrl()); if (src.hasVersion()) tgt.setVersion(src.getVersion());