// Path: src/main/java/name/raev/kaloyan/kindle/chitanka/model/Item.java
// public interface Item {
// 
// 	public String getTitle();
// 
// 	public String getNavigationLink();
// 
// 	public String getDownloadLink();
// 
// 	public Image getImage();
// 
// 	public boolean isEnabled();
// 
// }
// 
// Path: src/main/java/name/raev/kaloyan/kindle/chitanka/model/Page.java
// public interface Page {
// 	
// 	public String getTitle() throws IOException;
// 
// 	public String getSubtitle() throws IOException;
// 
// 	public int getItemsCount() throws IOException;
// 
// 	public Item[] getItems() throws IOException;
// 
// 	public Item[] getItems(int index, int length) throws IOException;
// 
// 	public Item getItem(int index) throws IOException;
// 
// }


import name.raev.kaloyan.kindle.chitanka.model.Page;
import java.io.IOException;
import java.net.URL;
import name.raev.kaloyan.kindle.chitanka.model.Item;
/**
 * Copyright 2017 Kaloyan Raev
 * 
 * This file is part of chitanka4kindle.
 * 
 * chitanka4kindle is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * chitanka4kindle is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with chitanka4kindle.  If not, see <http://www.gnu.org/licenses/>.
 */
package name.raev.kaloyan.kindle.chitanka.model.search;



public abstract class SearchPage implements Page {

	protected String url;

	private String query;

	public SearchPage(String url) {
		this.url = url;
	}

	public String getSubtitle() throws IOException {
		return "Общо " + getItems().length + " резултата";
	}

	public int getItemsCount() throws IOException {
		return getItems().length;
	}

// Path: src/main/java/name/raev/kaloyan/kindle/chitanka/model/Item.java
// public interface Item {
// 
// 	public String getTitle();
// 
// 	public String getNavigationLink();
// 
// 	public String getDownloadLink();
// 
// 	public Image getImage();
// 
// 	public boolean isEnabled();
// 
// }
// 
// Path: src/main/java/name/raev/kaloyan/kindle/chitanka/model/Page.java
// public interface Page {
// 	
// 	public String getTitle() throws IOException;
// 
// 	public String getSubtitle() throws IOException;
// 
// 	public int getItemsCount() throws IOException;
// 
// 	public Item[] getItems() throws IOException;
// 
// 	public Item[] getItems(int index, int length) throws IOException;
// 
// 	public Item getItem(int index) throws IOException;
// 
// }


// Path: src/main/java/name/raev/kaloyan/kindle/chitanka/model/search/SearchPage.java
import name.raev.kaloyan.kindle.chitanka.model.Page;
import java.io.IOException;
import java.net.URL;
import name.raev.kaloyan.kindle.chitanka.model.Item;

/**
 * Copyright 2017 Kaloyan Raev
 * 
 * This file is part of chitanka4kindle.
 * 
 * chitanka4kindle is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * chitanka4kindle is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with chitanka4kindle.  If not, see <http://www.gnu.org/licenses/>.
 */
package name.raev.kaloyan.kindle.chitanka.model.search;



public abstract class SearchPage implements Page {

	protected String url;

	private String query;

	public SearchPage(String url) {
		this.url = url;
	}

	public String getSubtitle() throws IOException {
		return "Общо " + getItems().length + " резултата";
	}

	public int getItemsCount() throws IOException {
		return getItems().length;
	}

	public Item[] getItems(int index, int length) throws IOException {