public boolean hasTag(System theSystem, String theTerm) { for (ResourceTag next : getTags()) { if (next.getTag().getSystem().equals(theSystem) && next.getTag().getCode().equals(theTerm)) { return true; } } return false; }
private static ResourceTag createResourceTag(Map<String, String> beanAttr) { if (beanAttr == null) return null; ResourceTag resourceTag = new ResourceTag(); resourceTag.setId(Integer.valueOf(beanAttr.get("id")).intValue()); resourceTag.setVoId(Integer.valueOf(beanAttr.get("voId")).intValue()); resourceTag.setTagName(BeansUtils.eraseEscaping(beanAttr.get("tagName"))); return resourceTag; }
public ResourceTag addTag(TagDefinition theTag) { ResourceTag tag = new ResourceTag(this, theTag); tag.setResourceType(getResourceType()); getTags().add(tag); return tag; }