Discussion:
[Geoserver-users] App-schema troubleshooting
k***@harris.com
2016-12-08 14:52:34 UTC
Permalink
Hello again everyone,
I'm working on creating some app-schema mapping files for some complex schemas and have been having a few issues. Specifically, I've got some elements that for some reason refuse to populate. I don't get any errors during boot up nor when a request is processed, the element is just omitted in the final output. With verbose logging enabled it appears that the data is loaded. A TRACE log message [org.geotools.data.complex.filter] displays when a request is made and does contain the element (and sub-elements) in question.

I'm curious if there's any additional troubleshooting I can perform to figure out this issue.

GeoServer: 2.10.0
Tomcat: 8.0.33

Thanks,

Kevin M. Weiss
Software Engineer
CRITICAL NETWORKS / HARRIS CORPORATION
harris.com  / ***@harris.com
Nuno Oliveira
2016-12-08 16:03:17 UTC
Permalink
Hello,

I have the same issue and unfortunately I didn't find any nice way to
troubleshot this kind of problems too.
So if someone knows a better way to do this kind of trouble shooting I
would love to hear it too.

So far I rely on debugging to understand what I "did wrong" with my
mappings.
I typically put a debug point around this lines and check if the complex
entity as all the expected info:
https://github.com/geotools/geotools/blob/master/modules/extension/xsd/xsd-core/src/main/java/org/geotools/xml/Encoder.java#L759-L775

In my case when I don't get the data encoded this typically means that
the Encoder doesn't like my XML schema and refuses to encode the data.
So try to paste the excerpt of your schema that is not encoded here with
some context (the schema and the mappings) and maybe someone will give
you some feedback (I will try).

Regards,

Nuno Oliveira
Post by k***@harris.com
Hello again everyone,
I'm working on creating some app-schema mapping files for some complex schemas and have been having a few issues. Specifically, I've got some elements that for some reason refuse to populate. I don't get any errors during boot up nor when a request is processed, the element is just omitted in the final output. With verbose logging enabled it appears that the data is loaded. A TRACE log message [org.geotools.data.complex.filter] displays when a request is made and does contain the element (and sub-elements) in question.
I'm curious if there's any additional troubleshooting I can perform to figure out this issue.
GeoServer: 2.10.0
Tomcat: 8.0.33
Thanks,
Kevin M. Weiss
Software Engineer
CRITICAL NETWORKS / HARRIS CORPORATION
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
==
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.
==
Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono
da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate
nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e
-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo
anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of
the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree
June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying,
distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender does not give any warranty or accept liability as the content,
accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which
arise as a result of e-mail transmission, viruses, etc.
Ben Caradoc-Davies
2016-12-08 18:02:47 UTC
Permalink
Yes, the debugger is my tool of choice as well. Another important
breakpoint is gt-app-schema
DataAccessMappingFeatureIterator.computeNext, where you can see features
being built and check their content:
https://github.com/geotools/geotools/blob/master/modules/extension/app-schema/app-schema/src/main/java/org/geotools/data/complex/DataAccessMappingFeatureIterator.java#L968

Other things to try before the debugger include targetAttributeNode if
your types are too general, although app-schema is now quite good at
searching substitution groups.

Kevin, what elements are missing and what is their type?

