Search in sources :

Example 11 with DomainType

use of net.opengis.ows.x11.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 12 with DomainType

use of net.opengis.ows.x11.DomainType in project ddf by codice.

the class MockWfsServer method getFilterCapabilities.

public static FilterCapabilities getFilterCapabilities() {
    FilterCapabilities capabilities = new FilterCapabilities();
    ConformanceType conformance = new ConformanceType();
    for (CONFORMANCE_CONSTRAINTS constraint : CONFORMANCE_CONSTRAINTS.values()) {
        DomainType domain = new DomainType();
        NoValues noValues = new NoValues();
        domain.setNoValues(noValues);
        ValueType value = new ValueType();
        value.setValue("TRUE");
        domain.setDefaultValue(value);
        domain.setName(constraint.toString());
        conformance.getConstraint().add(domain);
    }
    capabilities.setConformance(conformance);
    ScalarCapabilitiesType scalar = new ScalarCapabilitiesType();
    scalar.setLogicalOperators(new LogicalOperators());
    scalar.setComparisonOperators(new ComparisonOperatorsType());
    for (COMPARISON_OPERATORS compOp : COMPARISON_OPERATORS.values()) {
        ComparisonOperatorType operator = new ComparisonOperatorType();
        operator.setName(compOp.toString());
        scalar.getComparisonOperators().getComparisonOperator().add(operator);
    }
    capabilities.setScalarCapabilities(scalar);
    SpatialCapabilitiesType spatial = new SpatialCapabilitiesType();
    spatial.setSpatialOperators(new SpatialOperatorsType());
    for (SPATIAL_OPERATORS spatialOp : SPATIAL_OPERATORS.values()) {
        SpatialOperatorType operator = new SpatialOperatorType();
        operator.setName(spatialOp.toString());
        spatial.getSpatialOperators().getSpatialOperator().add(operator);
    }
    GeometryOperandsType geometryOperands = new GeometryOperandsType();
    List<QName> qnames = Arrays.asList(Wfs20Constants.POINT, Wfs20Constants.ENVELOPE, Wfs20Constants.POLYGON, Wfs20Constants.LINESTRING);
    for (QName qName : qnames) {
        GeometryOperand operand = new GeometryOperand();
        operand.setName(qName);
        geometryOperands.getGeometryOperand().add(operand);
    }
    spatial.setGeometryOperands(geometryOperands);
    capabilities.setSpatialCapabilities(spatial);
    TemporalCapabilitiesType temporal = new TemporalCapabilitiesType();
    temporal.setTemporalOperators(new TemporalOperatorsType());
    for (TEMPORAL_OPERATORS temporalOp : TEMPORAL_OPERATORS.values()) {
        TemporalOperatorType operator = new TemporalOperatorType();
        operator.setName(temporalOp.toString());
        temporal.getTemporalOperators().getTemporalOperator().add(operator);
    }
    TemporalOperandsType temporalOperands = new TemporalOperandsType();
    List<QName> timeQNames = Arrays.asList(new QName(Wfs20Constants.GML_3_2_NAMESPACE, "TimePeriod"), new QName(Wfs20Constants.GML_3_2_NAMESPACE, "TimeInstant"));
    for (QName qName : timeQNames) {
        TemporalOperand operand = new TemporalOperand();
        operand.setName(qName);
        temporalOperands.getTemporalOperand().add(operand);
    }
    temporal.setTemporalOperands(temporalOperands);
    capabilities.setTemporalCapabilities(temporal);
    return capabilities;
}
Also used : SpatialCapabilitiesType(net.opengis.filter.v_2_0_0.SpatialCapabilitiesType) FilterCapabilities(net.opengis.filter.v_2_0_0.FilterCapabilities) DomainType(net.opengis.ows.v_1_1_0.DomainType) SpatialOperatorsType(net.opengis.filter.v_2_0_0.SpatialOperatorsType) GeometryOperandsType(net.opengis.filter.v_2_0_0.GeometryOperandsType) TemporalOperatorsType(net.opengis.filter.v_2_0_0.TemporalOperatorsType) NoValues(net.opengis.ows.v_1_1_0.NoValues) ComparisonOperatorType(net.opengis.filter.v_2_0_0.ComparisonOperatorType) TemporalOperand(net.opengis.filter.v_2_0_0.TemporalOperandsType.TemporalOperand) ConformanceType(net.opengis.filter.v_2_0_0.ConformanceType) COMPARISON_OPERATORS(org.codice.ddf.spatial.ogc.wfs.v2_0_0.catalog.common.Wfs20Constants.COMPARISON_OPERATORS) TemporalCapabilitiesType(net.opengis.filter.v_2_0_0.TemporalCapabilitiesType) SPATIAL_OPERATORS(org.codice.ddf.spatial.ogc.wfs.v2_0_0.catalog.common.Wfs20Constants.SPATIAL_OPERATORS) ValueType(net.opengis.ows.v_1_1_0.ValueType) QName(javax.xml.namespace.QName) SpatialOperatorType(net.opengis.filter.v_2_0_0.SpatialOperatorType) TEMPORAL_OPERATORS(org.codice.ddf.spatial.ogc.wfs.v2_0_0.catalog.common.Wfs20Constants.TEMPORAL_OPERATORS) LogicalOperators(net.opengis.filter.v_2_0_0.LogicalOperators) GeometryOperand(net.opengis.filter.v_2_0_0.GeometryOperandsType.GeometryOperand) CONFORMANCE_CONSTRAINTS(org.codice.ddf.spatial.ogc.wfs.v2_0_0.catalog.common.Wfs20Constants.CONFORMANCE_CONSTRAINTS) ComparisonOperatorsType(net.opengis.filter.v_2_0_0.ComparisonOperatorsType) ScalarCapabilitiesType(net.opengis.filter.v_2_0_0.ScalarCapabilitiesType) TemporalOperatorType(net.opengis.filter.v_2_0_0.TemporalOperatorType) TemporalOperandsType(net.opengis.filter.v_2_0_0.TemporalOperandsType)

