public ArchetypeReference getArchetypeReference() { ArchetypeInstantiationRuleLine airl = getArchetypeInstantiationRuleLine(); if (airl != null) { return airl.getArchetypeReference(); } else { return null; } }
public static String getDescription(ArchetypeInstantiationRuleLine airl) { if (airl != null) { ArchetypeReference ar = airl.getArchetypeReference(); if (ar != null) { return ar.getIdArchetype(); } } return "*UNKNOWN*"; }
public String getIdArchetype() { return getArchetypeReference().getIdArchetype(); }
public static String getName(ArchetypeInstantiationRuleLine airl, boolean withPredicate) { if (airl != null) { ArchetypeReference ar = airl.getArchetypeReference(); if (ar != null) { String name = ar.getIdArchetype(); if (withPredicate) { String predicateDesc = getShortPredicateDescription(airl); if (!predicateDesc.isEmpty()) { name = name + " (" + predicateDesc + ")"; } } return name; } } LoggerFactory.getLogger(ArchetypeReference.class).warn("Unknown name for AR '" + airl + "'"); return "*UNKNOWN*"; }
public static String getHTMLTooltip(ArchetypeInstantiationRuleLine airl) { ArchetypeReference ar = airl.getArchetypeReference(); if (ar != null) { String archetypeImageName = OpenEHRConstUI.getIconName(Archetypes.getEntryType(ar.getIdArchetype())); String archetypeName = getName(airl, false); return "<html><table width=500>" + "<tr><td><b>" + OpenEHRLanguageManager.getMessage("Archetype") + ": </b>" + OpenEHRImageUtil.getImgHTMLTag(archetypeImageName) + " " + archetypeName + "</td></tr>" + "<tr><td><b>" + OpenEHRLanguageManager.getMessage("Description") + ": </b>" + getDescription(airl) + "</td></tr>" + getHTMLPredicate(airl) + "</table></html>"; } else { return "*UNKNOWN*"; } } }