Kind regards,
Ben.
Post by Nuno Oliveira
Hello,
I have the same issue and unfortunately I didn't find any nice way to
troubleshot this kind of problems too.
So if someone knows a better way to do this kind of trouble shooting I
would love to hear it too.
So far I rely on debugging to understand what I "did wrong" with my
mappings.
I typically put a debug point around this lines and check if the complex
https://github.com/geotools/geotools/blob/master/modules/extension/xsd/xsd-core/src/main/java/org/geotools/xml/Encoder.java#L759-L775
In my case when I don't get the data encoded this typically means that
the Encoder doesn't like my XML schema and refuses to encode the data.
So try to paste the excerpt of your schema that is not encoded here with
some context (the schema and the mappings) and maybe someone will give
you some feedback (I will try).
Regards,
Nuno Oliveira
Post by k***@harris.com
Hello again everyone,
I'm working on creating some app-schema mapping files for some complex schemas and have been having a few issues. Specifically, I've got some elements that for some reason refuse to populate. I don't get any errors during boot up nor when a request is processed, the element is just omitted in the final output. With verbose logging enabled it appears that the data is loaded. A TRACE log message [org.geotools.data.complex.filter] displays when a request is made and does contain the element (and sub-elements) in question.
I'm curious if there's any additional troubleshooting I can perform to figure out this issue.
GeoServer: 2.10.0
Tomcat: 8.0.33
Thanks,
Kevin M. Weiss
Software Engineer
CRITICAL NETWORKS / HARRIS CORPORATION
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
k***@harris.com
2016-12-08 21:24:55 UTC
Permalink
I figured the debugger was the way to go, but hoped there was an easier way. :P

I'll take a look at the recommended breakpoints and see if I can figure out what's happening. The element I'm trying to encode is a wxxm:DiscreteCoverage which should have a wxxm:domainSet element with 0-N wxxm:DomainObject within. DiscreteCoverage displays fine as does any gml prefixed elements within it, but the wxxm:domainSet refuses to encode (along with any of its children). I've tried specifying the complexType via targetAttributeNode as I've had that issue before, but it hasn't made a difference here.

