Tabnine Logo
SosContentCache.getObservationTypes
Code IndexAdd Tabnine to your IDE (free)

How to use
getObservationTypes
method
in
org.n52.sos.cache.SosContentCache

Best Java code snippets using org.n52.sos.cache.SosContentCache.getObservationTypes (Showing top 10 results out of 315)

origin: 52North/SOS

/**
 * Checks whether the specified observation type exists.
 *
 * @param observationType the observation type
 *
 * @return {@code true} if it exists
 */
default boolean hasObservationType(String observationType) {
  return getObservationTypes().contains(observationType);
}
origin: org.n52.sensorweb.sos/admin-controller

public static Map<String, String> getCacheValues() {
  SosContentCache cache = Configurator.getInstance().getCache();
  Map<String, String> values = new TreeMap<>();
  values.put(LAST_UPDATE_TIME, nullSafeToString(cache.getLastUpdateTime()));
  values.put(MIN_PHENOMENON_TIME, nullSafeToString(cache.getMinPhenomenonTime()));
  values.put(MAX_PHENOMENON_TIME, nullSafeToString(cache.getMaxPhenomenonTime()));
  values.put(MIN_RESULT_TIME, nullSafeToString(cache.getMinResultTime()));
  values.put(MAX_RESULT_TIME, nullSafeToString(cache.getMaxResultTime()));
  values.put(GLOBAL_ENVELOPE, nullSafeToString(cache.getGlobalEnvelope()));
  values.put(NUM_OFFERINGS, nullSafeToString(cache.getOfferings()));
  values.put(NUM_PROCEDURES, nullSafeToString(cache.getProcedures()));
  values.put(NUM_OBSERVABLE_PROPERTIES, nullSafeToString(cache.getObservableProperties()));
  values.put(NUM_FEATURES_OF_INTEREST, nullSafeToString(cache.getFeaturesOfInterest()));
  values.put(NUM_FEATURE_OF_INTEREST_TYPES, nullSafeToString(cache.getFeatureOfInterestTypes()));
  values.put(NUM_OBSERVATION_TYPES, nullSafeToString(cache.getObservationTypes()));
  values.put(NUM_RELATED_FEATURES, nullSafeToString(cache.getRelatedFeatures()));
  values.put(NUM_RESULT_TEMPLATES, nullSafeToString(cache.getResultTemplates()));
  values.put(DEFAULT_EPSG, Integer.toString(cache.getDefaultEPSGCode()));
  values.put(NUM_EPSGS, nullSafeToString(cache.getEpsgCodes()));
  return values;
}
origin: 52North/SOS

public static Map<String, String> getCacheValues() {
  SosContentCache cache = Configurator.getInstance().getCache();
  Map<String, String> values = new TreeMap<>();
  values.put(LAST_UPDATE_TIME, nullSafeToString(cache.getLastUpdateTime()));
  values.put(MIN_PHENOMENON_TIME, nullSafeToString(cache.getMinPhenomenonTime()));
  values.put(MAX_PHENOMENON_TIME, nullSafeToString(cache.getMaxPhenomenonTime()));
  values.put(MIN_RESULT_TIME, nullSafeToString(cache.getMinResultTime()));
  values.put(MAX_RESULT_TIME, nullSafeToString(cache.getMaxResultTime()));
  values.put(GLOBAL_ENVELOPE, nullSafeToString(cache.getGlobalEnvelope()));
  values.put(NUM_OFFERINGS, nullSafeToString(cache.getOfferings()));
  values.put(NUM_PROCEDURES, nullSafeToString(cache.getProcedures()));
  values.put(NUM_OBSERVABLE_PROPERTIES, nullSafeToString(cache.getObservableProperties()));
  values.put(NUM_FEATURES_OF_INTEREST, nullSafeToString(cache.getFeaturesOfInterest()));
  values.put(NUM_FEATURE_OF_INTEREST_TYPES, nullSafeToString(cache.getFeatureOfInterestTypes()));
  values.put(NUM_OBSERVATION_TYPES, nullSafeToString(cache.getObservationTypes()));
  values.put(NUM_RELATED_FEATURES, nullSafeToString(cache.getRelatedFeatures()));
  values.put(NUM_RESULT_TEMPLATES, nullSafeToString(cache.getResultTemplates()));
  values.put(DEFAULT_EPSG, Integer.toString(cache.getDefaultEPSGCode()));
  values.put(NUM_EPSGS, nullSafeToString(cache.getEpsgCodes()));
  return values;
}
origin: org.n52.sensorweb.sos/hibernate-handler

@Override
public OwsCapabilitiesExtension getExtension() {
  SosContentCache cache = getCache();
  SosInsertionCapabilities insertionCapabilities = new SosInsertionCapabilities();
  insertionCapabilities.addFeatureOfInterestTypes(cache.getFeatureOfInterestTypes());
  insertionCapabilities.addObservationTypes(cache.getObservationTypes());
  insertionCapabilities.addProcedureDescriptionFormats(this.procedureDescriptionFormatRepository
      .getSupportedProcedureDescriptionFormats(SosConstants.SOS, Sos2Constants.SERVICEVERSION));
  return insertionCapabilities;
}
origin: 52North/SOS

@Override
public OwsCapabilitiesExtension getExtension() {
  SosContentCache cache = getCache();
  SosInsertionCapabilities insertionCapabilities = new SosInsertionCapabilities();
  insertionCapabilities.addFeatureOfInterestTypes(cache.getFeatureOfInterestTypes());
  insertionCapabilities.addObservationTypes(cache.getObservationTypes());
  insertionCapabilities.addProcedureDescriptionFormats(this.procedureDescriptionFormatRepository
      .getSupportedProcedureDescriptionFormats(SosConstants.SOS, Sos2Constants.SERVICEVERSION));
  return insertionCapabilities;
}
origin: 52North/SOS

