Examples of MassSpecAPISoap


Examples of com.chemspider.www.MassSpecAPISoap

  public DBCompound getCompound(final String ID, ParameterSet parameters)
      throws IOException {

    LOG.finest("Fetching compound info for CSID #" + ID);

    final MassSpecAPISoap massSpec = createMassSpecAPI();

    // Get security token.
    final String token = parameters.getParameter(
        ChemSpiderParameters.SECURITY_TOKEN).getValue();

    // Fetch compound info.
    ExtendedCompoundInfo info = null;
    try {
      info = massSpec.getExtendedCompoundInfo(Integer.valueOf(ID), token);
    } catch (final RemoteException e) {

      // We need to catch exceptions here - usually from deprecated
      // structures in the ChemSpider database or
      // invalid security token.
View Full Code Here

Examples of com.chemspider.www.MassSpecAPISoap

  private static MassSpecAPISoap createMassSpecAPI() throws IOException {

    LOG.finest("Create mass-spec API handle...");

    // Create API handles.
    final MassSpecAPISoap handle;
    try {
      handle = new MassSpecAPILocator().getMassSpecAPISoap();
    } catch (ServiceException e) {
      LOG.log(Level.WARNING,
          "Problem initializing ChemSpider Mass-Spec API", e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.