本文整理了Java中org.n52.shetland.ogc.ows.extension.Extension
类的一些代码示例,展示了Extension
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Extension
类的具体详情如下:
包路径:org.n52.shetland.ogc.ows.extension.Extension
类名称:Extension
暂无
代码示例来源:origin: org.n52.arctic-sea/shetland
private boolean isFesFilterExtension(Extension<?> extension) {
return !((extension instanceof ResultFilter)
|| (extension instanceof SpatialFilter)
|| (extension instanceof SosSpatialFilter))
&& extension.getValue() instanceof Filter<?>;
}
代码示例来源:origin: 52North/SOS
@Override
protected Map<String, Object> getAsMap() {
if (extension == null) {
return null;
}
put(ObjectEsParameterFactory.EXTENSION_DEFINITION, extension.getDefinition());
put(ObjectEsParameterFactory.EXTENSION_IDENTIFIER, extension.getIdentifier());
put(ObjectEsParameterFactory.EXTENSION_VALUE, extension.getValue().toString());
return dataMap;
}
}
代码示例来源:origin: org.n52.arctic-sea/shetland
default boolean isSetNamespace() {
return getNamespace() != null && !getNamespace().isEmpty();
}
代码示例来源:origin: org.n52.svalbard/svalbard-xmlbeans
private void encodeOfferingExtension(SosObservationOffering sosOffering, ObservationOfferingType xbObsOff)
throws EncodingException {
for (Extension<?> extention : sosOffering.getExtensions().getExtensions()) {
if (extention.getValue() instanceof SosObservationOfferingExtension) {
SosObservationOfferingExtension extension = (SosObservationOfferingExtension) extention.getValue();
try {
xbObsOff.addNewExtension().set(XmlObject.Factory.parse(extension.getExtension()));
} catch (XmlException ex) {
throw errorEncodingSwesExtension(ex);
}
} else {
xbObsOff.addNewExtension().set(encodeObjectToXml(extention.getNamespace(), extention));
}
}
}
代码示例来源:origin: org.n52.arctic-sea/svalbard-json-common
protected Extension<SweAbstractDataComponent> parseExtension(JsonNode node) {
if (node.isObject() && node.has(JSONConstants.DEFINITION) && node.has(JSONConstants.VALUE)) {
if (node.path("value").isBoolean()) {
return new SwesExtension<SweAbstractDataComponent>()
.setDefinition(node.path(JSONConstants.DEFINITION).asText())
.setValue(new SweBoolean().setValue(node.path(JSONConstants.VALUE).asBoolean()));
} else if (node.path(JSONConstants.VALUE).isTextual()) {
return new SwesExtension<SweAbstractDataComponent>()
.setDefinition(node.path(JSONConstants.DEFINITION).asText())
.setValue(new SweText().setValue(node.path(JSONConstants.VALUE).asText()));
}
}
return null;
}
代码示例来源:origin: org.n52.shetland/shetland
default boolean isSetDefinition() {
return getDefinition() != null && !getDefinition().isEmpty();
}
代码示例来源:origin: org.n52.arctic-sea/shetland
default boolean isSetIdentifier() {
return getIdentifier() != null && !getIdentifier().isEmpty();
}
代码示例来源:origin: org.n52.sensorweb.sos/split-and-merge
private void checkGetObservationRequest(AbstractObservationRequest request) {
if (request.isSetResultModel()) {
if (OmConstants.OBS_TYPE_SWE_ARRAY_OBSERVATION.equals(request.getResultModel())) {
request.addExtension(new SwesExtension<SweBoolean>()
.setDefinition(Sos2Constants.Extensions.MergeObservationsIntoDataArray.name())
.setValue((SweBoolean) new SweBoolean().setValue(true)
.setDefinition(Sos2Constants.Extensions.MergeObservationsIntoDataArray.name())));
}
}
}
代码示例来源:origin: org.n52.arctic-sea/shetland
default boolean isSetDefinition() {
return getDefinition() != null && !getDefinition().isEmpty();
}
代码示例来源:origin: org.n52.shetland/shetland
default boolean isSetIdentifier() {
return getIdentifier() != null && !getIdentifier().isEmpty();
}
代码示例来源:origin: org.n52.shetland/shetland
private boolean isFesFilterExtension(Extension<?> extension) {
return extension.getValue() instanceof Filter<?>;
}
代码示例来源:origin: org.n52.sensorweb.sos/statistics
@Override
protected Map<String, Object> getAsMap() {
if (extension == null) {
return null;
}
put(ObjectEsParameterFactory.EXTENSION_DEFINITION, extension.getDefinition());
put(ObjectEsParameterFactory.EXTENSION_IDENTIFIER, extension.getIdentifier());
put(ObjectEsParameterFactory.EXTENSION_VALUE, extension.getValue().toString());
return dataMap;
}
}
代码示例来源:origin: 52North/SOS
private void checkGetObservationRequest(AbstractObservationRequest request) {
if (request.isSetResultModel()) {
if (OmConstants.OBS_TYPE_SWE_ARRAY_OBSERVATION.equals(request.getResultModel())) {
request.addExtension(new SwesExtension<SweBoolean>()
.setDefinition(Sos2Constants.Extensions.MergeObservationsIntoDataArray.name())
.setValue((SweBoolean) new SweBoolean().setValue(true)
.setDefinition(Sos2Constants.Extensions.MergeObservationsIntoDataArray.name())));
}
}
}
代码示例来源:origin: org.n52.shetland/shetland
default boolean isSetNamespace() {
return getNamespace() != null && !getNamespace().isEmpty();
}
代码示例来源:origin: org.n52.arctic-sea/svalbard-xmlstream
protected void writeExtensions(Extensions extensions) throws XMLStreamException, EncodingException {
for (Extension<?> extension : extensions.getExtensions()) {
if (extension.getValue() instanceof SweAbstractDataComponent) {
writeExtension((SweAbstractDataComponent) extension.getValue());
}
}
}
代码示例来源:origin: 52North/SOS
if (!Strings.isNullOrEmpty(isType) && Boolean.parseBoolean(isType)) {
SwesExtension<SweBoolean> extension = new SwesExtension<SweBoolean>();
extension.setDefinition("isType").setValue(new SweBoolean().setValue(true));
request.addExtension(extension);
isTypeRequest = true;
代码示例来源:origin: org.n52.svalbard/svalbard-xmlbeans
default void addExtension(ExtensibleRequestType ert, OwsServiceRequest request) throws EncodingException {
for (Extension<?> extension : request.getExtensions().getExtensions()) {
ert.addNewExtension().set(encodeObjectToXml(extension.getNamespace(), extension));
}
}
代码示例来源:origin: org.n52.arctic-sea/shetland
public static ReportObligationType getFlow(Extensions extensions) throws OwsExceptionReport {
return extensions.getExtension(AqdConstants.EXTENSION_FLOW)
.map(x -> x.getValue())
.flatMap(Functions.castIfInstanceOf(SweText.class))
.map(SweText::getValue)
.map(ReportObligationType::from)
.orElse(ReportObligationType.E2A);
}
}
代码示例来源:origin: org.n52.sensorweb.sos/binding-register
if (!Strings.isNullOrEmpty(isType) && Boolean.parseBoolean(isType)) {
SwesExtension<SweBoolean> extension = new SwesExtension<SweBoolean>();
extension.setDefinition("isType").setValue(new SweBoolean().setValue(true));
request.addExtension(extension);
isTypeRequest = true;
代码示例来源:origin: org.n52.shetland/shetland
public static ReportObligationType getFlow(Extensions extensions) throws OwsExceptionReport {
return extensions.getExtension(AqdConstants.EXTENSION_FLOW)
.map(x -> x.getValue())
.flatMap(Functions.castIfInstanceOf(SweText.class))
.map(SweText::getValue)
.map(ReportObligationType::from)
.orElse(ReportObligationType.E2A);
}
}
内容来源于网络,如有侵权,请联系作者删除!