// Path: app/src/main/java/org/pquery/dao/DownloadablePQ.java
// public class DownloadablePQ implements Parcelable, Serializable, PQListItem {
// 
//     private static final long serialVersionUID = -6540850109992510771L;
//     public String name;
//     public String size;
//     public String age;
//     public String waypoints;
//     public String url;
// 
//     public DownloadablePQ(Parcel in) {
//         name = in.readString();
//         size = in.readString();
//         age = in.readString();
//         waypoints = in.readString();
//         url = in.readString();
//     }
// 
//     public DownloadablePQ() {
//     }
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(name);
//         dest.writeString(size);
//         dest.writeString(age);
//         dest.writeString(waypoints);
//         dest.writeString(url);
//     }
// 
//     /**
//      * Implementing the Parcelable interface must also have a static field called CREATOR, which is an object
//      * implementing the Parcelable.Creator interface.
//      */
//     public static final Parcelable.Creator<DownloadablePQ> CREATOR = new Parcelable.Creator<DownloadablePQ>() {
//         public DownloadablePQ createFromParcel(Parcel in) {
//             return new DownloadablePQ(in);
//         }
// 
//         public DownloadablePQ[] newArray(int size) {
//             return new DownloadablePQ[size];
//         }
//     };
// 
//     @Override
//     public String getName() {
//         return name;
//     }
// 
// }
// 
// Path: app/src/main/java/org/pquery/dao/RepeatablePQ.java
// public class RepeatablePQ implements Parcelable, Serializable, PQListItem {
// 
//     private static final long serialVersionUID = -6540850109992510771L;
//     public String name;
//     public String waypoints;
//     private HashMap<Integer, Schedule> schedules = new HashMap<Integer, Schedule>();
// 
//     public RepeatablePQ(Parcel in) {
//         name = in.readString();
//         waypoints = in.readString();
//         schedules = in.readHashMap(ClassLoader.getSystemClassLoader());
//     }
// 
//     public RepeatablePQ() {
//     }
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(name);
//         dest.writeString(waypoints);
//         dest.writeMap(schedules);
// 
//     }
// 
//     /**
//      * Implementing the Parcelable interface must also have a static field called CREATOR, which is an object
//      * implementing the Parcelable.Creator interface.
//      */
//     public static final Creator<RepeatablePQ> CREATOR = new Creator<RepeatablePQ>() {
//         public RepeatablePQ createFromParcel(Parcel in) {
//             return new RepeatablePQ(in);
//         }
// 
//         public RepeatablePQ[] newArray(int size) {
//             return new RepeatablePQ[size];
//         }
//     };
// 
//     @Override
//     public String getName() {
//         return name;
//     }
// 
//     public List<Integer> getCheckedWeekdays() {
//         List<Integer> checkedWeekdays = new ArrayList<Integer>();
//         for (Schedule schedule : schedules.values()) {
//            if (schedule.isEnabled()) {
//                checkedWeekdays.add(schedule.getDay());
//            }
//         }
//         return checkedWeekdays;
//     }
// 
//     public void addScheduleURL(String url) {
//         UrlQuerySanitizer sanitizer = new UrlQuerySanitizer();
//         sanitizer.setAllowUnregisteredParamaters(true);
//         sanitizer.parseUrl(url);
//         String day = sanitizer.getValue("d");
//         String opt = sanitizer.getValue("opt");
//         Schedule schedule = new Schedule(url, Integer.valueOf(day), "0".equals(opt));
//         schedules.put(schedule.getDay(), schedule);
//     }
// 
//     public Map<Integer, Schedule> getSchedules() {
//         return schedules;
//     }
// 
//     public String getCheckedWeekdaysAsText(String[] weekdayNames) {
//         String weekdaysString = null;
//         for (Integer dayNumber : getCheckedWeekdays()) {
//             String dayName = weekdayNames[dayNumber];
//             if (weekdaysString == null) {
//                 weekdaysString = dayName;
//             } else {
//                 weekdaysString += ", " + dayName;
//             }
//         }
//         if (weekdaysString == null) {
//             weekdaysString = "-";
//         }
//         return weekdaysString;
//     }
// }


import net.htmlparser.jericho.Attribute;
import net.htmlparser.jericho.Element;
import net.htmlparser.jericho.HTMLElementName;
import net.htmlparser.jericho.Segment;
import net.htmlparser.jericho.Source;
import net.htmlparser.jericho.StartTag;
import org.pquery.dao.DownloadablePQ;
import org.pquery.dao.RepeatablePQ;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

package org.pquery.webdriver.parser;




public class PocketQueryPage {

    private Source parsedHtml;

    public PocketQueryPage(Source parsedHtml) {
        this.parsedHtml = parsedHtml;
    }

