code: public static OClass getCommonOClass(Iterator<ODocument> it) {
      	Set<OClass> candidates =  null;
      	OClass ret = null;
      	while(it.hasNext() && (candidates==null || !candidates.isEmpty())) {
      		ODocument doc = it.next();
      		OClass thisOClass = doc.getSchemaClass();
      		if(candidates==null){
      			candidates = new HashSet<OClass>();
      			candidates.add(thisOClass);
      			candidates.addAll(thisOClass.getAllSuperClasses());
      			ret = thisOClass;
      		}
      		else {
      			if(ret!=null && (ret.equals(thisOClass) || ret.isSuperClassOf(thisOClass))) continue;
      			else if(ret!=null && thisOClass.isSuperClassOf(ret)) {
      				ret = thisOClass;
      				candidates.clear();
      				candidates.add(ret);
      				candidates.addAll(ret.getAllSuperClasses());
      			}
      			else {
      				ret = null;
      				candidates.retainAll(thisOClass.getAllSuperClasses());
      			}
      		}
      	}
      	
      	if(ret==null && candidates!=null && !candidates.isEmpty()) {
      		ret = getDeepestOClass(candidates);
      	}
      	
      	return ret;
      }
docs: Returns common {@link OClass} for a set of documents
  @param it {@link Iterator} over {@link ODocument}s
  @return common {@link OClass} or null