Package thredds.catalog

Examples of thredds.catalog.InvAccess


    String newDatasetName = null;

    //-----
    // Test that this dataset has a DODS type service.
    //-----
    InvAccess access = dataset.getAccess(ServiceType.DODS);

    if (access == null) {
      logger.warn("nameDatasetDodsAttrib(): dataset is not DODS accessible and so cannot be named using DODS attributes.");
      return (false);
    }

    //-----
    // Connect to DODS dataset.
    //-----
    String url = access.getStandardUrlName();

    try {
      dodsConnection = new DConnect(url, acceptDeflate);
    }
    catch (java.io.FileNotFoundException e) {
View Full Code Here


    }

    public void getDataset(InvDataset dd, Object context) {
      if ((count > maxDatasets) && (maxDatasets > 0)) return;

      InvAccess access = dd.getAccess(ServiceType.OPENDAP);
      if (access == null) {
        System.out.println(" no opendap access");
        return;
      }

      if (first) { // skip the first one
        System.out.println(" skip "+access.getStandardUrlName());
        first = false;
        return;
      }

      count++;     
      System.out.println(" access " + access.getStandardUrlName());
      ForecastModelRunInventory fmr;
      try {
        fmr = ForecastModelRunInventory.open(cache, access.getStandardUrlName(), mode, false);
        if (null != fmr) {
          fmrCollection.addRun(fmr);
          fmr.releaseDataset();
        }
      } catch (IOException e) {
View Full Code Here

    // look for an OpenDAP access URL, only extract metadata if it is found
    List<InvAccess> datasets = dd.getAccess();
    if (dd.getAccess() != null && dd.getAccess().size() > 0) {
      Iterator<InvAccess> sets = datasets.iterator();
      while (sets.hasNext()) {
        InvAccess single = sets.next();
        InvService service = single.getService();
        // note: select the OpenDAP access URL based on THREDDS service type
        if (service.getServiceType()==ServiceType.OPENDAP) {
          LOG.log(Level.FINE, "Found OpenDAP access URL: "+ single.getUrlPath());
          String opendapurl = this.datasetURL + single.getUrlPath();
          // extract metadata from THREDDS catalog
          MetadataExtractor extractor = new ThreddsMetadataExtractor(dd);
          Metadata met = new Metadata();
          extractor.extract(met, conf);
          // index metadata by opendap access URL
View Full Code Here

    LOG.log(Level.INFO, url + " is the computed access URL for this dataset");
    List<InvAccess> datasets = dd.getAccess();
    if (dd.getAccess() != null && dd.getAccess().size() > 0) {
      Iterator<InvAccess> sets = datasets.iterator();
      while (sets.hasNext()) {
        InvAccess single = sets.next();
        InvService service = single.getService();
        if (service.getName().equals("odap")
            || service.getName().equals("rdbmDods")) // only get the opendap one
        {
          LOG.log(Level.INFO,
              "Found a service-specific dataset URL to over-ride the computed URL: "
                  + single.getUrlPath());
          url = this.datasetURL + single.getUrlPath();
          break;
        }
      }
    }
    if (url != null) {
View Full Code Here

TOP

Related Classes of thredds.catalog.InvAccess

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.