Changeset 13288 for trunk/indexers/mg


Ignore:
Timestamp:
2006-11-17T10:41:23+13:00 (17 years ago)
Author:
shaoqun
Message:

added setMaxNumeric method

Location:
trunk/indexers/mg
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/indexers/mg/java/org/greenstone/mg/MGWrapper.java

    r3795 r13288  
    8181    public native String getQueryParams();
    8282
     83    /** sets maxnumeric */
     84    public native void setMaxNumeric(int maxnumeric);
     85
    8386    /** actually carry out the query.
    8487    Use the set methods to set query results.
  • trunk/indexers/mg/jni/MGWrapperImpl.c

    r11021 r13288  
    174174  SetEnv("expert", "true", NULL);
    175175  SetEnv("mode", "docnums", NULL);
     176 
    176177  return 1;  /* true - no errors */
    177178}
     
    661662}
    662663
     664/* set the maximum number of numeric to split*/
     665JNIEXPORT void JNICALL
     666Java_org_greenstone_mg_MGWrapper_setMaxNumeric (JNIEnv *j_env,
     667                         jobject j_obj,
     668                         jint j_max) {
     669
     670  char text[20];
     671  char* maxnumeric;
     672  sprintf(text,"%d",j_max);
     673  maxnumeric = text; 
     674  SetEnv("maxnumeric",maxnumeric, NULL);
     675}
     676
    663677
    664678/* Turn term frequency recording on or off */
  • trunk/indexers/mg/jni/org_greenstone_mg_MGWrapper.h

    r3791 r13288  
    9898/*
    9999 * Class:     org_greenstone_mg_MGWrapper
     100 * Method:    setMaxNumeric
     101 * Signature: (I)V
     102 */
     103JNIEXPORT void JNICALL Java_org_greenstone_mg_MGWrapper_setMaxNumeric
     104  (JNIEnv *, jobject, jint);
     105
     106/*
     107 * Class:     org_greenstone_mg_MGWrapper
    100108 * Method:    runQuery
    101109 * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
Note: See TracChangeset for help on using the changeset viewer.