Hello all,
I'm hoping someone can help me resolve an issue I've been experiencing while 
using the app-schema plugin within GeoServer 2.10.0 using GeoTools 16.  I'm 
trying to map some DB data into a WXXM schema 
(http://www.wxxm.aero/schema/2.0/wxxm.xsd), but one of the elements refuses to 
encode.  I believe this is due to the manner in which the elements are defined, 
but the definitions are valid so I'm hoping there's something I can do to get 
the mapping to work.  

The elements in question are wxxm:DiscreteCoverage and wxxm:domainSet.  
wxxm:DiscreteCoverage extends gml:DiscreteCoverage, but does not add any 
attributes.  gml:DiscreteCoverage contains a gml:domainSet among other 
elements.  wxxm:domainSet is defined as a substitution for gml:domainSet.

The issue I see via the debugger is that when GMLEncodingUtils.java calls 
Schemas.getChildElementParticles(type, true); on line 157 passing in the 
wxxm:DiscreteCoverage type, the returned list of particles only contains 
gml:domainSet (which *does* list wxxm:domainSet as a substitionGroup within 
it).  Later on line 222 it uses the propertyName from the particles to attempt 
to retrieve properties from the feature to encode, but it does not attempt to 
use any substitutionGroup definitions for retrieval.

Depending on my mapping file I experience two different results from the call 
on line 222:  
1) If I defined the targetAttribute as wxxm:domainSet, then the call returns 
nothing and no domainSet element is encoded.
2) If I defined the targetAttribute as gml:domainSet (with targetAttributeNode 
of wxxm:DomainSetType), then the call returns the domainSet object, but it 
encodes it as a gml:domainSet which prevents any wxxm:domainSet elements from 
encoding.

Am I missing something in how this mapping is defined?  My expected output is 
as follows.

<wxxm:DiscreteCoverage gml:id="id0">
  <gml:name>Discrete_Coverage_Name</gml:name>
  <wxxm:domainSet>
    <wxxm:DomainObject gml:id="id1">
      <wxxm:elements>
         .
      </wxxm:elements>
    </wxxm:DomainObject>
  </wxxm:domainSet>
</wxxm:DiscreteCoverage>

Any help would be greatly appreciated.

Thanks,

Kevin M. Weiss
Software Engineer
CRITICAL NETWORKS / HARRIS CORPORATION
harris.comĀ  / [email protected]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to