use of net.opengis.filter.v_1_1_0.PropertyNameType in project ddf by codice.
the class CswFilterFactory method createDistanceBufferType.
@SuppressWarnings("unchecked")
private DistanceBufferType createDistanceBufferType(PropertyNameType propertyName, JAXBElement<? extends AbstractGeometryType> geometry, DistanceType distance) {
DistanceBufferType distanceBuffer = new DistanceBufferType();
distanceBuffer.setDistance(distance);
distanceBuffer.setGeometry((JAXBElement<AbstractGeometryType>) geometry);
distanceBuffer.setPropertyName(propertyName);
return distanceBuffer;
}
use of net.opengis.filter.v_1_1_0.PropertyNameType in project ddf by codice.
the class CswFilterFactory method createPropertyNameType.
private PropertyNameType createPropertyNameType(String propertyName) {
PropertyNameType propertyNameType = new PropertyNameType();
propertyNameType.setContent(Arrays.asList(new Object[] { propertyName }));
return propertyNameType;
}
use of net.opengis.filter.v_1_1_0.PropertyNameType in project ddf by codice.
the class CswQueryFactoryTest method createTemporalBinaryComparisonOpType.
private BinaryComparisonOpType createTemporalBinaryComparisonOpType(String attr, String comparison) {
BinaryComparisonOpType comparisonOp = new BinaryComparisonOpType();
PropertyNameType propName = new PropertyNameType();
propName.getContent().add(attr);
comparisonOp.getExpression().add(filterObjectFactory.createPropertyName(propName));
LiteralType literal = new LiteralType();
literal.getContent().add(comparison);
comparisonOp.getExpression().add(filterObjectFactory.createLiteral(literal));
return comparisonOp;
}
use of net.opengis.filter.v_1_1_0.PropertyNameType in project ddf by codice.
the class CswQueryFactoryTest method testPostGetRecordsValidSort.
@Test
public void testPostGetRecordsValidSort() throws CswException, UnsupportedQueryException, SourceUnavailableException, FederationException {
GetRecordsType grr = createDefaultPostRecordsRequest();
grr.setResultType(ResultType.RESULTS);
QueryType query = new QueryType();
SortByType incomingSort = new SortByType();
SortPropertyType propType = new SortPropertyType();
PropertyNameType propName = new PropertyNameType();
propName.setContent(Collections.singletonList(TITLE_TEST_ATTRIBUTE));
propType.setPropertyName(propName);
incomingSort.getSortProperty().add(propType);
query.setSortBy(incomingSort);
JAXBElement<QueryType> jaxbQuery = new JAXBElement<>(cswQnameOutPutSchema, QueryType.class, query);
grr.setAbstractQuery(jaxbQuery);
QueryRequest queryRequest = queryFactory.getQuery(grr);
SortBy resultSort = queryRequest.getQuery().getSortBy();
assertThat(resultSort.getPropertyName().getPropertyName(), is(CQL_FRAMEWORK_TEST_ATTRIBUTE));
assertThat(resultSort.getSortOrder(), is(SortOrder.ASCENDING));
}
use of net.opengis.filter.v_1_1_0.PropertyNameType in project ddf by codice.
the class CswQueryFactoryTest method createDistanceBufferType.
private DistanceBufferType createDistanceBufferType() {
DistanceBufferType distanceBuffer = new DistanceBufferType();
PropertyNameType propName = new PropertyNameType();
propName.getContent().add(SPATIAL_TEST_ATTRIBUTE);
distanceBuffer.setPropertyName(propName);
DistanceType distance = filterObjectFactory.createDistanceType();
distance.setUnits(REL_GEO_UNITS);
distance.setContent(Double.toString(REL_GEO_DISTANCE));
distanceBuffer.setDistance(distance);
distanceBuffer.setGeometry(createPolygon());
return distanceBuffer;
}
Aggregations