Package org.apache.oodt.profile

Examples of org.apache.oodt.profile.ProfileException


     * (non-Javadoc)
     *
     * @see org.apache.oodt.profile.handlers.ProfileHandler#get(java.lang.String)
     */
    public Profile get(String arg0) throws ProfileException {
        throw new ProfileException("Method not implemented yet");
    }
View Full Code Here


        try {
            translateToDomain(selectSet, true);
            translateToDomain(whereSet, false);
        } catch (Exception e) {
            e.printStackTrace();
            throw new ProfileException(e.getMessage());
        }
        List<Profile> profs = queryAndPackageProfiles(query);
        return profs;
    }
View Full Code Here

     * (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!");
    }
View Full Code Here

    } 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();
   
    // loop over THREDDS catalogs
    for (DapRoot root : roots) {
      LOG.log(Level.INFO,"Parsing DapRoot="+root.getDatasetUrl());

      DatasetExtractor d = new DatasetExtractor(xmlQuery, root.getCatalogUrl()
          .toExternalForm(), root.getDatasetUrl().toExternalForm(), conf);
      if (d.getDapUrls() != null) {
        for (String opendapUrl : d.getDapUrls()) {
         
          // wrap the profile generation in try-catch to avoid stopping the whole harvesting process in case an exception is thrown
          try {

            LOG.log(Level.FINE,"Connecting to opendapurl="+opendapUrl);
 
            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());
            }

            // retrieve already extracted THREDDS metadata
            Metadata datasetMet = d.getDatasetMet(opendapUrl);
View Full Code Here

   * (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

        try {
            translateToDomain(selectSet, true);
            translateToDomain(whereSet, false);
        } catch (Exception e) {
            e.printStackTrace();
            throw new ProfileException(e.getMessage());
        }
        List<Profile> profs = queryAndPackageProfiles(query);
        return profs;
    }
View Full Code Here

     * (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!");
    }
View Full Code Here

    } 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

   * (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

        try {
            translateToDomain(selectSet, true);
            translateToDomain(whereSet, false);
        } catch (Exception e) {
            e.printStackTrace();
            throw new ProfileException(e.getMessage());
        }
        List<Profile> profs = queryAndPackageProfiles(query);
        return profs;
    }
View Full Code Here

TOP

Related Classes of org.apache.oodt.profile.ProfileException

Copyright © 2018 www.massapicom. 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.