Changeset 4237 for trunk/mgpp
- Timestamp:
- 2003-05-08T09:32:13+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mgpp/jni/MGPPWrapperImpl.cpp
r4212 r4237 78 78 FID_mgpp_data = j_env->GetFieldID(j_cls, "mgpp_data_ptr_", "J"); //a long-"J" 79 79 if (FID_mgpp_data==NULL) { 80 cerr <<" field mgpp_data_ptr_ not found"<<endl;80 cerr <<"MGPP JNI: field mgpp_data_ptr_ not found"<<endl; 81 81 } 82 82 83 83 FID_query_result = j_env->GetFieldID(j_cls, "mgpp_query_result_", "Lorg/greenstone/mgpp/MGPPQueryResult;"); // an object -"L<class name>;" 84 84 if (FID_query_result==NULL) { 85 cerr <<" field mgpp_query_result_ not found"<<endl;85 cerr <<"MGPP JNI: field mgpp_query_result_ not found"<<endl; 86 86 } 87 87 // the methods we want to use … … 91 91 MID_addDoc = j_env->GetMethodID(JC_MGPPQueryResult, "addDoc", "(JF)V"); 92 92 if (MID_addDoc==NULL) { 93 cerr <<" method not found"<<endl;93 cerr <<"MGPP JNI: addDoc method not found"<<endl; 94 94 } 95 95 // addTerm(String term, String tag, int stem_method, long match_docs, … … 97 97 MID_addTerm = j_env->GetMethodID(JC_MGPPQueryResult, "addTerm", "(Ljava/lang/String;Ljava/lang/String;IJJ[Ljava/lang/String;)V"); 98 98 if (MID_addTerm==NULL) { 99 cerr <<" method addTerm not found"<<endl;99 cerr <<"MGPP JNI: method addTerm not found"<<endl; 100 100 } 101 101 … … 103 103 MID_setTotalDocs = j_env->GetMethodID(JC_MGPPQueryResult, "setTotalDocs", "(J)V"); 104 104 if (MID_setTotalDocs==NULL) { 105 cerr <<" method setTotalDocs not found"<<endl;105 cerr <<"MGPP JNI: method setTotalDocs not found"<<endl; 106 106 } 107 107 108 108 MID_clearResult = j_env->GetMethodID(JC_MGPPQueryResult, "clear", "()V"); 109 109 if (MID_clearResult==NULL) { 110 cerr <<" method clear not found"<<endl;110 cerr <<"MGPP JNI: method clear not found"<<endl; 111 111 } 112 112 MID_setSyntaxError = j_env->GetMethodID(JC_MGPPQueryResult, "setSyntaxError", "(Z)V"); 113 113 if (MID_clearResult==NULL) { 114 cerr <<" method setSyntaxError not found"<<endl;114 cerr <<"MGPP JNI: method setSyntaxError not found"<<endl; 115 115 } 116 116 … … 119 119 jclass local_CID_String = j_env->FindClass("java/lang/String"); 120 120 if (local_CID_String==NULL) { 121 cerr <<" java String class not found"<<endl;121 cerr <<"MGPP JNI: java String class not found"<<endl; 122 122 } else { 123 123 /* create a global ref */ … … 164 164 #endif 165 165 166 cerr << "Doing getDocument..." << endl;167 168 166 const char * text_name = j_env->GetStringUTFChars(j_text_name, NULL); 169 167 if (text_name==NULL) { … … 182 180 183 181 // cast to char* otherwise complains about const 184 cerr << "(MGPP JNI) Base dir: " << base_dir << " Text name: " << text_name << endl;185 182 td.LoadData((char *)base_dir, (char *)text_name); 186 cerr << "Done loadData." << endl;187 183 188 184 UCArray mg_level; … … 192 188 // get the actual text 193 189 if (!GetDocText(td, mg_level, docnum, docText)) { 194 cerr <<" couldn't retrieve doc text"<<endl;190 cerr <<"MGPP JNI: couldn't retrieve doc text"<<endl; 195 191 } 196 192
Note:
See TracChangeset
for help on using the changeset viewer.