FeatureIterator it = features.features();
for (; it.hasNext();) {
feature = (Feature) it.next();
count++;
{
PropertyName gmlName = ffac.property("gml:name");
PropertyName phenomName = ffac.property(phenomNamePath);
Object nameVal = gmlName.evaluate(feature, String.class);
assertNotNull("gml:name evaluated to null", nameVal);
Object phenomNameVal = phenomName.evaluate(feature, String.class);
assertNotNull(phenomNamePath + " evaluated to null", phenomNameVal);
}
{
PropertyName sampledFeatureName = ffac.property("sa:sampledFeature");
Attribute sampledFeatureVal = (Attribute) sampledFeatureName.evaluate(feature);
assertNotNull("sa:sampledFeature evaluated to null", sampledFeatureVal);
assertEquals(0, ((Collection) sampledFeatureVal.getValue()).size());
Map attributes = (Map) sampledFeatureVal.getUserData().get(Attributes.class);
assertNotNull(attributes);
Name xlinkTitle = name(XLINK.NAMESPACE, "title");
assertTrue(attributes.containsKey(xlinkTitle));
assertNotNull(attributes.get(xlinkTitle));
Name xlinkHref = name(XLINK.NAMESPACE, "href");
assertTrue(attributes.containsKey(xlinkHref));
assertNotNull(attributes.get(xlinkHref));
}
{
final String elementPath = "aw:relatedObservation/aw:PhenomenonTimeSeries/om:result/cv:CompactDiscreteTimeCoverage";
PropertyName elementName = ffac.property(elementPath);
Object timeCovVal = elementName.evaluate(feature);
assertNotNull(elementPath, timeCovVal);
assertTrue(timeCovVal instanceof Feature);
final List elements = (List) ((Feature) timeCovVal).getValue();
assertEquals(1, elements.size());
}