use of org.geosdi.geoplatform.xml.ows.v100.DomainType in project ddf by codice.
the class TestCswFilterDelegate method initCswFilterDelegate.
private CswFilterDelegate initCswFilterDelegate(FilterCapabilities filterCapabilities, CswSourceConfiguration cswSourceConfiguration) {
DomainType outputFormatValues = null;
DomainType resultTypesValues = null;
for (DomainType dt : getOperation().getParameter()) {
if (dt.getName().equals(CswConstants.OUTPUT_FORMAT_PARAMETER)) {
outputFormatValues = dt;
} else if (dt.getName().equals(CswConstants.RESULT_TYPE_PARAMETER)) {
resultTypesValues = dt;
}
}
CswFilterDelegate cswFilterDelegate = new CswFilterDelegate(getOperation(), filterCapabilities, outputFormatValues, resultTypesValues, cswSourceConfiguration);
return cswFilterDelegate;
}
use of org.geosdi.geoplatform.xml.ows.v100.DomainType in project ddf by codice.
the class TestCswFilterDelegate method createCswFilterDelegate.
private CswFilterDelegate createCswFilterDelegate(CswSourceConfiguration cswSourceConfiguration, MetacardType type) {
DomainType outputFormatValues = null;
DomainType resultTypesValues = null;
for (DomainType dt : getOperation().getParameter()) {
if (dt.getName().equals(CswConstants.OUTPUT_FORMAT_PARAMETER)) {
outputFormatValues = dt;
} else if (dt.getName().equals(CswConstants.RESULT_TYPE_PARAMETER)) {
resultTypesValues = dt;
}
}
CswFilterDelegate cswFilterDelegate = new CswFilterDelegate(getOperation(), getMockFilterCapabilities(), outputFormatValues, resultTypesValues, cswSourceConfiguration);
return cswFilterDelegate;
}
use of org.geosdi.geoplatform.xml.ows.v100.DomainType in project ddf by codice.
the class TestCswCqlFilter method initDefaultCswFilterDelegate.
private CswFilterDelegate initDefaultCswFilterDelegate(CswSourceConfiguration cswSourceConfiguration) {
DomainType outputFormatValues = null;
DomainType resultTypesValues = null;
for (DomainType dt : getOperation().getParameter()) {
if (dt.getName().equals(CswConstants.OUTPUT_FORMAT_PARAMETER)) {
outputFormatValues = dt;
} else if (dt.getName().equals(CswConstants.RESULT_TYPE_PARAMETER)) {
resultTypesValues = dt;
}
}
CswFilterDelegate localCswFilterDelegate = new CswFilterDelegate(getOperation(), getMockFilterCapabilities(), outputFormatValues, resultTypesValues, cswSourceConfiguration);
return localCswFilterDelegate;
}
use of org.geosdi.geoplatform.xml.ows.v100.DomainType in project arctic-sea by 52North.
the class OwsEncoderv110 method encode.
@Override
public XmlObject encode(Object element, EncodingContext additionalValues) throws EncodingException {
if (element instanceof OwsServiceIdentification) {
return encodeServiceIdentification((OwsServiceIdentification) element);
} else if (element instanceof OwsServiceProvider) {
return encodeServiceProvider((OwsServiceProvider) element);
} else if (element instanceof OwsOperationsMetadata) {
return encodeOperationsMetadata((OwsOperationsMetadata) element);
} else if (element instanceof OwsExceptionReport) {
if (isEncodeExceptionsOnly(additionalValues) && !((OwsExceptionReport) element).getExceptions().isEmpty()) {
return encodeOwsException(((OwsExceptionReport) element).getExceptions().get(0));
}
return encodeOwsExceptionReport((OwsExceptionReport) element);
} else if (element instanceof OwsMetadata) {
MetadataType metadataType = MetadataType.Factory.newInstance(getXmlOptions());
encodeOwsMetadata((OwsMetadata) element, metadataType);
return metadataType;
} else if (element instanceof OwsDomain) {
DomainType domainType = DomainType.Factory.newInstance(getXmlOptions());
encodeOwsDomain((OwsDomain) element, domainType);
return domainType;
} else if (element instanceof OwsAcceptVersions) {
return encodeAcceptVersions((OwsAcceptVersions) element);
} else if (element instanceof OwsSections) {
return encodeSections((OwsSections) element);
}
throw new UnsupportedEncoderInputException(this, element);
}
use of org.geosdi.geoplatform.xml.ows.v100.DomainType in project geo-platform by geosdi.
the class GPCSWOutputSchemaFinder method retrieveRequestOutputSchemas.
/**
* Retrieve for a Catalog server the OutputSchema supported from Request
* operation. This information in present into GetCapabilities request.
*/
private List<String> retrieveRequestOutputSchemas(GPCatalogConnectorStore serverConnector, String requestType) throws Exception {
List<String> schemas = null;
try {
CatalogGetCapabilitiesRequest<CapabilitiesType> request = serverConnector.createGetCapabilitiesRequest();
CapabilitiesType response = request.getResponse();
List<Operation> operationList = response.getOperationsMetadata().getOperation();
for (Operation operation : operationList) {
if (requestType.equals(operation.getName())) {
List<DomainType> parameterList = operation.getParameter();
schemas = new ArrayList<>(parameterList.size());
for (DomainType parameter : parameterList) {
if ("outputSchema".equals(parameter.getName())) {
for (String outputSchemaValue : parameter.getValue()) {
logger.trace("\n*** outputSchema available: {}", outputSchemaValue);
schemas.add(outputSchemaValue.trim());
}
break;
}
}
break;
}
}
} catch (IOException ex) {
logger.error("### IOException: {}", ex.getMessage());
throw new IllegalParameterFault("Error on parse response stream");
}
return schemas;
}
Aggregations