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;
 }
Exemple #2
0
 /**
  * @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);
 }