public void FetchSuperTypes(ExpandedNodeId nodeId)
{
// find the target node,
ILocalNode source = Find(nodeId) as ILocalNode;
if (source == null)
{
return;
}
// follow the tree.
ILocalNode subType = source;
while (subType != null)
{
ILocalNode superType = null;
IList<IReference> references = subType.References.Find(ReferenceTypeIds.HasSubtype, true, true, this);
if (references != null && references.Count > 0)
{
superType = Find(references[0].TargetId) as ILocalNode;
}
subType = superType;
}
}