calling Java function in Matlab and getting wrong return type

Hello
I am trying to implement a Java Api (MetaMap) in Matlab on MAC OSX. It works in Eclipse with my .jar files and packages. I have added the .jar files to the class path and imported the package in Matlab
The Java Code looks like this:
MetaMapApi api = new MetaMapApiImpl(); List<Result> resultList = api.processCitationsFromString(heart); Result result =resultList.get(0); Utterance utterance = (Utterance) result.getUtteranceList();
In Matlab I coded the following:
api = MetaMapApiImpl; resultList = api.processCitationFromString('heart'); result = resultList.get(0); utterance = result.getUtteranceList;
The problem is I get the correct return type for the first 3 lines but when I call the getUtteranceList method I get a java.util.List return type and not the java.util.List<Utterance> type as expected.
In addition when i try to access methods in some classes like methodsview(PCM) I get the following error:
No constructor 'gov.nih.nlm.nls.metamap.PCM' with matching signature found.
Any idea why I am getting the wrong return type. My code works in Eclipse with the same .jar files and packages. Is there a way to see the classes and class hierarchy in Matlab. Has anyone implemented the MetaMap Api in MatLab?
Thanks very much Sanjeev

답변 (0개)

카테고리

도움말 센터File Exchange에서 Call Java from MATLAB에 대해 자세히 알아보기

질문:

2013년 3월 23일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by