}
public static Version getVersion(Capability cap, String attname) {
Object attval = cap.getAttributes().get(attname);
if (attval != null && !(attval instanceof Version)) {
attval = new Version(attval.toString());
cap.getAttributes().put(attname, attval);
}
return attval != null ? (Version) attval : Version.emptyVersion;
}