public List<JEVisClass> GetValidChildren() { List<JEVisClass> validParents = new List<>(); foreach (JEVisClassRelationship rel in GetRelationships()) { try { if (rel.IsRelationshipType(JEVisConstants.ClassRelationship.OK_PARENT) && rel.GetEnd().Equals(this)) { if (!validParents.Contains(rel.GetOtherClass(this))) { if (!validParents.Contains(rel.GetOtherClass(this))) { validParents.Add(rel.GetOtherClass(this)); } //We do not want heirs, every class has added by rule to have more control //validParents.addAll(rel.getOtherClass(this).getHeirs()); } } } catch (Exception ex) { logger.Error(string.Format("An JEClassRelationship had an error for '{0}': {1}", GetName(), ex)); } } //Special rule, for order purpose its allows to create on directory under him self. if (ds.getJEVisClass("Directory").getHeirs().contains(this) && !validParents.Contains(this)) { validParents.Add(this); } validParents.Sort(); return validParents; }
public JEVisClass GetJEVisClass() { return(ds.getJEVisClass(jclass)); }
public JEVisClass GetStart() { return(ds.getJEVisClass(json.GetStart)); }