Example 13 with DomainType

use of net.opengis.ows.x11.DomainType in project ddf by codice.

the class CswEndpoint method createDomainType.

private DomainType createDomainType(String name, List<String> params) {
    DomainType dt = new DomainType();
    dt.setName(name);
    dt.setValue(params);
    return dt;
}
Also used : DomainType(net.opengis.ows.v_1_0_0.DomainType)

Example 14 with DomainType

use of net.opengis.ows.x11.DomainType in project ddf by codice.

the class AbstractCswSource method canRetrieveResourceById.

/**
     * Determine if the resource should be retrieved using a ResourceReader or by calling
     * GetRecordById.
     */
private boolean canRetrieveResourceById() {
    OperationsMetadata operationsMetadata = capabilities.getOperationsMetadata();
    Operation getRecordByIdOp = getOperation(operationsMetadata, CswConstants.GET_RECORD_BY_ID);
    if (getRecordByIdOp != null) {
        DomainType getRecordByIdOutputSchemas = getParameter(getRecordByIdOp, CswConstants.OUTPUT_SCHEMA_PARAMETER);
        if (getRecordByIdOutputSchemas != null && getRecordByIdOutputSchemas.getValue() != null && getRecordByIdOutputSchemas.getValue().contains(OCTET_STREAM_OUTPUT_SCHEMA)) {
            return true;
        }
    }
    return false;
}
Also used : OperationsMetadata(net.opengis.ows.v_1_0_0.OperationsMetadata) DomainType(net.opengis.ows.v_1_0_0.DomainType) Operation(net.opengis.ows.v_1_0_0.Operation)

Example 15 with DomainType

use of net.opengis.ows.x11.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)

Aggregations

DomainType (net.opengis.ows.v_1_0_0.DomainType)13 ArrayList (java.util.ArrayList)8 Operation (net.opengis.ows.v_1_0_0.Operation)8 OperationsMetadata (net.opengis.ows.v_1_0_0.OperationsMetadata)4 CapabilitiesType (net.opengis.cat.csw.v_2_0_2.CapabilitiesType)3 ConformanceType (net.opengis.filter.v_2_0_0.ConformanceType)3 FilterCapabilities (net.opengis.filter.v_2_0_0.FilterCapabilities)3 DomainType (net.opengis.ows.v_1_1_0.DomainType)3 ValueType (net.opengis.ows.v_1_1_0.ValueType)3 Test (org.junit.Test)3 GetCapabilitiesType (net.opengis.cat.csw.v_2_0_2.GetCapabilitiesType)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 SortByImpl (ddf.catalog.filter.impl.SortByImpl)1 QueryImpl (ddf.catalog.operation.impl.QueryImpl)1 SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1