*/
public static Relation<String> guessObjectLabelRepresentation(Database database) throws NoSupportedDataTypeException {
try {
Relation<? extends LabelList> labelsrep = database.getRelation(TypeUtil.LABELLIST);
if(labelsrep != null) {
return new ConvertToStringView(labelsrep);
}
}
catch(NoSupportedDataTypeException e) {
// retry.
}
try {
Relation<String> stringrep = database.getRelation(TypeUtil.STRING);
if(stringrep != null) {
return stringrep;
}
}
catch(NoSupportedDataTypeException e) {
// retry.
}
try {
Relation<? extends ClassLabel> classrep = database.getRelation(TypeUtil.CLASSLABEL);
if(classrep != null) {
return new ConvertToStringView(classrep);
}
}
catch(NoSupportedDataTypeException e) {
// retry.
}