| 330 | } |
| 331 | |
| 332 | static String ShortenField(Object d) throws ExecException { |
| 333 | if (d instanceof Tuple) |
| 334 | return ShortenField((Tuple) d); |
| 335 | else if (d instanceof DataBag) |
| 336 | return ShortenField((DataBag) d); |
| 337 | else { |
| 338 | // System.out.println("Unrecognized data-type received!!!"); |
| 339 | // return null; |
| 340 | if (DataType.findTypeName(d) != null) { |
| 341 | if (d == null) |
| 342 | return ""; |
| 343 | else |
| 344 | return d.toString(); |
| 345 | } |
| 346 | } |
| 347 | System.out.println("Unrecognized data-type received!!!"); |
| 348 | return null; |
| 349 | } |
| 350 | |
| 351 | static String ShortenField(DataBag bag) throws ExecException { |
| 352 | StringBuffer str = new StringBuffer(); |