mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 02:09:35 +02:00
compilation issues
This commit is contained in:
parent
cbd74279ac
commit
a0c80f4d74
5 changed files with 18 additions and 18 deletions
|
@ -44,8 +44,8 @@ public interface Api {
|
|||
int getParagraphsNumber() throws ApiException;
|
||||
int getParagraphElementsCount(int paragraphIndex) throws ApiException;
|
||||
String getParagraphText(int paragraphIndex) throws ApiException;
|
||||
int getParagraphWordsCount(int paragraphIndex) throws ApiException;
|
||||
String getParagraphWordIndices(int paragraphIndex) throws ApiException;
|
||||
List<String> getParagraphWords(int paragraphIndex) throws ApiException;
|
||||
List<Integer> getParagraphWordIndices(int paragraphIndex) throws ApiException;
|
||||
|
||||
// page information
|
||||
TextPosition getPageStart() throws ApiException;
|
||||
|
|
|
@ -318,11 +318,11 @@ public class ApiClientImplementation implements ServiceConnection, Api, ApiMetho
|
|||
return requestInt(GET_PARAGRAPH_ELEMENTS_COUNT, envelope(paragraphIndex));
|
||||
}
|
||||
|
||||
public List<String> getParagraphWordsCount(int paragraphIndex) throws ApiException {
|
||||
return requestStringList(GET_PARAGRAPH_WORDS_COUNT, envelope(paragraphIndex));
|
||||
public List<String> getParagraphWords(int paragraphIndex) throws ApiException {
|
||||
return requestStringList(GET_PARAGRAPH_WORDS, envelope(paragraphIndex));
|
||||
}
|
||||
|
||||
public ArrayList<Integer> getParagraphWordIndices(int paragraphIndex) throws ApiException {
|
||||
public List<Integer> getParagraphWordIndices(int paragraphIndex) throws ApiException {
|
||||
return requestIntegerList(GET_PARAGRAPH_WORD_INDICES, envelope(paragraphIndex));
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ interface ApiMethods {
|
|||
int GET_PARAGRAPHS_NUMBER = 601;
|
||||
int GET_PARAGRAPH_ELEMENTS_COUNT = 602;
|
||||
int GET_PARAGRAPH_TEXT = 603;
|
||||
int GET_PARAGRAPH_WORDS_COUNT = 604;
|
||||
int GET_PARAGRAPH_WORDS = 604;
|
||||
int GET_PARAGRAPH_WORD_INDICES = 605;
|
||||
|
||||
// page information
|
||||
|
|
|
@ -168,7 +168,7 @@ public abstract class ApiObject implements Parcelable {
|
|||
return new Date(value);
|
||||
}
|
||||
|
||||
static List<ApiObject> envelope(List<java.lang.String> values) {
|
||||
static List<ApiObject> envelopeStringList(List<java.lang.String> values) {
|
||||
final ArrayList<ApiObject> objects = new ArrayList<ApiObject>(values.size());
|
||||
for (java.lang.String v : values) {
|
||||
objects.add(new String(v));
|
||||
|
@ -176,7 +176,7 @@ public abstract class ApiObject implements Parcelable {
|
|||
return objects;
|
||||
}
|
||||
|
||||
static List<ApiObject> envelope(List<java.lang.Integer> values) {
|
||||
static List<ApiObject> envelopeIntegerList(List<java.lang.Integer> values) {
|
||||
final ArrayList<ApiObject> objects = new ArrayList<ApiObject>(values.size());
|
||||
for (java.lang.Integer v : values) {
|
||||
objects.add(new Integer(v));
|
||||
|
|
|
@ -214,31 +214,31 @@ public class ApiServerImplementation extends ApiInterface.Stub implements Api, A
|
|||
try {
|
||||
switch (method) {
|
||||
case LIST_OPTION_GROUPS:
|
||||
return ApiObject.envelope(getOptionGroups());
|
||||
return ApiObject.envelopeStringList(getOptionGroups());
|
||||
case LIST_OPTION_NAMES:
|
||||
return ApiObject.envelope(getOptionNames(
|
||||
return ApiObject.envelopeStringList(getOptionNames(
|
||||
((ApiObject.String)parameters[0]).Value
|
||||
));
|
||||
case LIST_BOOK_TAGS:
|
||||
return ApiObject.envelope(getBookTags());
|
||||
return ApiObject.envelopeStringList(getBookTags());
|
||||
case LIST_ACTIONS:
|
||||
return ApiObject.envelope(listActions());
|
||||
return ApiObject.envelopeStringList(listActions());
|
||||
case LIST_ACTION_NAMES:
|
||||
{
|
||||
final ArrayList<String> actions = new ArrayList<String>(parameters.length);
|
||||
for (ApiObject o : parameters) {
|
||||
actions.add(((ApiObject.String)o).Value);
|
||||
}
|
||||
return ApiObject.envelope(listActionNames(actions));
|
||||
return ApiObject.envelopeStringList(listActionNames(actions));
|
||||
}
|
||||
case LIST_ZONEMAPS:
|
||||
return ApiObject.envelope(listZoneMaps());
|
||||
case GET_PARAGRAPH_WORDS_COUNT:
|
||||
return ApiObject.envelope(getParagraphWordsCount(
|
||||
return ApiObject.envelopeStringList(listZoneMaps());
|
||||
case GET_PARAGRAPH_WORDS:
|
||||
return ApiObject.envelopeStringList(getParagraphWords(
|
||||
((ApiObject.Integer)parameters[0]).Value
|
||||
));
|
||||
case GET_PARAGRAPH_WORD_INDICES:
|
||||
return ApiObject.envelope(getParagraphWordIndices(
|
||||
return ApiObject.envelopeIntegerList(getParagraphWordIndices(
|
||||
((ApiObject.Integer)parameters[0]).Value
|
||||
));
|
||||
default:
|
||||
|
@ -462,7 +462,7 @@ public class ApiServerImplementation extends ApiInterface.Stub implements Api, A
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
public List<String> getParagraphWordsCount(int paragraphIndex) {
|
||||
public List<String> getParagraphWords(int paragraphIndex) {
|
||||
final ArrayList<String> words = new ArrayList<String>();
|
||||
final ZLTextWordCursor cursor = new ZLTextWordCursor(myReader.getTextView().getStartCursor());
|
||||
cursor.moveToParagraph(paragraphIndex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue