protected Meta toMeta(Collection<TagDefinition> tagDefinitions) { Meta retVal = new Meta(); for (TagDefinition next : tagDefinitions) { switch (next.getTagType()) { case PROFILE: retVal.addProfile(next.getCode()); break; case SECURITY_LABEL: retVal .addSecurity() .setSystem(next.getSystem()) .setCode(next.getCode()) .setDisplay(next.getDisplay()); break; case TAG: retVal .addTag() .setSystem(next.getSystem()) .setCode(next.getCode()) .setDisplay(next.getDisplay()); break; } } return retVal; }
/** * @return The first repetition of repeating field {@link #security}, creating it if it does not * already exist */ public Coding getSecurityFirstRep() { if (getSecurity().isEmpty()) { addSecurity(); } return getSecurity().get(0); }