DescribeFeatureTypeXMLAdapter extends AbstractWFSRequestXMLAdapter { public DescribeFeatureType parse() { Version version = determineVersion110Safe(); DescribeFeatureType result = null; if ( VERSION_100.equals( version ) ) { result = parse100(); } else if ( VERSION_110.equals( version ) ) { result = parse110(); } else if ( VERSION_200.equals( version ) ) { result = parse200(); } else { String msg = Messages.get( "UNSUPPORTED_VERSION", version, Version.getVersionsString( VERSION_100, VERSION_110, VERSION_200 ) ); throw new InvalidParameterValueException( msg ); } return result; }  DescribeFeatureType parse(); DescribeFeatureType parse100(); DescribeFeatureType parse110(); DescribeFeatureType parse200();  }
@Test public void test200Example01() throws Exception { DescribeFeatureTypeXMLAdapter parser = new DescribeFeatureTypeXMLAdapter(); parser.load( get200ExampleUrl( "DescribeFeatureType_Example01_Request.xml" ) ); DescribeFeatureType request = parser.parse(); assertEquals( VERSION_200, request.getVersion() ); assertEquals( null, request.getHandle() ); assertEquals( null, request.getOutputFormat() ); assertEquals( 2, request.getTypeNames().length ); assertEquals( QName.valueOf( "{http: assertEquals( QName.valueOf( "{http: }
@Test public void test200Example02() throws Exception { DescribeFeatureTypeXMLAdapter parser = new DescribeFeatureTypeXMLAdapter(); parser.load( get200ExampleUrl( "DescribeFeatureType_Example02_Request.xml" ) ); DescribeFeatureType request = parser.parse(); assertEquals( VERSION_200, request.getVersion() ); assertEquals( null, request.getHandle() ); assertEquals( "text/xml; subtype=gml/3.2", request.getOutputFormat() ); assertEquals( 1, request.getTypeNames().length ); }