code: public boolean isRelated(Class<? extends ElementBase> sourceClass, Class<? extends ElementBase> targetClass) {
          return getCardinality(sourceClass, targetClass).maxOccurrences > 0;
      }
docs: Returns true if targetClass or a superclass of targetClass is related to sourceClass.
  
  @param sourceClass The primary class.
  @param targetClass The class to test.
  @return True if targetClass or a superclass of targetClass is related to sourceClass.