Examples of ProfileException


Examples of org.apache.oodt.profile.ProfileException

    } else {
      configFileLoc = System.getProperty("org.apache.oodt.opendap.config.filePath");
    }
   
    if (configFileLoc.isEmpty()){
      throw new ProfileException(
        "Configuration file not found. Please specify in System property opendap.config.filePath or as URL parameter ConfigUrl");
    } else {
      try {
        this.conf = OpendapConfigReader.read(configFileLoc);
      } catch (FileNotFoundException e) {
        throw new ProfileException("FileNotFoundException: File not found!");
      } catch (MalformedURLException e) {
        throw new ProfileException("MalformedURLException: please fix file URL");
      }
    }
   
    List<Profile> profiles = new Vector<Profile>();
    List<DapRoot> roots = this.conf.getRoots();
   
    for (DapRoot root : roots) {
      DatasetExtractor d = new DatasetExtractor(xmlQuery, root.getCatalogUrl()
          .toExternalForm(), root.getDatasetUrl().toExternalForm());
      if (d.getDapUrls() != null) {
        for (String opendapUrl : d.getDapUrls()) {
          Profile profile = new Profile();
          DConnect dConn = null;
          try {
            dConn = new DConnect(opendapUrl, true);
          } catch (FileNotFoundException e) {
            LOG.log(Level.WARNING, "Opendap URL not found: [" + opendapUrl
                + "]: Message: " + e.getMessage());
            throw new ProfileException("Opendap URL not found: [" + opendapUrl
                + "]: Message: " + e.getMessage());
          }

          Metadata datasetMet = d.getDatasetMet(opendapUrl);
          profile.setResourceAttributes(ProfileUtils.getResourceAttributes(
View Full Code Here

Examples of org.apache.oodt.profile.ProfileException

   * (non-Javadoc)
   *
   * @see org.apache.oodt.profile.handlers.ProfileHandler#get(java.lang.String)
   */
  public Profile get(String id) throws ProfileException {
    throw new ProfileException("method not implemented yet!");
  }
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.