use of net.opengis.filter.v_2_0_0.ResourceIdType in project ddf by codice.
the class TestWfsFilterDelegate method testFeatureTypeFeatureID.
@Test
public void testFeatureTypeFeatureID() throws Exception {
String mockProperty = "myPropertyName";
String mockType = "myType";
WfsFilterDelegate delegate = mockFeatureMetacardCreateDelegate(mockProperty, mockType);
String featureId = "1234567";
String mockTypeFeatureId = mockType + "." + featureId;
//Perform Test
FilterType matchIdFilter = delegate.propertyIsEqualTo(Metacard.ID, mockTypeFeatureId, true);
//Verify
assertThat(((ResourceIdType) matchIdFilter.getId().get(0).getValue()).getRid(), is(mockTypeFeatureId));
}
use of net.opengis.filter.v_2_0_0.ResourceIdType in project ddf by codice.
the class WfsFilterDelegate method createFeatureIdFilter.
private JAXBElement<ResourceIdType> createFeatureIdFilter(final String id) {
ResourceIdType resId = new ResourceIdType();
resId.setRid(id);
ObjectFactory objFact = new ObjectFactory();
return objFact.createResourceId(resId);
}
use of net.opengis.filter.v_2_0_0.ResourceIdType in project ddf by codice.
the class WfsFilterDelegate method buildFeatureIdFilter.
private FilterType buildFeatureIdFilter(Set<String> ids) {
FilterType filterType = new FilterType();
for (String id : ids) {
List<JAXBElement<? extends AbstractIdType>> idFilterTypeList = filterType.getId();
ResourceIdType resId = new ResourceIdType();
resId.setRid(id);
idFilterTypeList.add(filterObjectFactory.createResourceId(resId));
}
return filterType;
}
use of net.opengis.filter.v_2_0_0.ResourceIdType in project ddf by codice.
the class WfsFilterDelegateTest method testFeatureTypeFeatureID.
@Test
public void testFeatureTypeFeatureID() {
String mockProperty = "myPropertyName";
String mockType = "myType";
WfsFilterDelegate delegate = mockFeatureMetacardCreateDelegate(mockProperty, mockType);
String featureId = "1234567";
String mockTypeFeatureId = mockType + "." + featureId;
// Perform Test
FilterType matchIdFilter = delegate.propertyIsEqualTo(Metacard.ID, mockTypeFeatureId, true);
// Verify
assertThat(((ResourceIdType) matchIdFilter.getId().get(0).getValue()).getRid(), is(mockTypeFeatureId));
}
use of net.opengis.filter.v_2_0_0.ResourceIdType in project ddf by codice.
the class WfsFilterDelegateTest method testFeatureID.
@Test
public void testFeatureID() {
String mockProperty = "myPropertyName";
String mockType = "myType";
WfsFilterDelegate delegate = mockFeatureMetacardCreateDelegate(mockProperty, mockType);
String featureId = "1234567";
// Perform Test
FilterType matchIdFilter = delegate.propertyIsLike(Metacard.ID, featureId, true);
// Verify
assertThat(((ResourceIdType) matchIdFilter.getId().get(0).getValue()).getRid(), is(featureId));
}
Aggregations