Search in sources :

Example 26 with DomainType

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;
}
Also used : DomainType(net.opengis.ows.v_1_0_0.DomainType)

Example 27 with DomainType

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;
}
Also used : DomainType(net.opengis.ows.v_1_0_0.DomainType)

Example 28 with DomainType

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;
}
Also used : DomainType(net.opengis.ows.v_1_0_0.DomainType)

Example 29 with DomainType

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);
}
Also used : OwsDomain(org.n52.shetland.ogc.ows.OwsDomain) DomainType(net.opengis.ows.x11.DomainType) OwsOperationsMetadata(org.n52.shetland.ogc.ows.OwsOperationsMetadata) OwsMetadata(org.n52.shetland.ogc.ows.OwsMetadata) OwsSections(org.n52.shetland.ogc.ows.OwsSections) OwsServiceProvider(org.n52.shetland.ogc.ows.OwsServiceProvider) MetadataType(net.opengis.ows.x11.MetadataType) DomainMetadataType(net.opengis.ows.x11.DomainMetadataType) OwsServiceIdentification(org.n52.shetland.ogc.ows.OwsServiceIdentification) OwsExceptionReport(org.n52.shetland.ogc.ows.exception.OwsExceptionReport) OwsAcceptVersions(org.n52.shetland.ogc.ows.OwsAcceptVersions) UnsupportedEncoderInputException(org.n52.svalbard.encode.exception.UnsupportedEncoderInputException)

Example 30 with DomainType

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;
}
Also used : IllegalParameterFault(org.geosdi.geoplatform.exception.IllegalParameterFault) DomainType(org.geosdi.geoplatform.xml.ows.v100.DomainType) CapabilitiesType(org.geosdi.geoplatform.xml.csw.v202.CapabilitiesType) Operation(org.geosdi.geoplatform.xml.ows.v100.Operation) IOException(java.io.IOException)

Aggregations

DomainType (net.opengis.ows.v_1_0_0.DomainType)21 ArrayList (java.util.ArrayList)13 Operation (net.opengis.ows.v_1_0_0.Operation)13 Test (org.junit.Test)9 CapabilitiesType (net.opengis.cat.csw.v_2_0_2.CapabilitiesType)5 ConformanceType (net.opengis.filter.v_2_0_0.ConformanceType)5 FilterCapabilities (net.opengis.filter.v_2_0_0.FilterCapabilities)5 OperationsMetadata (net.opengis.ows.v_1_0_0.OperationsMetadata)5 DomainType (net.opengis.ows.v_1_1_0.DomainType)5 ValueType (net.opengis.ows.v_1_1_0.ValueType)5 GetCapabilitiesType (net.opengis.cat.csw.v_2_0_2.GetCapabilitiesType)4 CswException (org.codice.ddf.spatial.ogc.csw.catalog.common.CswException)4 SortByImpl (ddf.catalog.filter.impl.SortByImpl)2 QueryImpl (ddf.catalog.operation.impl.QueryImpl)2 GetCapabilitiesRequest (org.codice.ddf.spatial.ogc.csw.catalog.common.GetCapabilitiesRequest)2 Joiner (com.google.common.base.Joiner)1 Sets (com.google.common.collect.Sets)1 Metacard (ddf.catalog.data.Metacard)1 MetacardImpl (ddf.catalog.data.impl.MetacardImpl)1 SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)1