The wxxm schema is available here (http://www.wxxm.aero/schema/2.0/wxxm.xsd) with the objects in question present in the adjacent coverage.xsd file.

Thanks for the assistance,

Kevin M. Weiss
Software Engineer
CRITICAL NETWORKS / HARRIS CORPORATION
harris.com / ***@harris.com

-----Original Message-----
From: Ben Caradoc-Davies [mailto:***@transient.nz]
Sent: Thursday, December 08, 2016 12:03 PM
To: Nuno Oliveira <***@geo-solutions.it>; Weiss, Kevin <***@harris.com>
Cc: geoserver-***@lists.sourceforge.net
Subject: Re: [Geoserver-users] App-schema troubleshooting

Yes, the debugger is my tool of choice as well. Another important breakpoint is gt-app-schema DataAccessMappingFeatureIterator.computeNext, where you can see features being built and check their content:
https://github.com/geotools/geotools/blob/master/modules/extension/app-schema/app-schema/src/main/java/org/geotools/data/complex/DataAccessMappingFeatureIterator.java#L968

Other things to try before the debugger include targetAttributeNode if your types are too general, although app-schema is now quite good at searching substitution groups.

Kevin, what elements are missing and what is their type?

Kind regards,
Ben.
Post by Nuno Oliveira
Hello,
I have the same issue and unfortunately I didn't find any nice way to
troubleshot this kind of problems too.
So if someone knows a better way to do this kind of trouble shooting I
would love to hear it too.
So far I rely on debugging to understand what I "did wrong" with my
mappings.
I typically put a debug point around this lines and check if the
https://github.com/geotools/geotools/blob/master/modules/extension/xsd
/xsd-core/src/main/java/org/geotools/xml/Encoder.java#L759-L775
In my case when I don't get the data encoded this typically means that
the Encoder doesn't like my XML schema and refuses to encode the data.
So try to paste the excerpt of your schema that is not encoded here
with some context (the schema and the mappings) and maybe someone will
give you some feedback (I will try).
Regards,
Nuno Oliveira
Post by k***@harris.com
Hello again everyone,
I'm working on creating some app-schema mapping files for some complex schemas and have been having a few issues. Specifically, I've got some elements that for some reason refuse to populate. I don't get any errors during boot up nor when a request is processed, the element is just omitted in the final output. With verbose logging enabled it appears that the data is loaded. A TRACE log message [org.geotools.data.complex.filter] displays when a request is made and does contain the element (and sub-elements) in question.
I'm curious if there's any additional troubleshooting I can perform to figure out this issue.
GeoServer: 2.10.0
Tomcat: 8.0.33
Thanks,
Kevin M. Weiss
Software Engineer
CRITICAL NETWORKS / HARRIS CORPORATION harris.com /
---------------------------------------------------------------------
--------- Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/> New Zealand
Ben Caradoc-Davies
2016-12-08 23:24:56 UTC
Permalink
Post by k***@harris.com
I figured the debugger was the way to go, but hoped there was an easier way. :P
Kevin, I feel your pain. The debugger is an end-user-interface antipattern.

One interesting user interface option is HALE, which I have heard of but
not used. HALE has app-schema support. It might be useful to see what
app-schema mapping HALE generates for the problematic element:
http://www.geo-solutions.it/blog/inspire-support-in-geoserver-made-easy-with-hale/
http://hale.igd.fraunhofer.de/2.9.4/help/topic/eu.esdihumboldt.hale.doc.appschema/html/introduction/intro.html
Post by k***@harris.com
I'll take a look at the recommended breakpoints and see if I can figure out what's happening. The element I'm trying to encode is a wxxm:DiscreteCoverage which should have a wxxm:domainSet element with 0-N wxxm:DomainObject within. DiscreteCoverage displays fine as does any gml prefixed elements within it, but the wxxm:domainSet refuses to encode (along with any of its children). I've tried specifying the complexType via targetAttributeNode as I've had that issue before, but it hasn't made a difference here.
The wxxm schema is available here (http://www.wxxm.aero/schema/2.0/wxxm.xsd) with the objects in question present in the adjacent coverage.xsd file.
Can we please see your mapping for this element, and the
targetAttributeNode mapping you tried? It is possible that for some
reason the type substitution search fails to detect the target type as
valid for this element. Are there any warnings in the logs about this
mapping?

Kind regards,
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
k***@harris.com
2016-12-09 00:25:43 UTC
Permalink
Thanks Ben,

I'll have to check out HALE. Automatic mapping files sounds nice!

Unfortunately, I haven't had a chance to step through the debugger yet as I've been away from the office and don't have direct access to my dev system. That is my next step though.

I've attached both my mapping files for the discrete coverage. You'll see a few commented out blocks in each of stuff I've tried that hasn't worked. Thanks for taking a look.

I don't see any warn logs regarding wxxm:DomainSetType. It seems to create & register the attribute successfully.

Kevin M. Weiss
Software Engineer
CRITICAL NETWORKS / HARRIS CORPORATION
harris.com / ***@harris.com


-----Original Message-----
From: Ben Caradoc-Davies [mailto:***@transient.nz]
Sent: Thursday, December 08, 2016 5:25 PM
To: Weiss, Kevin <***@harris.com>
Cc: Nuno Oliveira <***@geo-solutions.it>; geoserver-***@lists.sourceforge.net
Subject: Re: [Geoserver-users] App-schema troubleshooting
Post by k***@harris.com
I figured the debugger was the way to go, but hoped there was an easier way. :P
Kevin, I feel your pain. The debugger is an end-user-interface antipattern.

One interesting user interface option is HALE, which I have heard of but not used. HALE has app-schema support. It might be useful to see what app-schema mapping HALE generates for the problematic element:
http://www.geo-solutions.it/blog/inspire-support-in-geoserver-made-easy-with-hale/
http://hale.igd.fraunhofer.de/2.9.4/help/topic/eu.esdihumboldt.hale.doc.appschema/html/introduction/intro.html
Post by k***@harris.com
I'll take a look at the recommended breakpoints and see if I can figure out what's happening. The element I'm trying to encode is a wxxm:DiscreteCoverage which should have a wxxm:domainSet element with 0-N wxxm:DomainObject within. DiscreteCoverage displays fine as does any gml prefixed elements within it, but the wxxm:domainSet refuses to encode (along with any of its children). I've tried specifying the complexType via targetAttributeNode as I've had that issue before, but it hasn't made a difference here.
The wxxm schema is available here (http://www.wxxm.aero/schema/2.0/wxxm.xsd) with the objects in question present in the adjacent coverage.xsd file.
Can we please see your mapping for this element, and the targetAttributeNode mapping you tried? It is possible that for some reason the type substitution search fails to detect the target type as valid for this element. Are there any warnings in the logs about this mapping?

Kind regards,
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/> New Zealand
Ben Caradoc-Davies
2016-12-09 04:04:13 UTC
Permalink
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.
Post by k***@harris.com
Thanks Ben,
I'll have to check out HALE. Automatic mapping files sounds nice!
Unfortunately, I haven't had a chance to step through the debugger yet as I've been away from the office and don't have direct access to my dev system. That is my next step though.
I've attached both my mapping files for the discrete coverage. You'll see a few commented out blocks in each of stuff I've tried that hasn't worked. Thanks for taking a look.
I don't see any warn logs regarding wxxm:DomainSetType. It seems to create & register the attribute successfully.
Kevin M. Weiss
Software Engineer
CRITICAL NETWORKS / HARRIS CORPORATION
-----Original Message-----
Sent: Thursday, December 08, 2016 5:25 PM
Subject: Re: [Geoserver-users] App-schema troubleshooting
Post by k***@harris.com
I figured the debugger was the way to go, but hoped there was an easier way. :P
Kevin, I feel your pain. The debugger is an end-user-interface antipattern.
http://www.geo-solutions.it/blog/inspire-support-in-geoserver-made-easy-with-hale/
http://hale.igd.fraunhofer.de/2.9.4/help/topic/eu.esdihumboldt.hale.doc.appschema/html/introduction/intro.html
Post by k***@harris.com
I'll take a look at the recommended breakpoints and see if I can figure out what's happening. The element I'm trying to encode is a wxxm:DiscreteCoverage which should have a wxxm:domainSet element with 0-N wxxm:DomainObject within. DiscreteCoverage displays fine as does any gml prefixed elements within it, but the wxxm:domainSet refuses to encode (along with any of its children). I've tried specifying the complexType via targetAttributeNode as I've had that issue before, but it hasn't made a difference here.
The wxxm schema is available here (http://www.wxxm.aero/schema/2.0/wxxm.xsd) with the objects in question present in the adjacent coverage.xsd file.
Can we please see your mapping for this element, and the targetAttributeNode mapping you tried? It is possible that for some reason the type substitution search fails to detect the target type as valid for this element. Are there any warnings in the logs about this mapping?
Kind regards,
--
Director
Transient Software Limited <http://transient.nz/> New Zealand
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
k***@harris.com
2016-12-12 22:25:19 UTC
Permalink
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  / ***@harris.com

-----Original Message-----
From: Ben Caradoc-Davies [mailto:***@transient.nz]
Sent: Thursday, December 08, 2016 10:04 PM
To: Weiss, Kevin <***@harris.com>
Cc: Nuno Oliveira <***@geo-solutions.it>; geoserver-***@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.
k***@harris.com
2016-12-13 15:27:44 UTC
Permalink
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  / ***@harris.com


-----Original Message-----
From: ***@harris.com [mailto:***@harris.com]
Sent: Monday, December 12, 2016 4:25 PM
To: Ben Caradoc-Davies <***@transient.nz>
Cc: geoserver-***@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  / ***@harris.com

-----Original Message-----
From: Ben Caradoc-Davies [mailto:***@transient.nz]
Sent: Thursday, December 08, 2016 10:04 PM
To: Weiss, Kevin <***@harris.com>
Cc: Nuno Oliveira <***@geo-solutions.it>; geoserver-***@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-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Ben Caradoc-Davies
2017-04-26 04:13:56 UTC
Permalink
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.
Post by k***@harris.com
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
-----Original Message-----
Sent: Monday, December 12, 2016 4:25 PM
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
-----Original Message-----
Sent: Thursday, December 08, 2016 10:04 PM
Subject: Re: [Geoserver-users] App-schema troubleshooting
Kevin,
<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
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
Loading...