opengeospatial / boreholeie

Repository to support the work done in the 2018-2019 Borehole Interoperability Experiment
9 stars 9 forks source link

Generate BhML schema #49

Open sgrellet opened 5 years ago

sgrellet commented 5 years ago

Everything ‘feature’ Appart from BoreholeReferencingMethod (DataType) BoreholeEventLocation -> Abstract

sgrellet commented 5 years ago

done : https://forge.brgm.fr/svnrepository/boreholeie/schemas/BhML-Core.xsd logical model generated in EA wiki page updated : https://github.com/opengeospatial/boreholeie/wiki/BhML

sgrellet commented 5 years ago

xsd updated in 0.2 according to webconf 27 and #46

bsimons14 commented 5 years ago

Some suggested changes to the UML and XML for the BoreholeLRS class based on looking at the instance examples:

  1. BoreholeLRS/accuracyStatement and BoreholeLRS/precisionStatement These should be byReference only allowing xlink:href e.g.
  2. BoreholeReferencingMethod/unit This should be byReference rather than a vocabulary term from "UnitOfMeasureTerm" in order to allow xink:href for the URI, allow code and xlink:title e.g.
  3. BoreholeReferencingMethod/name It is not clear to me what kind of name would go here. I could understand the "TrajectoryReferent" having a name, such as "Kelly bushing", "collar", "well head" etc., but not the BoreholeReferencingMethod.
denevers commented 5 years ago

Also,<<Union>> are not encoded the way GeoSciML did it (which I think it's better and less verbose)

the current encoding is, for example

<AtLocation>
    <atLocation>
            <!-- this is the verbose encoding of  a union -->
            <MeasureOrEvent>
                <distanceAlong uom="http://qudt.org/vocab/unit/M">10</distanceAlong>
            </MeasureOrEvent>
    </atLocation>
</AtLocation>

forcing the union to generate a tag

while, the other encoding goes straight to

<AtLocation>
    <atLocation unionSemantic="distanceAlong"  uom="http://qudt.org/vocab/unit/M">10</atLocation>
</AtLocation>

although, we never use unionSemantic

It is discussed in GeoSciML spec

https://docs.opengeospatial.org/is/16-008/16-008.html#109

(darn, I realise there is an error in the diagram, the bottom box should be RockMaterial, not earth material)

sgrellet commented 5 years ago

https://www.seegrid.csiro.au/wiki/AppSchemas/UmL2GMLAS#A_4._Class_association_pattern_45_target_stereotyped_42_60_62_42

denevers commented 5 years ago

ok.. bit of a snag

This is the encoding

    <!-- ###############  Measure of Event ##################-->
    <group name="MeasureOrEvent">
        <choice>
            <element ref="BhML:BoreholeEvent"/>
            <element ref="gml:measure"/>
        </choice>
    </group>

        <!--  encoding from https://www.seegrid.csiro.au/wiki/AppSchemas/UmL2GMLAS#A_4._Class_association_pattern_45_target_stereotyped_42_60_62_42 -->
    <complexType name="MeasureOrEventPropertyType">
        <sequence>
            <group ref="BhML:MeasureOrEvent"/>
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attribute name="unionSemantics" type="BhML:MeasureOrEventUnionSemantics"/>
    </complexType>

<simpleType name="MeasureOrEventUnionSemantics">
   <restriction base="string">
      <enumeration value="distanceAlong"/>
      <enumeration value="boreholeEvent"/>
   </restriction>
</simpleType>

but this forces

<location>
    <AtLocation>
        <atLocation unionSemantics="distanceAlong">
        <gml:measure uom="http://qudt.org/vocab/unit/M">3.2</gml:measure>
        </atLocation>
    </AtLocation>
</location>

instead of

<atLocation uom="m">10</atLocation>

Works ok for references

<location>
    <FromToLocation>
        <fromPosition xlink:href="#sm0"/>
        <toPosition xlink:href="#qu1"/>
    </FromToLocation>
</location>
bsimons14 commented 5 years ago

I understand that the problem is that the expected outcome from the revised xsd using the MeasureOrEvent union is:

4.9

and:

I think the previous xsd provided:

​​ 4.9

For it only provided byReference on the property, not the and :

​ ​ Both of these are verbose, but make sense when compared to the UML. For the purposes of the IE I think we should just live with the existing xsd, rather than spend too much time modifying it. Cheers Bruce ________________________________ From: Eric Boisvert Sent: Wednesday, 25 September 2019 3:14 AM To: opengeospatial/boreholeie Cc: Bruce Simons ; Comment Subject: Re: [opengeospatial/boreholeie] Generate BhML schema (#49) ok.. bit of a snag This is the encoding but this forces 3.2 instead of 10 Works ok for references — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
denevers commented 5 years ago

but make sense when compared to the UML

depends of the <<Union>> encoding pattern. I would disagree for the official XSD, but for the IE, sure..

The new schemas (https://github.com/opengeospatial/boreholeie/tree/master/schemas) I pushed also fixes the xlink:href you mentionned above.. keep ?

sgrellet commented 5 years ago

according to the last 2 webconf discussions. new xsd generated (0.3.0 : in https://github.com/opengeospatial/boreholeie/commit/5f72028f4df5bc5a808f75b1420f3e284ca9eb85)

sgrellet commented 5 years ago

One point missing in the ChangeLog : namespace changed to point to https://github.com/opengeospatial/boreholeie/blob/master/schemas/BhML-Core.xsd and not to forge BRGM anymore