package es.tid.ps.dynamicprofile.dictionary;

/**
 * Class that defines the native methods to access the comScore dictionary API
 * via JNI.
 * 
 * @author dmicol
 */
public class CSDictionaryJNIInterface {
    /**
     * Initializes the dictionary wrapper using the terms in domain file.
     * 
     * @param iMode
     *            the operation mode (value should be 1)
     * @param szTermsInDomainFlatFileName
     *            the terms in domain file name
     * @return whether the initialization succeeded
     */
    public native boolean InitFromTermsInDomainFlatFile(int iMode,
            String szTermsInDomainFlatFileName);

    /**
     * Loads the comScore dictionary in memory.
     * 
     * @param iMode
     *            the operation mode (value should be 1)
     * @param szTermsInDomainFlatFileName
     *            the terms in domain file name
     * @param szDictionaryName
     *            the file name of the dictionary
     * @return whether the load of the dictionary succeeded
     */
    public native boolean LoadCSDictionary(int iMode,
            String szTermsInDomainFlatFileName, String szDictionaryName);

    /**
     * Applies the dictionary to the given URL, and returns the pattern ID for
     * such URL.
     * 
     * @param szURL
     *            the url to apply the dictionary to
     * @return the pattern ID of the URL
     */
    public native long ApplyDictionaryUsingUrl(String szURL);

    static {
        System.load("/usr/lib64/libCategories.so");
    }
}

package es.tid.ps.dynamicprofile.dictionary;

/**
 * Class that defines the native methods to access the comScore dictionary API
 * via JNI.
 * 
 * @author dmicol
 */
public class CSDictionaryJNIInterface {
    /**
     * Initializes the dictionary wrapper using the terms in domain file.
     * 
     * @param iMode
     *            the operation mode (value should be 1)
     * @param szTermsInDomainFlatFileName
     *            the terms in domain file name
     * @return whether the initialization succeeded
     */
    public native boolean InitFromTermsInDomainFlatFile(int iMode,
            String szTermsInDomainFlatFileName);

    /**
     * Loads the comScore dictionary in memory.
     * 
     * @param iMode
     *            the operation mode (value should be 1)
     * @param szTermsInDomainFlatFileName
     *            the terms in domain file name
     * @param szDictionaryName
     *            the file name of the dictionary
     * @return whether the load of the dictionary succeeded
     */
    public native boolean LoadCSDictionary(int iMode,
            String szTermsInDomainFlatFileName, String szDictionaryName);

    /**
     * Applies the dictionary to the given URL, and returns the pattern ID for
     * such URL.
     * 
     * @param szURL
     *            the url to apply the dictionary to
     * @return the pattern ID of the URL
     */
    public native long ApplyDictionaryUsingUrl(String szURL);

    static {
        System.load("/user/hdfs/libCategories.so");
    }
}

Modify libCategories.so path to use hdfs.
Modify libCategories.so path to use hdfs.

git-svn-id: 41b0c0219f7416f0d477a2a4ae2b791f31fdedae@100 72e40b64-262a-4186-abad-0444e9ae7036
