/** * Obtains all the uids from the schema * * @param schema * @return Set of uids from this schema. Its a recursive call */ private Set<Long> getAllUids(LogicalSchema schema) { Set<Long> uids = new HashSet<Long>(); if (schema != null) { for (LogicalFieldSchema fieldSchema : schema.getFields()) { if ((fieldSchema.type == DataType.BAG || fieldSchema.type == DataType.TUPLE) && fieldSchema.schema != null) { uids.addAll(getAllUids(fieldSchema.schema)); } else { uids.add(fieldSchema.uid); } } } return uids; }