李娟
lijuan 1 year ago
parent 5acc0e6565
commit d473e02d03

@ -8,24 +8,47 @@ import com.monke.monkeybook.listener.OnGetChapterListListener;
import java.util.List;
import io.reactivex.Observable;
// 定义了一个名为IEasouBookModel的接口用于规范与书籍相关的各种数据获取操作的方法签名
// 该接口可能会有不同的实现类来具体处理对应的业务逻辑,例如与不同数据源交互获取书籍信息等
public interface IEasouBookModel {
/**
*
*
*
* @param content
* @param page
* @param rankKind
* @return ObservableList<SearchBookBean>
* Observable
*/
Observable<List<SearchBookBean>> searchBook(String content, int page, int rankKind);
/**
*
*
*
* @param bookShelfBean BookShelfBean
*
* @return ObservableBookShelfBean
* Observable
*/
Observable<BookShelfBean> getBookInfo(final BookShelfBean bookShelfBean);
/**
*
*
*
* @param bookShelfBean BookShelfBean
* @param getChapterListListener
*
*/
void getChapterList(final BookShelfBean bookShelfBean, OnGetChapterListListener getChapterListListener);
/**
*
*
*
* @param durChapterUrl URLURL
* @param durChapterIndex 便
* @return ObservableBookContentBeanBean
* Observable
*/
Observable<BookContentBean> getBookContent(final String durChapterUrl, final int durChapterIndex);
}
}

@ -3,21 +3,42 @@ package com.monke.monkeybook.model;
import com.monke.monkeybook.bean.LibraryBean;
import com.monke.monkeybook.bean.SearchBookBean;
import com.monke.monkeybook.cache.ACache;
import //
com.monke.monkeybook.cache.ACache;
import java.util.List;
import io.reactivex.Observable;
// IGxwztvBookModel接口继承自IStationBookModel接口意味着它会继承IStationBookModel中定义的方法
// 同时在此接口中又额外定义了一些与特定业务可能和gxwztv相关相关的书籍数据获取等操作的方法规范
public interface IGxwztvBookModel extends IStationBookModel {
/**
*
*
* @param url URL
* @param page 便
* @return ObservableList<SearchBookBean>
* Observable
*/
Observable<List<SearchBookBean>> getKindBook(String url, int page);
/**
*
*
*
* @param aCache ACache
* 便
* @return ObservableLibraryBeanLibraryBean
* Observable
*/
Observable<LibraryBean> getLibraryData(ACache aCache);
/**
*
*
*
* @param data
* LibraryBean
* @return ObservableLibraryBeanLibraryBean
* Observable便
*/
Observable<LibraryBean> analyLibraryData(String data);
}
}

@ -2,10 +2,21 @@
package com.monke.monkeybook.model;
import com.monke.monkeybook.bean.LocBookShelfBean;
// 导入Java中用于操作文件的类意味着该接口相关操作可能涉及对本地文件的处理比如导入本地书籍文件等
import java.io.File;
import io.reactivex.Observable;
// 定义了IImportBookModel接口该接口主要规范了导入书籍相关操作的方法签名
// 具体的导入书籍逻辑可由实现该接口的类来完成
public interface IImportBookModel {
/**
*
*
* @param book Filetxtepub
*
* @return ObservableLocBookShelfBean
* Observable
*/
Observable<LocBookShelfBean> importBook(File book);
}
}

@ -8,25 +8,53 @@ import com.monke.monkeybook.listener.OnGetChapterListListener;
import java.util.List;
import io.reactivex.Observable;
// IStationBookModel接口定义了一系列与书籍相关操作的方法规范这些操作可能是围绕某个站点Station展开的
// 比如从特定的网络站点获取书籍数据等,具体实现类会按照这些规范来实现对应的业务逻辑
public interface IStationBookModel {
/**
*
*
*
* @param content
*
* @param page
* 便
* @return ObservableList<SearchBookBean>
* Observable
*/
Observable<List<SearchBookBean>> searchBook(String content, int page);
/**
*
*
*
* @param bookShelfBean BookShelfBean
*
* BookShelfBean
* @return ObservableBookShelfBean
* Observable
*/
Observable<BookShelfBean> getBookInfo(final BookShelfBean bookShelfBean);
/**
*
*
*
* @param bookShelfBean BookShelfBean
*
* OnGetChapterListListener
* @param getChapterListListener
*
*/
void getChapterList(final BookShelfBean bookShelfBean, OnGetChapterListListener getChapterListListener);
/**
*
*
*
* @param durChapterUrl URLURL
*
* @param durChapterIndex 便使
*
* @return ObservableBookContentBeanBean
* Observable便
*/
Observable<BookContentBean> getBookContent(final String durChapterUrl, final int durChapterIndex);
}
}

@ -8,28 +8,70 @@ import com.monke.monkeybook.listener.OnGetChapterListListener;
import java.util.List;
import io.reactivex.Observable;
// IWebBookModel接口定义了一系列与网络书籍相关操作的方法规范
// 主要涉及从网络获取书籍各种信息(如书籍详情、目录、章节内容等)以及搜索不同类型书籍的功能,
// 具体的实现类会按照这些方法签名去实现对应的网络交互逻辑
public interface IWebBookModel {
/**
*
*
*
* @param bookShelfBean BookShelfBean
*
* BookShelfBean
* @return ObservableBookShelfBean
* Observable
*/
Observable<BookShelfBean> getBookInfo(final BookShelfBean bookShelfBean);
/**
*
*
*
* @param bookShelfBean BookShelfBean
*
* OnGetChapterListListener
*
* @param getChapterListListener
*
*
*/
void getChapterList(final BookShelfBean bookShelfBean,OnGetChapterListListener getChapterListListener);
/**
*
*
*
* @param durChapterUrl URLURL
*
* @param durChapterIndex 便使
*
* @param tag
* @return ObservableBookContentBeanBean
* Observable便
*/
Observable<BookContentBean> getBookContent(final String durChapterUrl, final int durChapterIndex, String tag);
/**
*
*
*
* @param url URL
*
* @param page 便
* 2
* @return ObservableList<SearchBookBean>
* Observable
*/
Observable<List<SearchBookBean>> getKindBook(String url,int page);
/**
*
*
*
* @param content
*
* @param page
* 便3
* @param tag
* @return ObservableList<SearchBookBean>
* Observable
*/
Observable<List<SearchBookBean>> searchOtherBook(String content,int page,String tag);
}
}

@ -1,7 +1,22 @@
//Copyright (c) 2017. 章钦豪. All rights reserved.
package com.monke.monkeybook.model;
// IWebContentModel接口定义了一个用于分析书籍内容的方法规范
// 具体的实现类需要按照此规范来实现对书籍内容相关的解析操作,
// 可能是从网络获取到的书籍文本内容等进行特定的分析处理。
public interface IWebContentModel {
/**
*
*
* @param s
*
* @param realUrl URL
* URL
* @return
*
* @throws Exception
*
*/
String analyBookcontent(String s,String realUrl) throws Exception;
}
Loading…
Cancel
Save