sclass ConceptShadow { Map map; *(Concept c) { map = conceptShadow_rawMap(c); map = toSortedArrayBasedMap(mapValues convertValue(map)); } // legacy selfType convertRefsToIDs() { this; } O convertValue(O o) { if (o cast Concept.Ref) ret conceptIDObject(o!); if (o cast Concept.RefL) ret lmap conceptIDObject(o); if (o cast Concept) ret ConceptID(o); ret o; } toString { ret "ConceptShadow " + stringIf(refsConvertedToIDs, "[converted] ") + map; } O get(O key) { ret mapGet(map, key); } public bool equals(O o) { if (o cast ConceptShadow) ret eq(map, o.map); false; } long id() { ret toLong(get("id")); } }