NLFormat extends Format { public CycObject getFormatLanguageMt() { if (DEFAULT.equals(formatLanguageMt)) { try { String command = "(denots-mt-for-language (get-language-for-code " + DefaultCycObject.stringApiValue(locale.getLanguage()) + "))"; formatLanguageMt = cyc.converseCycObject(command); } catch (UnknownHostException ex) { Logger.getLogger(NLFormat.class.getName()).log(Level.SEVERE, null, ex); throw new RuntimeException("Unable to retrieve language Mt for " + locale.getLanguage(), ex); } catch (IOException ex) { Logger.getLogger(NLFormat.class.getName()).log(Level.SEVERE, null, ex); throw new RuntimeException("Unable to retrieve language Mt for " + locale.getLanguage(), ex); } catch (CycApiException ex) { Logger.getLogger(NLFormat.class.getName()).log(Level.SEVERE, null, ex); throw new RuntimeException("Unable to retrieve language Mt for " + locale.getLanguage(), ex); } } return formatLanguageMt; } protected  NLFormat(CycAccess cyc); static NLFormat getInstance(CycAccess cyc); static NLFormat getInstance(Locale locale, CycAccess cyc); @Override StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos); List<String> formatMultiple(List<? extends Object> objList); @Override Object parseObject(String source, ParsePosition pos); CycObject getFormatLanguageMt(); Object getParseLanguageMt(); Object getDomainMt(); GenerationMode getMode(); Locale getLocale(); Collection<CycObject> getRequiredIsas(); Collection<CycObject> getRequiredGenls(); void setLocale(Locale locale); void setPrecise(boolean b); boolean isPrecise(); boolean shouldDisambiguate(); void setFormatLanguageMt(CycObject languageMt); void setParseLanguageMt(CycObject languageMt); void setDomainMt(CycObject domainMt); void setMode(GenerationMode mode); void setDisambiguate(boolean shouldDisambiguate); void addRequiredIsa(CycObject isa); void addRequiredGenl(CycObject genl); List<? extends Object> parseObjects(String denotationString); Collection<? extends Object> parseObjects(String denotationString, ParsePosition pos); static final CycSymbol DEFAULT; }
@Test public void testGetFormatLanguageMt() { System.out.println("getFormatLanguageMt"); NLFormat instance = NLFormat.getInstance(cyc); CycObject result = instance.getFormatLanguageMt(); assertNotNull(result); }