Package thredds.inventory

Examples of thredds.inventory.TimedCollection$Dataset


                // create the datum for the choice
                return String.format("{\"value\":\"%s\"}", choice);
            }
        };

        TypeaheadConfig config = new TypeaheadConfig(new DataSet(bloodhound));

        return new Typeahead<String>(id, Model.of(""), config);
    }
View Full Code Here


              dataSets = reader.read();
              cache.put(meterName, dataSets);
            }
            String obis = provider.getObis(itemName);
            if (obis != null && dataSets.containsKey(obis)) {
              DataSet dataSet = dataSets.get(obis);
              if(logger.isDebugEnabled())
                logger.debug("Updateing item " + itemName + " with OBIS code " + obis + " and value " + dataSet.getValue());
              Class<? extends Item> itemType = provider
                  .getItemType(itemName);
              if (itemType.isAssignableFrom(NumberItem.class)) {
                eventPublisher.postUpdate(itemName,
                    new DecimalType(dataSet.getValue()));
              }
              if (itemType.isAssignableFrom(StringItem.class)) {
                String value = dataSet.getValue();
                eventPublisher.postUpdate(itemName, new StringType(
                    value));
              }
            }
          }
View Full Code Here

    return new CompositeStationFeature(s, null, dataCollection);
  }

  @Override
  public PointFeatureCollection flatten(LatLonRect boundingBox, DateRange dateRange) throws IOException {
    TimedCollection subsetCollection = (dateRange != null) ? dataCollection.subset(dateRange) : dataCollection;
    return new CompositeStationCollectionFlattened(getName(), boundingBox, dateRange, subsetCollection);

    //return flatten(stationHelper.getStations(boundingBox), dateRange, null);
  }
View Full Code Here

    //return flatten(stationHelper.getStations(boundingBox), dateRange, null);
  }

  @Override
  public PointFeatureCollection flatten(List<String> stations, DateRange dateRange, List<VariableSimpleIF> varList) throws IOException {
    TimedCollection subsetCollection = (dateRange != null) ? dataCollection.subset(dateRange) : dataCollection;
    return new CompositeStationCollectionFlattened(getName(), stations, dateRange, varList, subsetCollection);
  }
View Full Code Here

  static private org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(CompositeDatasetFactory.class);
  static boolean debug = false;

  static public FeatureDataset factory(String location, FeatureType wantFeatureType, DatasetCollectionManager dcm, Formatter errlog) throws IOException {

    TimedCollection collection = new TimedCollection(dcm, errlog);
    if (collection.getDatasets().size() == 0) {
      throw new FileNotFoundException("Collection is empty; spec="+dcm);
    }

    if (wantFeatureType == FeatureType.ANY_POINT) {
      TimedCollection.Dataset d = collection.getPrototype();
      FeatureDatasetPoint proto = (FeatureDatasetPoint) FeatureDatasetFactoryManager.open(FeatureType.ANY_POINT, d.getLocation(), null, errlog);
      wantFeatureType = proto.getFeatureType();
      proto.close(); // LOOK - try to use
    }
View Full Code Here

TOP

Related Classes of thredds.inventory.TimedCollection$Dataset

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.