本文整理汇总了Java中it.unitn.disi.common.DISIException.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java DISIException.getMessage方法的具体用法?Java DISIException.getMessage怎么用?Java DISIException.getMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类it.unitn.disi.common.DISIException
的用法示例。
在下文中一共展示了DISIException.getMessage方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeMultiwords
import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
private static void writeMultiwords(Dictionary dic, String multiwordsFileName) throws SMatchException {
try {
MiscUtils.writeObject(createMultiwordHash(dic), multiwordsFileName);
} catch (DISIException e) {
throw new SMatchException(e.getMessage(), e);
}
}
示例2: readHash
import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
private static long[] readHash(String fileName) throws SMatchException {
try {
return (long[]) MiscUtils.readObject(fileName);
} catch (DISIException e) {
throw new SMatchException(e.getMessage(), e);
}
}
示例3: convertAndWrite
import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
private static void convertAndWrite(Set<Long> keys, String fileName) throws SMatchException {
try {
long[] keysArr = new long[keys.size()];
int i = 0;
for (Long key : keys) {
keysArr[i] = key;
i++;
}
Arrays.sort(keysArr);
MiscUtils.writeObject(keysArr, fileName);
} catch (DISIException e) {
throw new SMatchException(e.getClass().getSimpleName() + ": " + e.getMessage(), e);
}
}
示例4: writeMultiwords
import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
private static void writeMultiwords(Properties properties) throws SMatchException {
log.info("Creating multiword hash...");
HashMap<String, ArrayList<ArrayList<String>>> multiwords = new HashMap<String, ArrayList<ArrayList<String>>>();
POS[] parts = new POS[]{POS.NOUN, POS.ADJECTIVE, POS.VERB, POS.ADVERB};
for (POS pos : parts) {
collectMultiwords(multiwords, pos);
}
log.info("Multiwords: " + multiwords.size());
try {
MiscUtils.writeObject(multiwords, properties.getProperty(MULTIWORDS_FILE_KEY));
} catch (DISIException e) {
throw new SMatchException(e.getMessage(), e);
}
}
示例5: readHash
import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
private static long[] readHash(String fileName, boolean isInternalFile) throws SMatchException {
try {
return (long[]) MiscUtils.readObject(fileName, isInternalFile);
} catch (DISIException e) {
throw new SMatchException(e.getMessage(), e);
}
}
示例6: readHash
import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
/**
* Loads the hashmap with multiwords. The multiwords are stored in the following format:
* Key - the first word in the multiwords
* Value - List of Lists, which contain the other words in the all the multiwords starting with key.
*
* @param url hashmap location
* @return multiwords hashmap
* @throws SMatchException SMatchException
*/
@SuppressWarnings("unchecked")
private static Map<String, List<List<String>>> readHash(String url) throws SMatchException {
try {
return (Map<String, List<List<String>>>) MiscUtils.readObject(url);
} catch (DISIException e) {
throw new SMatchException(e.getMessage(), e);
}
}
示例7: readHash
import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
/**
* Loads the hashmap with multiwords. The multiwords are stored in the following format:
* Key - the first word in the multiwords
* Value - List of Lists, which contain the other words in the all the multiwords starting with key.
*
* @param fileName the file name from which the hashmap will be read
* @parm isInternalFile reads from internal data file in resources folder
* @return multiwords hashmap
* @throws it.unitn.disi.smatch.SMatchException SMatchException
*/
@SuppressWarnings("unchecked")
private static HashMap<String, ArrayList<ArrayList<String>>> readHash(String fileName, boolean isInternalFile) throws SMatchException {
try {
return (HashMap<String, ArrayList<ArrayList<String>>>) MiscUtils.readObject(fileName, isInternalFile);
} catch (DISIException e) {
throw new SMatchException(e.getMessage(), e);
}
}