@Test public void parse_secondMine_returnsAspacia() throws IOException { XmlComplexFeatureParser mineParser = getParser("wfs_response_two_mines.xml"); mineParser.parse(); Feature feature = mineParser.parse(); Assert.assertEquals( "FeatureImpl:MineType<MineType id=er.mine.S0000005>=[ComplexAttributeImpl:MineNamePropertyType=[ComplexAttributeImpl:MineName<MineNameType>=[ComplexAttributeImpl:MineNameType=[AttributeImpl:isPreferred<boolean>=true, AttributeImpl:mineName<string>=Aspacia]]]]", feature.toString()); }
@Override public Feature parse() throws IOException { final String fid; try { if ((fid = seekFeature()) == null) { return null; } ReturnAttribute nextAttribute; while ((nextAttribute = parseNextAttribute(this.targetType)) != null) { if (!Property.class.isAssignableFrom(nextAttribute.value.getClass())) { featureBuilder.append( nextAttribute.name, new AttributeImpl( nextAttribute.value, (AttributeDescriptor) this.targetType.getDescriptor(nextAttribute.name), null)); } else { featureBuilder.append(nextAttribute.name, (Property) nextAttribute.value); } } } catch (XmlPullParserException e) { throw new DataSourceException(e); } Feature feature = featureBuilder.buildFeature(fid); if (filter == null || filter.evaluate(feature)) { return feature; } return null; }
XmlComplexFeatureParser extends XmlFeatureParser<FeatureType, Feature> { @Override public Feature parse() throws IOException { final String fid; try { if ((fid = seekFeature()) == null) { return null; } ReturnAttribute nextAttribute; while ((nextAttribute = parseNextAttribute(this.targetType)) != null) { if (!Property.class.isAssignableFrom(nextAttribute.value.getClass())) { featureBuilder.append( nextAttribute.name, new AttributeImpl( nextAttribute.value, (AttributeDescriptor) this.targetType.getDescriptor(nextAttribute.name), null)); } else { featureBuilder.append(nextAttribute.name, (Property) nextAttribute.value); } } } catch (XmlPullParserException e) { throw new DataSourceException(e); } Feature feature = featureBuilder.buildFeature(fid); if (filter == null || filter.evaluate(feature)) { return feature; } return null; } }
XmlComplexFeatureParser extends XmlFeatureParser<FeatureType, Feature> { @Override public Feature parse() throws IOException { final String fid; try { if ((fid = seekFeature()) == null) { return null; } ReturnAttribute nextAttribute; while ((nextAttribute = parseNextAttribute(this.targetType)) != null) { if (!Property.class.isAssignableFrom(nextAttribute.value.getClass())) { featureBuilder.append( nextAttribute.name, new AttributeImpl( nextAttribute.value, (AttributeDescriptor) this.targetType.getDescriptor(nextAttribute.name), null)); } else { featureBuilder.append(nextAttribute.name, (Property) nextAttribute.value); } } } catch (XmlPullParserException e) { throw new DataSourceException(e); } Feature feature = featureBuilder.buildFeature(fid); if (filter == null || filter.evaluate(feature)) { return feature; } return null; } XmlComplexFeatureParser(
            InputStream getFeatureResponseStream,
            FeatureType targetType,
            QName featureDescriptorName);  XmlComplexFeatureParser(
            InputStream getFeatureResponseStream,
            FeatureType targetType,
            QName featureDescriptorName,
            Filter filter); }
XmlComplexFeatureParser extends XmlFeatureParser<FeatureType, Feature> { @Override public Feature parse() throws IOException { final String fid; try { if ((fid = seekFeature()) == null) { return null; } ReturnAttribute nextAttribute; while ((nextAttribute = parseNextAttribute(this.targetType)) != null) { if (!Property.class.isAssignableFrom(nextAttribute.value.getClass())) { featureBuilder.append( nextAttribute.name, new AttributeImpl( nextAttribute.value, (AttributeDescriptor) this.targetType.getDescriptor(nextAttribute.name), null)); } else { featureBuilder.append(nextAttribute.name, (Property) nextAttribute.value); } } } catch (XmlPullParserException e) { throw new DataSourceException(e); } Feature feature = featureBuilder.buildFeature(fid); if (filter == null || filter.evaluate(feature)) { return feature; } return null; } XmlComplexFeatureParser(
            InputStream getFeatureResponseStream,
            FeatureType targetType,
            QName featureDescriptorName);  XmlComplexFeatureParser(
            InputStream getFeatureResponseStream,
            FeatureType targetType,
            QName featureDescriptorName,
            Filter filter); @Override Feature parse(); }
XmlComplexFeatureParser extends XmlFeatureParser<FeatureType, Feature> { @Override public Feature parse() throws IOException { final String fid; try { if ((fid = seekFeature()) == null) { return null; } ReturnAttribute nextAttribute; while ((nextAttribute = parseNextAttribute(this.targetType)) != null) { if (!Property.class.isAssignableFrom(nextAttribute.value.getClass())) { featureBuilder.append( nextAttribute.name, new AttributeImpl( nextAttribute.value, (AttributeDescriptor) this.targetType.getDescriptor(nextAttribute.name), null)); } else { featureBuilder.append(nextAttribute.name, (Property) nextAttribute.value); } } } catch (XmlPullParserException e) { throw new DataSourceException(e); } Feature feature = featureBuilder.buildFeature(fid); if (filter == null || filter.evaluate(feature)) { return feature; } return null; } XmlComplexFeatureParser(
            InputStream getFeatureResponseStream,
            FeatureType targetType,
            QName featureDescriptorName);  XmlComplexFeatureParser(
            InputStream getFeatureResponseStream,
            FeatureType targetType,
            QName featureDescriptorName,
            Filter filter); @Override Feature parse();  }