use of net.opengis.filter.v_1_1_0.PropertyNameType in project ddf by codice.
the class CswFilterFactory method createPropertyNameType.
private JAXBElement<PropertyNameType> createPropertyNameType(List<Object> propertyNameValues) {
JAXBElement<PropertyNameType> propertyNameType = filterObjectFactory.createPropertyName(new PropertyNameType());
propertyNameType.getValue().setContent(propertyNameValues);
return propertyNameType;
}
use of net.opengis.filter.v_1_1_0.PropertyNameType in project ddf by codice.
the class CswFilterFactory method createBinarySpatialOpTypeUsingEnvelope.
private BinarySpatialOpType createBinarySpatialOpTypeUsingEnvelope(PropertyNameType propertyName, JAXBElement<EnvelopeType> envelope) {
BinarySpatialOpType binarySpatialOpType = new BinarySpatialOpType();
binarySpatialOpType.setPropertyName(propertyName);
binarySpatialOpType.setEnvelope(envelope);
return binarySpatialOpType;
}
use of net.opengis.filter.v_1_1_0.PropertyNameType in project ddf by codice.
the class CswFilterFactory method createBinarySpatialOpType.
private BinarySpatialOpType createBinarySpatialOpType(PropertyNameType propertyName, String wkt, BinarySpatialOperand geometryOrEnvelope) {
BinarySpatialOpType binarySpatialOpType = null;
if (geometryOrEnvelope == BinarySpatialOperand.GEOMETRY) {
wkt = convertWktToLatLonOrdering(wkt);
Geometry geometry = getGeometryFromWkt(wkt);
JAXBElement<? extends AbstractGeometryType> geometryJaxbElement = convertGeometry(geometry);
binarySpatialOpType = createBinarySpatialOpTypeUsingGeometry(propertyName, geometryJaxbElement);
} else {
JAXBElement<EnvelopeType> envelopeJaxbElement = createEnvelopeType(wkt);
binarySpatialOpType = createBinarySpatialOpTypeUsingEnvelope(propertyName, envelopeJaxbElement);
}
return binarySpatialOpType;
}
use of net.opengis.filter.v_1_1_0.PropertyNameType in project ddf by codice.
the class AbstractCswSource method createSortBy.
private SortByType createSortBy(Query query) {
SortByType sortBy = null;
if (query.getSortBy() != null) {
sortBy = new SortByType();
SortPropertyType sortProperty = new SortPropertyType();
PropertyNameType propertyName = new PropertyNameType();
String propName;
if (query.getSortBy().getPropertyName() != null) {
propName = query.getSortBy().getPropertyName().getPropertyName();
if (propName != null) {
if (Result.TEMPORAL.equals(propName) || Metacard.ANY_DATE.equals(propName)) {
propName = Core.MODIFIED;
} else if (Result.RELEVANCE.equals(propName) || Metacard.ANY_TEXT.equals(propName)) {
propName = Core.TITLE;
} else if (Result.DISTANCE.equals(propName) || Metacard.ANY_GEO.equals(propName)) {
return null;
}
propertyName.setContent(Arrays.asList((Object) cswFilterDelegate.mapPropertyName(propName)));
sortProperty.setPropertyName(propertyName);
if (SortOrder.DESCENDING.equals(query.getSortBy().getSortOrder())) {
sortProperty.setSortOrder(SortOrderType.DESC);
} else {
sortProperty.setSortOrder(SortOrderType.ASC);
}
sortBy.getSortProperty().add(sortProperty);
}
} else {
return null;
}
}
return sortBy;
}
use of net.opengis.filter.v_1_1_0.PropertyNameType in project ddf by codice.
the class CswQueryFactoryTest method createBinarySpatialOpType.
private BinarySpatialOpType createBinarySpatialOpType() {
BinarySpatialOpType binarySpatialOps = new BinarySpatialOpType();
PropertyNameType propName = new PropertyNameType();
propName.getContent().add(SPATIAL_TEST_ATTRIBUTE);
binarySpatialOps.setPropertyName(propName);
binarySpatialOps.setGeometry(createPolygon());
return binarySpatialOps;
}
Aggregations