package yi.iu.imgdb.learn;

import yi.util.io.*;
import java.util.*;

/**
 * To describe a list of object.  If the name is made of several words, then
 * a "_" is used to replace the empty space
 */

public class ObjectDescriptor {
  public ObjectDescriptor() {
  }

  public static String[] parse(String obj_names, LinkedList default_obj_list) {

    // get the object names
    LinkedList obj_list = null;
    if (obj_names != null) {
      String obj_names_wspace = obj_names.replace('_', ' ');
      String[] objects = obj_names_wspace.split(",");
      return objects;
    } else {
      return yi.util.data.Conversion.toStringArray(default_obj_list);
    }
  }
}