1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 02:09:35 +02:00

compilation issues

This commit is contained in:
Nikolay Pultsin 2012-10-13 13:59:44 +04:00
parent cbd74279ac
commit a0c80f4d74
5 changed files with 18 additions and 18 deletions

View file

@ -44,8 +44,8 @@ public interface Api {
int getParagraphsNumber() throws ApiException; int getParagraphsNumber() throws ApiException;
int getParagraphElementsCount(int paragraphIndex) throws ApiException; int getParagraphElementsCount(int paragraphIndex) throws ApiException;
String getParagraphText(int paragraphIndex) throws ApiException; String getParagraphText(int paragraphIndex) throws ApiException;
int getParagraphWordsCount(int paragraphIndex) throws ApiException; List<String> getParagraphWords(int paragraphIndex) throws ApiException;
String getParagraphWordIndices(int paragraphIndex) throws ApiException; List<Integer> getParagraphWordIndices(int paragraphIndex) throws ApiException;
// page information // page information
TextPosition getPageStart() throws ApiException; TextPosition getPageStart() throws ApiException;

View file

@ -318,11 +318,11 @@ public class ApiClientImplementation implements ServiceConnection, Api, ApiMetho
return requestInt(GET_PARAGRAPH_ELEMENTS_COUNT, envelope(paragraphIndex)); return requestInt(GET_PARAGRAPH_ELEMENTS_COUNT, envelope(paragraphIndex));
} }
public List<String> getParagraphWordsCount(int paragraphIndex) throws ApiException { public List<String> getParagraphWords(int paragraphIndex) throws ApiException {
return requestStringList(GET_PARAGRAPH_WORDS_COUNT, envelope(paragraphIndex)); 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)); return requestIntegerList(GET_PARAGRAPH_WORD_INDICES, envelope(paragraphIndex));
} }

View file

@ -34,7 +34,7 @@ interface ApiMethods {
int GET_PARAGRAPHS_NUMBER = 601; int GET_PARAGRAPHS_NUMBER = 601;
int GET_PARAGRAPH_ELEMENTS_COUNT = 602; int GET_PARAGRAPH_ELEMENTS_COUNT = 602;
int GET_PARAGRAPH_TEXT = 603; int GET_PARAGRAPH_TEXT = 603;
int GET_PARAGRAPH_WORDS_COUNT = 604; int GET_PARAGRAPH_WORDS = 604;
int GET_PARAGRAPH_WORD_INDICES = 605; int GET_PARAGRAPH_WORD_INDICES = 605;
// page information // page information

View file

@ -168,7 +168,7 @@ public abstract class ApiObject implements Parcelable {
return new Date(value); 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()); final ArrayList<ApiObject> objects = new ArrayList<ApiObject>(values.size());
for (java.lang.String v : values) { for (java.lang.String v : values) {
objects.add(new String(v)); objects.add(new String(v));
@ -176,7 +176,7 @@ public abstract class ApiObject implements Parcelable {
return objects; 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()); final ArrayList<ApiObject> objects = new ArrayList<ApiObject>(values.size());
for (java.lang.Integer v : values) { for (java.lang.Integer v : values) {
objects.add(new Integer(v)); objects.add(new Integer(v));

View file

@ -214,31 +214,31 @@ public class ApiServerImplementation extends ApiInterface.Stub implements Api, A
try { try {
switch (method) { switch (method) {
case LIST_OPTION_GROUPS: case LIST_OPTION_GROUPS:
return ApiObject.envelope(getOptionGroups()); return ApiObject.envelopeStringList(getOptionGroups());
case LIST_OPTION_NAMES: case LIST_OPTION_NAMES:
return ApiObject.envelope(getOptionNames( return ApiObject.envelopeStringList(getOptionNames(
((ApiObject.String)parameters[0]).Value ((ApiObject.String)parameters[0]).Value
)); ));
case LIST_BOOK_TAGS: case LIST_BOOK_TAGS:
return ApiObject.envelope(getBookTags()); return ApiObject.envelopeStringList(getBookTags());
case LIST_ACTIONS: case LIST_ACTIONS:
return ApiObject.envelope(listActions()); return ApiObject.envelopeStringList(listActions());
case LIST_ACTION_NAMES: case LIST_ACTION_NAMES:
{ {
final ArrayList<String> actions = new ArrayList<String>(parameters.length); final ArrayList<String> actions = new ArrayList<String>(parameters.length);
for (ApiObject o : parameters) { for (ApiObject o : parameters) {
actions.add(((ApiObject.String)o).Value); actions.add(((ApiObject.String)o).Value);
} }
return ApiObject.envelope(listActionNames(actions)); return ApiObject.envelopeStringList(listActionNames(actions));
} }
case LIST_ZONEMAPS: case LIST_ZONEMAPS:
return ApiObject.envelope(listZoneMaps()); return ApiObject.envelopeStringList(listZoneMaps());
case GET_PARAGRAPH_WORDS_COUNT: case GET_PARAGRAPH_WORDS:
return ApiObject.envelope(getParagraphWordsCount( return ApiObject.envelopeStringList(getParagraphWords(
((ApiObject.Integer)parameters[0]).Value ((ApiObject.Integer)parameters[0]).Value
)); ));
case GET_PARAGRAPH_WORD_INDICES: case GET_PARAGRAPH_WORD_INDICES:
return ApiObject.envelope(getParagraphWordIndices( return ApiObject.envelopeIntegerList(getParagraphWordIndices(
((ApiObject.Integer)parameters[0]).Value ((ApiObject.Integer)parameters[0]).Value
)); ));
default: default:
@ -462,7 +462,7 @@ public class ApiServerImplementation extends ApiInterface.Stub implements Api, A
return sb.toString(); return sb.toString();
} }
public List<String> getParagraphWordsCount(int paragraphIndex) { public List<String> getParagraphWords(int paragraphIndex) {
final ArrayList<String> words = new ArrayList<String>(); final ArrayList<String> words = new ArrayList<String>();
final ZLTextWordCursor cursor = new ZLTextWordCursor(myReader.getTextView().getStartCursor()); final ZLTextWordCursor cursor = new ZLTextWordCursor(myReader.getTextView().getStartCursor());
cursor.moveToParagraph(paragraphIndex); cursor.moveToParagraph(paragraphIndex);