Kevin, I think we just fixed this on GeoTools master:
[GEOT-5667] Fix app-schema property substitution group support https://osgeo-org.atlassian.net/browse/GEOT-5667 Please try the next GeoServer master nightly build, which will contain this fix. Kind regards, Ben. On 14/12/16 04:27, kweis...@harris.com wrote: > A little further down the rabbit hole I think I see the issue, but I'm still > not sure how to resolve it. Per the wxxm schema (add link) a > wxxm:DiscreteCoverage is just an extension of gml:DiscreteCoverage. It > doesn't add any elements, it just extends. wxxm:domainSet defines itself as > a substitution for gml:domainSet which exists under the gml:DiscreteCoverage. > > During the XML encoding GMLEncodingUtils.java inspects the schema and creates > a list of acceptable propertyNames (namespace & element name) that could be > present on the element. In my case, gml:domainSet is returned as a potential > propertyName. The problem is that in the next step (GMLEncodingUtils.java > L222) it tries to retrieve the properties from the feature hashmap by > propertyName, but gml:domainSet isn't present in the map, only wxxm:domainSet > so the match is not found and that section of the XML is not populated. > > The curious part is that the gml:domainSet attribute contains a > substitutionGroup List which does in fact contain a wxxm:domainSet > XSDElementDeclaration. Unfortunately, I don't see any code that inspects the > substitutionGroup. A simple change such as iterating over the > substitutionGroups and calling feature.getProperties(subGroupPropertyName) in > the event that the first getProperties(propertyName) returns an empty > collection might work, but could add significant processing time for complex > schemas. > > Does anyone have any other ideas or suggestions? > > Thanks, > > Kevin M. Weiss > Software Engineer > CRITICAL NETWORKS / HARRIS CORPORATION > harris.com / kevin.we...@harris.com > > > -----Original Message----- > From: kweis...@harris.com [mailto:kweis...@harris.com] > Sent: Monday, December 12, 2016 4:25 PM > To: Ben Caradoc-Davies <b...@transient.nz> > Cc: geoserver-users@lists.sourceforge.net > Subject: Re: [Geoserver-users] App-schema troubleshooting > > Hey Ben, > I tried your mapping suggestion, but the output remained the same. I even > downloaded and generated a mapping file via HALE (which is pretty cool btw), > but the same problem occurs. Stepping through the debugger I noticed that > when the BindingPropertyExtractor.java tries to load the properties for the > wxxm:DiscreteCoverage type, it finds a gml:domainSet element, but not the > wxxm:domainSet element which specifies the substitutionGroup="gml:domainSet". > Is there a trick to get app-schema to recognize substituionGroups as valid > replacements? > > Thanks, > > Kevin M. Weiss > Software Engineer > CRITICAL NETWORKS / HARRIS CORPORATION > harris.com / kevin.we...@harris.com > > -----Original Message----- > From: Ben Caradoc-Davies [mailto:b...@transient.nz] > Sent: Thursday, December 08, 2016 10:04 PM > To: Weiss, Kevin <kweis...@harris.com> > Cc: Nuno Oliveira <nuno.olive...@geo-solutions.it>; > geoserver-users@lists.sourceforge.net > Subject: Re: [Geoserver-users] App-schema troubleshooting > > Kevin, > > I think this is a feature chaining problem. The first thing I noticed is that > in discretecoverage.xml you have > <linkElement>discretecoverage_domain</linkElement> but I think this should > match the targetElement of the nested type (wxxm:DomainObject). I also saw > inputAttribute which might work but I think is meant for wrapping a > non-application-schema data access (I have never used this and had to look it > up). Can you just use OCQL as in the feature chaining guide? I threw in an > isMultiple for good measure, giving me: > > <AttributeMapping> > <targetAttribute>wxxm:domainSet</targetAttribute> > <sourceExpression> > <OCQL>id</OCQL> > <linkElement>wxxm:DomainObject</linkElement> > <linkField>FEATURE_LINK</linkField> > </sourceExpression> > <isMultiple>true</isMultiple> > <encodeIfEmpty>true</encodeIfEmpty> > </AttributeMapping> > > Kind regards, > Ben. > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most engaging tech > sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Geoserver-users mailing list > Geoserver-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-users > -- Ben Caradoc-Davies <b...@transient.nz> Director Transient Software Limited <http://transient.nz/> New Zealand ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users