本文整理了Java中org.n52.sos.ogc.om.values.Value.getValue()
方法的一些代码示例,展示了Value.getValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Value.getValue()
方法的具体详情如下:
包路径:org.n52.sos.ogc.om.values.Value
类名称:Value
方法名:getValue
暂无
代码示例来源:origin: org.n52.sensorweb.sos/coding-uvf
private String encodeObservationValue(Value<?> value) throws CodedException {
if (value == null || (value != null && !value.isSetValue())) {
return UVFConstants.NO_DATA_STRING;
}
if (!(value instanceof SweQuantity) && !(value instanceof SweCount)) {
String errorMessage = String.format("SweType '%s' not supported. Only '%s' and '%s'.",
value.getClass().getName(),
SweQuantity.class.getName(),
SweCount.class.getName());
LOGGER.error(errorMessage);
throw new NoApplicableCodeException().withMessage(errorMessage);
}
String encodedValue = JavaHelper.asString(value.getValue());
if (encodedValue.length()> UVFConstants.MAX_VALUE_LENGTH) {
encodedValue = encodedValue.substring(0, UVFConstants.MAX_VALUE_LENGTH);
}
return encodedValue;
}
代码示例来源:origin: org.n52.sensorweb.sos/coding-wml-v20
/**
* Get a value list from SOS TimeValuePair objects
*
* @param timeValuePairs
* SOS TimeValuePair objects
* @return List with value objects
* @throws OwsExceptionReport
* If an error occurs
*/
private List<Object> getValueList(List<TimeValuePair> timeValuePairs) throws OwsExceptionReport {
ArrayList<Object> values = new ArrayList<Object>(timeValuePairs.size());
for (TimeValuePair timeValuePair : timeValuePairs) {
if (timeValuePair.getValue() != null
&& (timeValuePair.getValue() instanceof CountValue || timeValuePair.getValue() instanceof QuantityValue)) {
values.add(timeValuePair.getValue().getValue());
}
}
return values;
}
代码示例来源:origin: org.n52.sensorweb.sos/aqd-split-and-merge
private void mergeValues(OmObservation combinedSosObs, OmObservation sosObservation) {
SweDataArray combinedValue = (SweDataArray) combinedSosObs.getValue().getValue().getValue();
SweDataArray value = (SweDataArray) sosObservation.getValue().getValue().getValue();
if (value.isSetValues()) {
combinedValue.addAll(value.getValues());
}
}
代码示例来源:origin: org.n52.sensorweb.sos/coding-inspire-omso
@Override
protected XmlObject encodeResult(ObservationValue<?> observationValue) throws OwsExceptionReport {
if (observationValue instanceof SingleObservationValue
&& observationValue.getValue() instanceof TimeLocationValueTriple) {
if (observationValue.getValue().getValue() instanceof QuantityValue
|| observationValue.getValue().getValue() instanceof CountValue) {
return createMeasurementTimeseries((AbstractObservationValue<?>) observationValue);
} else if (observationValue.getValue().getValue() instanceof CategoryValue) {
return createCategoricalTimeseries((AbstractObservationValue<?>) observationValue);
} else {
// TODO throw exception
}
} else if (observationValue instanceof MultiObservationValues) {
if (observationValue.getValue() instanceof TLVTValue) {
TimeLocationValueTriple value = (TimeLocationValueTriple) ((TLVTValue) observationValue.getValue())
.getValue().iterator().next();
if (value.getValue() instanceof QuantityValue || value.getValue() instanceof CountValue) {
return createMeasurementTimeseries((AbstractObservationValue<?>) observationValue);
} else if (value.getValue() instanceof CategoryValue) {
return createCategoricalTimeseries((AbstractObservationValue<?>) observationValue);
} else {
// TODO throw exception
}
}
}
return null;
}
代码示例来源:origin: org.n52.sensorweb.sos/inspire-api
/**
* Get the point from samplingGeometry or featureOfInterest
*
* @return The {@link Point}
*/
private Point getPoint() {
Point point = null;
if (isSetSpatialFilteringProfileParameter()) {
Geometry geometry = getSpatialFilteringProfileParameter().getValue().getValue();
point = geometry.getInteriorPoint();
point.setSRID(geometry.getSRID());
} else {
if (getObservationConstellation().getFeatureOfInterest() instanceof AbstractSamplingFeature
&& ((AbstractSamplingFeature) getObservationConstellation().getFeatureOfInterest()).isSetGeometry()) {
Geometry geometry =
((AbstractSamplingFeature) getObservationConstellation().getFeatureOfInterest()).getGeometry();
point = geometry.getInteriorPoint();
point.setSRID(geometry.getSRID());
}
}
return point;
}
代码示例来源:origin: org.n52.sensorweb.sos/inspire-api
if (isSetSpatialFilteringProfileParameter() && getSpatialFilteringProfileParameter().getValue() instanceof GeometryValue) {
GeometryValue geometryValue = (GeometryValue)getSpatialFilteringProfileParameter().getValue();
geometry = getSpatialFilteringProfileParameter().getValue().getValue();
domainExtent = geometryValue.getGmlId();
} else if (Strings.isNullOrEmpty(domainExtent) && checkForFeatureGeometry(this)) {
代码示例来源:origin: org.n52.sensorweb.sos/inspire-api
Geometry geometry = null;
if (isSetSpatialFilteringProfileParameter()) {
geometry = getSpatialFilteringProfileParameter().getValue().getValue();
} else {
if (getObservationConstellation().getFeatureOfInterest() instanceof AbstractSamplingFeature
代码示例来源:origin: org.n52.sensorweb.sos/inspire-api
double heightDepth = 0;
if (isSetHeightDepthParameter()) {
heightDepth = getHeightDepthParameter().getValue().getValue();
removeParameter(getHeightDepthParameter());
代码示例来源:origin: org.n52.sensorweb.sos/inspire-api
Geometry geometry = getSpatialFilteringProfileParameter().getValue().getValue();
if (factory == null && geometry != null) {
factory = geometry.getFactory();
内容来源于网络,如有侵权,请联系作者删除!