use of uk.ac.ebi.www.webservices.chebi.ChebiWebServicePortType in project vcell by virtualcell.
the class DataBaseReferenceReader method getChEBIName.
public static String getChEBIName(String chebiId) {
String name = null;
SearchCategory sc = SearchCategory.fromString(SearchCategory._value3);
int maxResults = 200;
StarsCategory starts = StarsCategory.value1;
ChebiWebServiceServiceLocator locator = new ChebiWebServiceServiceLocator();
ChebiWebServicePortType portType = null;
try {
portType = locator.getChebiWebServicePort();
LiteEntity[] le = portType.getLiteEntity(chebiId, sc, maxResults, starts);
if (le != null)
name = le[0].getChebiAsciiName();
// System.out.println((le!=null)?le[0].getChebiAsciiName():"cannot find" + chebiId);
} catch (ChebiWebServiceFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return name;
}
Aggregations