    /**
     * <thead><tr>
     * <tr id="ctl00_ContentBody_PQDownloadList_uxDownloadPQList_ctl01_trPQDownloadRow">
     * <tr class="TableFooter">
     *
     * @return
     * @throws ParseException
     */

// Path: app/src/main/java/org/pquery/dao/DownloadablePQ.java
// public class DownloadablePQ implements Parcelable, Serializable, PQListItem {
// 
//     private static final long serialVersionUID = -6540850109992510771L;
//     public String name;
//     public String size;
//     public String age;
//     public String waypoints;
//     public String url;
// 
//     public DownloadablePQ(Parcel in) {
//         name = in.readString();
//         size = in.readString();
//         age = in.readString();
//         waypoints = in.readString();
//         url = in.readString();
//     }
// 
//     public DownloadablePQ() {
//     }
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(name);
//         dest.writeString(size);
//         dest.writeString(age);
//         dest.writeString(waypoints);
//         dest.writeString(url);
//     }
// 
//     /**
//      * Implementing the Parcelable interface must also have a static field called CREATOR, which is an object
//      * implementing the Parcelable.Creator interface.
//      */
//     public static final Parcelable.Creator<DownloadablePQ> CREATOR = new Parcelable.Creator<DownloadablePQ>() {
//         public DownloadablePQ createFromParcel(Parcel in) {
//             return new DownloadablePQ(in);
//         }
// 
//         public DownloadablePQ[] newArray(int size) {
//             return new DownloadablePQ[size];
//         }
//     };
// 
//     @Override
//     public String getName() {
//         return name;
//     }
// 
// }
// 
// Path: app/src/main/java/org/pquery/dao/RepeatablePQ.java
// public class RepeatablePQ implements Parcelable, Serializable, PQListItem {
// 
//     private static final long serialVersionUID = -6540850109992510771L;
//     public String name;
//     public String waypoints;
//     private HashMap<Integer, Schedule> schedules = new HashMap<Integer, Schedule>();
// 
//     public RepeatablePQ(Parcel in) {
//         name = in.readString();
//         waypoints = in.readString();
//         schedules = in.readHashMap(ClassLoader.getSystemClassLoader());
//     }
// 
//     public RepeatablePQ() {
//     }
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(name);
//         dest.writeString(waypoints);
//         dest.writeMap(schedules);
// 
//     }
// 
//     /**
//      * Implementing the Parcelable interface must also have a static field called CREATOR, which is an object
//      * implementing the Parcelable.Creator interface.
//      */
//     public static final Creator<RepeatablePQ> CREATOR = new Creator<RepeatablePQ>() {
//         public RepeatablePQ createFromParcel(Parcel in) {
//             return new RepeatablePQ(in);
//         }
// 
//         public RepeatablePQ[] newArray(int size) {
//             return new RepeatablePQ[size];
//         }
//     };
// 
//     @Override
//     public String getName() {
//         return name;
//     }
// 
//     public List<Integer> getCheckedWeekdays() {
//         List<Integer> checkedWeekdays = new ArrayList<Integer>();
//         for (Schedule schedule : schedules.values()) {
//            if (schedule.isEnabled()) {
//                checkedWeekdays.add(schedule.getDay());
//            }
//         }
//         return checkedWeekdays;
//     }
// 
//     public void addScheduleURL(String url) {
//         UrlQuerySanitizer sanitizer = new UrlQuerySanitizer();
//         sanitizer.setAllowUnregisteredParamaters(true);
//         sanitizer.parseUrl(url);
//         String day = sanitizer.getValue("d");
//         String opt = sanitizer.getValue("opt");
//         Schedule schedule = new Schedule(url, Integer.valueOf(day), "0".equals(opt));
//         schedules.put(schedule.getDay(), schedule);
//     }
// 
//     public Map<Integer, Schedule> getSchedules() {
//         return schedules;
//     }
// 
//     public String getCheckedWeekdaysAsText(String[] weekdayNames) {
//         String weekdaysString = null;
//         for (Integer dayNumber : getCheckedWeekdays()) {
//             String dayName = weekdayNames[dayNumber];
//             if (weekdaysString == null) {
//                 weekdaysString = dayName;
//             } else {
//                 weekdaysString += ", " + dayName;
//             }
//         }
//         if (weekdaysString == null) {
//             weekdaysString = "-";
//         }
//         return weekdaysString;
//     }
// }


// Path: app/src/main/java/org/pquery/webdriver/parser/PocketQueryPage.java
import net.htmlparser.jericho.Attribute;
import net.htmlparser.jericho.Element;
import net.htmlparser.jericho.HTMLElementName;
import net.htmlparser.jericho.Segment;
import net.htmlparser.jericho.Source;
import net.htmlparser.jericho.StartTag;
import org.pquery.dao.DownloadablePQ;
import org.pquery.dao.RepeatablePQ;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

package org.pquery.webdriver.parser;




public class PocketQueryPage {

    private Source parsedHtml;

    public PocketQueryPage(Source parsedHtml) {
        this.parsedHtml = parsedHtml;
    }

    /**
     * <thead><tr>
     * <tr id="ctl00_ContentBody_PQDownloadList_uxDownloadPQList_ctl01_trPQDownloadRow">
     * <tr class="TableFooter">
     *
     * @return
     * @throws ParseException
     */

    public DownloadablePQ[] getReadyForDownload() throws ParseException {
