Package ucar.nc2.thredds

Examples of ucar.nc2.thredds.ThreddsDataFactory$Result


                        while (result.getDetail().getDetailEntries().hasNext()) {
                                Object next = result.getDetail().getDetailEntries().next();
                                if (next instanceof DispositionReport) {

                                        DispositionReport z = (DispositionReport) next;
                                        Result x = new Result();
                                        r.addAll(MapResult(z.getFaultInfo().getResult()));

                                }
                                logger.warn("unable to parse fault detail, type:" + next.getClass().getCanonicalName() + " " + next.toString());
                        }
View Full Code Here


                        } catch (Exception ex) {
                                log.warn("Your implementation on ISubscriptionCallback is faulty and threw an error, contact the developer", ex);
                        }
                }
                DispositionReport r = new DispositionReport();
                r.getResult().add(new Result());
                return r;
        }
View Full Code Here

                @WebParam(name = "validate_values", targetNamespace = "urn:uddi-org:vs_v3", partName = "body") ValidateValues body)
                throws DispositionReportFaultMessage, RemoteException {
                messagesReceived++;
                if (VALID) {
                        DispositionReport dispositionReport = new DispositionReport();
                        dispositionReport.getResult().add(new Result());
                        return dispositionReport;
                }
                DispositionReport dispositionReport = new DispositionReport();
                Result r = new Result();
                r.setKeyType(KeyType.T_MODEL_KEY);
                r.setErrno(20200);
                r.setErrInfo(new ErrInfo());
                r.getErrInfo().setErrCode("E_invalidValue");
                r.getErrInfo().setValue("E_invalidValue");
               
                dispositionReport.getResult().add(r);
                throw new DispositionReportFaultMessage("error", dispositionReport);
        }
View Full Code Here

                }
                if (!success) {
                        throw new DispositionReportFaultMessage(err, null);
                }
                DispositionReport dr = new DispositionReport();
                Result res = new Result();
                dr.getResult().add(res);

                return dr;
        }
View Full Code Here

      return acquireRemote(cache, factory, hashKey, location, buffer_size, cancelTask, spiObject)// open through ncstream

      // thredds:
    } else if (location.startsWith(ThreddsDataFactory.SCHEME)) {
      Formatter log = new Formatter();
      ThreddsDataFactory tdf = new ThreddsDataFactory();
      NetcdfFile ncfile = tdf.openDataset(location, false, cancelTask, log); // LOOK acquire ??
      if (ncfile == null)
        throw new IOException(log.toString());
      return ncfile;

    } else if (location.endsWith(".xml") || location.endsWith(".ncml")) { //open as a NetcdfDataset through NcML
View Full Code Here

  @Override
  public void getDataset(InvDataset ds, Object context) {

    if (ds.hasAccess()) {
      ThreddsDataFactory tdataFactory = new ThreddsDataFactory();
      InvAccess access = tdataFactory.chooseDatasetAccess(ds.getAccess());
      MFileRemote mfile = new MFileRemote(access);
      if (mfile.getPath().endsWith(".xml")) return; // eliminate latest.xml  LOOK kludge-o-rama
      java.util.Map<String, MFile> map = (java.util.Map<String, MFile>) context;
      map.put(mfile.getPath(), mfile);
      if (debug) System.out.format("add %s %n", mfile.getPath());
View Full Code Here

   * @throws java.io.IOException on io error
   */
  static public FeatureDataset open(FeatureType wantFeatureType, String location, ucar.nc2.util.CancelTask task, Formatter errlog) throws IOException {
    // special processing for thredds: datasets
    if (location.startsWith(ThreddsDataFactory.SCHEME)) {
      ThreddsDataFactory.Result result = new ThreddsDataFactory().openFeatureDataset(wantFeatureType, location, task);
      errlog.format("%s", result.errLog);
      if (!featureTypeOk(wantFeatureType, result.featureType)) {
        errlog.format("wanted %s but dataset is of type %s%n", wantFeatureType, result.featureType);
        return null;
      }
View Full Code Here

  }

  public void utestMetarDataset() throws IOException {
    long start = System.currentTimeMillis();

    ThreddsDataFactory fac = new ThreddsDataFactory();
    ThreddsDataFactory.Result result = fac.openFeatureDataset( "thredds:resolve:http://motherlode.ucar.edu:9080/thredds/idd/metar?returns=DQC", null);
    if ( result.fatalError )
    {
      System.out.println( "TestStationDataset.testMetarDataset():\n" + result.errLog.toString() );
      assert false;
    }
View Full Code Here

  }

  public void testDODS() throws Exception {
    String ds = "http://motherlode.ucar.edu:8080/thredds/catalog/fmrc/NCEP/DGEX/CONUS_12km/files/latest.xml";
    //String dsid = "#NCEP/DGEX/CONUS_12km/latest.xml";
    ThreddsDataFactory.Result result = new ThreddsDataFactory().openFeatureDataset("thredds:resolve:" + ds, null);
    System.out.println("result errlog= " + result.errLog);
    assert !result.fatalError;
    assert result.featureType == FeatureType.GRID;
    assert result.featureDataset != null;
View Full Code Here

    dataset.close();
  }

  public void utestDODS2() throws Exception {
    String threddsURL = "http://lead.unidata.ucar.edu:8080/thredds/dqcServlet/latestOUADAS?adas";
    ThreddsDataFactory.Result result = new ThreddsDataFactory().openFeatureDataset(threddsURL, null);
    assert result.featureDataset != null;
    GridDataset dataset = (GridDataset) result.featureDataset;

    GeoGrid grid = dataset.findGridByName("PT");
    assert null != grid;
View Full Code Here

TOP

Related Classes of ucar.nc2.thredds.ThreddsDataFactory$Result

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.