public String[] getChildNames(String space) {
        System.out.println("Entra " + this.name + " " + this.children.size());
        ArrayList<String> names = new ArrayList<String>();
        if (this.name == null) {
            names.add("");
        } else {
            names.add(space + this.name);
        }

        for (Component child : children) {
            if (child.getClass() == Job.class) {
                System.out.println(child.getName());
                String[] temp = child.getChildNames(space + " ");
                for (int j = 0; j < temp.length; j++) {
                    names.add(temp[j]);
                }
            } else {
                if (child.getClass() == Task.class || child.getClass() == Action.class) {
                    System.out.println(child.getName());
                    names.add(space + " " + child.getName());
                }
            }
        }

        String[] strArray = new String[names.size()];
        names.toArray(strArray);
        return strArray;
    }