Hi Ben and Gavin,
The XMl encoder was relaxed to support this use cases:
https://github.com/geoserver/geoserver/commit/6d110b2222bf03db683f8a5c59c566bb75d4d1db
So not sure why it is not working, Galvin can you share with us the XML element
that is including the GnssReceiver element and the related mappings ?
What output do you get with your current mappings, can you past an example ?
Could you also try your WFS request with GeoJSON format ? GeoJson complex
encoder doesn't care about GML stripping rule, if the returned GeoJSON
contains the data you are expecting to see your mappings are ok. Please note
that complex GeoJSON encoder is available only in recent version of GeoServer.
That say, Ben is correct this violate the GML "stripping" and the XML schema
should be fixed.
Regards,
Nuno Oliveira
On 10/20/2017 10:51 PM, Ben Caradoc-Davies wrote:
Gavin,
I do not think that this is a supported mapping pattern. As you note, this violates the
GML object/property "striping" rule. The only reason you see anything at all is
I think because of recent changes to make the encoder more permissive. The problem is
that the dateInserted property falls outside the GnssReceiver object and there is no way
(that I know) in app-schema to express its cardinality or associate it with the
GnssReceiver; this would have to work both for generating output and for converting
filter queries to SQL. Someone else may have a workaround.
I do not think you can express this attribute in UML either. You can think of
gnssReceiver as the UML line representing the relationship between another
class and the GnssReceiver class. In UML, classes have attributes, but as far
as I know, relationships do not.
I think this is a problem with the GeodesyML object model.
Kind regards,
Ben.
On 21/10/17 06:38, Gavin Medley wrote:
Hi,
I understand that App Schema enforces GML striping, i.e. “complex types are
never the direct property of another complex type; they are always
contained in a property type to ensure that their type is encoded in a
surrounding element.” However, in GeodesyML, there are complex types (
geo:GnssReceiver) and simple types (geo:dateInserted) *both* nested inside
a geo:gnssReceiver property element like so.
<geo:gnssReceiver>
<geo:GnssReceiver gml:id="GnssReceiver.87bff11d-a3bc-4e84-b7bc-5175f824f0f5">
<geo:notes>Receiver 1</geo:notes>
<geo:manufacturerSerialNumber>3213</geo:manufacturerSerialNumber>
<geo:igsModelCode
codeList="http://xml.gov.au/icsm/geodesyml/codelists/antenna-receiver-codelists.xml#GeodesyML_GNSSReceiverTypeCode"
codeListValue="ASHTECH Z-XII3"
codeSpace="https://igscb.jpl.nasa.gov/igscb/station/general/rcvr_ant.tab">ASHTECH
Z-XII3</geo:igsModelCode>
<geo:satelliteSystem
codeSpace="eGeodesy/satelliteSystem">GPS</geo:satelliteSystem>
<geo:firmwareVersion>1Y05-1D04</geo:firmwareVersion>
<geo:elevationCutoffSetting
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<geo:dateInstalled>1996-01-01T00:00:00.000Z</geo:dateInstalled>
<geo:dateRemoved>1998-09-17T00:00:00.000Z</geo:dateRemoved>
<geo:temperatureStabilization
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</geo:GnssReceiver>
<geo:dateInserted>1996-01-01T00:00:00.000Z</geo:dateInserted>
</geo:gnssReceiver>
I have a feature chained element such that I map geo:GnssReceiver type into
the geo:gnssReceiver property but I cannot figure out how to get
geo:dateInserted to appear in each (of *many*) geo:gnssReceiver elements. I
tried referencing the XPath and simply adding the AttributeMapping after my
GnssReceiver feature chain element (as below) but dateInserted only appears
on *one* instance of gnssReceiver.
...
<AttributeMapping>
<targetAttribute>geo:gnssReceiver</targetAttribute>
<sourceExpression>
<OCQL>fourid</OCQL>
<linkElement>geo:GnssReceiver</linkElement>
<linkField>FEATURE_LINK[1]</linkField>
</sourceExpression>
<isMultiple>true</isMultiple>
<encodeIfEmpty>false</encodeIfEmpty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>geo:gnssReceiver/geo:dateInserted</targetAttribute>
<sourceExpression>
<OCQL></OCQL>
</sourceExpression>
<encodeIfEmpty>true</encodeIfEmpty>
<isMultiple>true</isMultiple>
</AttributeMapping>
...
Does anyone have a suggestion on how to achieve this or am I missing
something obvious?
Regards,
Gavin
------------------------------------------------------------------------------
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
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Regards,
Nuno Oliveira
==
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
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.
------------------------------------------------------------------------------
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
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users