@Override
public OwsCapabilitiesExtension getExtension() {
  SosInsertionCapabilities insertionCapabilities = new SosInsertionCapabilities();
  SosContentCache cache = getCache();
  insertionCapabilities.addFeatureOfInterestTypes(cache.getFeatureOfInterestTypes());
  insertionCapabilities.addObservationTypes(cache.getObservationTypes());
  insertionCapabilities.addProcedureDescriptionFormats(procedureDescriptionFormatRepository
          .getSupportedProcedureDescriptionFormats(SosConstants.SOS, Sos2Constants.SERVICEVERSION));
  // TODO dynamic
  insertionCapabilities.addSupportedEncoding(SweConstants.ENCODING_TEXT);
  return insertionCapabilities;
}
origin: org.n52.sensorweb.sos/hibernate-handler

@Override
public OwsCapabilitiesExtension getExtension() {
  SosInsertionCapabilities insertionCapabilities = new SosInsertionCapabilities();
  SosContentCache cache = getCache();
  insertionCapabilities.addFeatureOfInterestTypes(cache.getFeatureOfInterestTypes());
  insertionCapabilities.addObservationTypes(cache.getObservationTypes());
  insertionCapabilities.addProcedureDescriptionFormats(procedureDescriptionFormatRepository
          .getSupportedProcedureDescriptionFormats(SosConstants.SOS, Sos2Constants.SERVICEVERSION));
  // TODO dynamic
  insertionCapabilities.addSupportedEncoding(SweConstants.ENCODING_TEXT);
  return insertionCapabilities;
}
origin: org.n52.sensorweb.sos/hibernate-handler

@Override
public OwsCapabilitiesExtension getExtension() {
  SosInsertionCapabilities insertionCapabilities = new SosInsertionCapabilities();
  SosContentCache cache = getCache();
  insertionCapabilities.addFeatureOfInterestTypes(cache.getFeatureOfInterestTypes());
  insertionCapabilities.addObservationTypes(cache.getObservationTypes());
  insertionCapabilities.addProcedureDescriptionFormats(procedureDescriptionFormatRepository
      .getSupportedProcedureDescriptionFormats(SosConstants.SOS, Sos2Constants.SERVICEVERSION));
  // TODO dynamic
  insertionCapabilities.addSupportedEncoding(SweConstants.ENCODING_TEXT);
  return insertionCapabilities;
}
origin: 52North/SOS

@Override
public OwsCapabilitiesExtension getExtension() {
  SosInsertionCapabilities insertionCapabilities = new SosInsertionCapabilities();
  SosContentCache cache = getCache();
  insertionCapabilities.addFeatureOfInterestTypes(cache.getFeatureOfInterestTypes());
  insertionCapabilities.addObservationTypes(cache.getObservationTypes());
  insertionCapabilities.addProcedureDescriptionFormats(procedureDescriptionFormatRepository
      .getSupportedProcedureDescriptionFormats(SosConstants.SOS, Sos2Constants.SERVICEVERSION));
  // TODO dynamic
  insertionCapabilities.addSupportedEncoding(SweConstants.ENCODING_TEXT);
  return insertionCapabilities;
}
origin: 52North/SOS

private void checkObservations(final InsertObservationRequest request) throws OwsExceptionReport {
  if (CollectionHelper.isEmpty(request.getObservations())) {
    throw new MissingObservationParameterException();
  } else {
    final SosContentCache cache = getCache();
    final CompositeOwsException exceptions = new CompositeOwsException();
    for (final OmObservation observation : request.getObservations()) {
      final OmObservationConstellation obsConstallation = observation.getObservationConstellation();
      checkObservationConstellationParameter(obsConstallation);
      // Requirement 67
      checkOrSetObservationType(observation, isSplitObservations(request));
      if (!cache.getObservationTypes().contains(obsConstallation.getObservationType())) {
        exceptions.add(new InvalidObservationTypeException(obsConstallation.getObservationType()));
      } else if (obsConstallation.isSetOfferings()) {
        for (final String offeringID : obsConstallation.getOfferings()) {
          final Collection<String> allowedObservationTypes = cache
              .getAllowedObservationTypesForOffering(offeringID);
          if ((allowedObservationTypes == null ||
               !allowedObservationTypes.contains(obsConstallation.getObservationType())) &&
               !request.isSetExtensionSplitDataArrayIntoObservations()) {
            exceptions.add(new InvalidObservationTypeForOfferingException(
                obsConstallation.getObservationType(), offeringID));
          }
        }
      }
    }
    exceptions.throwIfNotEmpty();
  }
}
org.n52.sos.cacheSosContentCachegetObservationTypes

Popular methods of SosContentCache

  • getOfferings
  • getObservableProperties
  • getFeatureOfInterestTypes
  • getProceduresForOffering
  • hasObservableProperty
  • hasOffering
  • getAllowedObservationTypesForOffering
  • getChildProcedures
  • getEpsgCodes
  • getOfferingsForProcedure
  • getProcedures
  • getPublishedObservableProperties
  • getProcedures,
  • getPublishedObservableProperties,
  • getPublishedOfferings,
  • hasResultTemplate,
  • getAllObservationTypesForOffering,
  • getCompositePhenomenonsForOffering,
  • getEnvelopeForOffering,
  • getFeaturesOfInterest,
  • getFeaturesOfInterestForOffering

Popular in Java

  • Making http post requests using okhttp
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • Kernel (java.awt.image)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now