@Override public List<? extends IBaseCoding> getSecurity() { ArrayList<IBaseCoding> retVal = new ArrayList<IBaseCoding>(); List<BaseCodingDt> labelsList = ResourceMetadataKeyEnum.SECURITY_LABELS.get(BaseResource.this); if (labelsList == null) { return Collections.emptyList(); } for (BaseCodingDt next : labelsList) { retVal.add(asBaseCoding(next)); } return Collections.unmodifiableList(retVal); }
@Override public IBaseCoding getSecurity(String theSystem, String theCode) { for (BaseCodingDt next : ResourceMetadataKeyEnum.SECURITY_LABELS.get(BaseResource.this)) { if (theSystem.equals(next.getSystemElement().getValue()) && theCode.equals(next.getCodeElement().getValue())) { return asBaseCoding(next); } } return null; }
@Override public IBaseCoding addSecurity() { List<BaseCodingDt> tagList = ResourceMetadataKeyEnum.SECURITY_LABELS.get(BaseResource.this); if (tagList == null) { tagList = new ArrayList<BaseCodingDt>(); ResourceMetadataKeyEnum.SECURITY_LABELS.put(BaseResource.this, tagList); } CodingDt tag = new CodingDt(); tagList.add(tag); return asBaseCoding(tag); }