<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://www.opengis.net/ade/bridge/1.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns:core="http://www.opengis.net/citygml/1.0"
    xmlns:gml="http://www.opengis.net/gml"
    targetNamespace="http://www.opengis.net/ade/bridge/1.0" elementFormDefault="qualified"
    attributeFormDefault="unqualified">
    <xs:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"/>
    <xs:import namespace="http://www.opengis.net/citygml/1.0" schemaLocation="http://schemas.opengis.net/citygml/1.0/cityGMLBase.xsd"/>
    <!-- ============================================================================================= -->
    <!-- ===================================CityGML Bridge Module ==================================== -->
    <!-- ============================================================================================= -->
    <xs:complexType name="AbstractBridgeType" abstract="true">
        <xs:annotation>
            <xs:documentation>Type describing the thematic and geometric attributes and the associations of bridges. It is an abstract type, only its subclasses
                Bridge and BridgePart can be instantiated. An _AbstractBridge may consist of BridgeParts, which are again _AbstractBridges by inheritance. Thus
                an aggregation hierarchy between _AbstractBridges of arbitrary depth may be specified. In such an hierarchy, top elements are Bridges, while all
                other elements are BridgeParts. Each element of such a hierarchy may have all attributes and geometries of _AbstractBridges. It must, however,
                be assured that no inconsistencies occur.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="core:AbstractSiteType">
                <xs:sequence>
                    <xs:annotation>
                        <xs:documentation> The name will be represented by gml:name (inherited from _GML) The lodXMultiSurface must be used, if the geometry of
                            a bridge is just a collection of surfaces bounding a solid, but not a topologically clean solid boundary necessary for GML3 solid
                            boundaries. </xs:documentation>
                    </xs:annotation>
                    <xs:element name="class" type="gml:CodeType" minOccurs="0"/>
                    <xs:element name="function" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="usage" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="yearOfConstruction" type="xs:gYear" minOccurs="0"/>
                    <xs:element name="yearOfDemolition" type="xs:gYear" minOccurs="0"/>
                    <xs:element name="isMovable" type="xs:boolean" default="false" minOccurs="0"/>
                    <xs:element name="lod1Solid" type="gml:SolidPropertyType" minOccurs="0"/>
                    <xs:element name="lod1MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
                    <xs:element name="lod1TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
                    <xs:element name="lod2Solid" type="gml:SolidPropertyType" minOccurs="0"/>
                    <xs:element name="lod2MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
                    <xs:element name="lod2MultiCurve" type="gml:MultiCurvePropertyType" minOccurs="0"/>
                    <xs:element name="lod2TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
                    <xs:element name="outerBridgeConstruction" type="BridgeConstructionElementPropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="outerBridgeInstallation" type="BridgeInstallationPropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="interiorBridgeInstallation" type="IntBridgeInstallationPropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="boundedBy" type="BoundarySurfacePropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="lod3Solid" type="gml:SolidPropertyType" minOccurs="0"/>
                    <xs:element name="lod3MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
                    <xs:element name="lod3MultiCurve" type="gml:MultiCurvePropertyType" minOccurs="0"/>
                    <xs:element name="lod3TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
                    <xs:element name="lod4Solid" type="gml:SolidPropertyType" minOccurs="0"/>
                    <xs:element name="lod4MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
                    <xs:element name="lod4MultiCurve" type="gml:MultiCurvePropertyType" minOccurs="0"/>
                    <xs:element name="lod4TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
                    <xs:element name="interiorBridgeRoom" type="InteriorBridgeRoomPropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="consistsOfBridgePart" type="BridgePartPropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="address" type="core:AddressPropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="_GenericApplicationPropertyOfAbstractBridge" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="_AbstractBridge" type="AbstractBridgeType" abstract="true" substitutionGroup="core:_Site"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfAbstractBridge" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="BridgeType">
        <xs:complexContent>
            <xs:extension base="AbstractBridgeType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfBridge" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="Bridge" type="BridgeType" substitutionGroup="_AbstractBridge"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfBridge" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="BridgePartType">
        <xs:complexContent>
            <xs:extension base="AbstractBridgeType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfBridgePart" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="BridgePart" type="BridgePartType" substitutionGroup="_AbstractBridge"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfBridgePart" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="BridgePartPropertyType">
        <xs:annotation>
            <xs:documentation>Denotes the relation of an _AbstractBridge to its bridge parts. The BridgePartPropertyType element must either carry a reference
                to a BridgePart object or contain a BridgePart object inline, but neither both nor none.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:restriction base="gml:AssociationType">
                <xs:sequence minOccurs="0">
                    <xs:element ref="BridgePart"/>
                </xs:sequence>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:complexType name="BridgeInstallationType">
        <!-- ========================================================================================= -->
        <xs:annotation>
            <xs:documentation>A BridgeInstallation is a part of a Bridge which has not the significance of a BridgePart. Examples are stairs, etc. As subclass
                of _CityObject, a BridgeInstallation inherits all attributes and relations, in particular an id, names, external references, generic attributes
                and generalization relations.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="core:AbstractCityObjectType">
                <xs:sequence>
                    <xs:element name="class" type="gml:CodeType" minOccurs="0"/>
                    <xs:element name="function" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="usage" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="lod2Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
                    <xs:element name="lod2ImplicitRepresentation" type="core:ImplicitRepresentationPropertyType" minOccurs="0"/>
                    <xs:element name="lod3Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
                    <xs:element name="lod3ImplicitRepresentation" type="core:ImplicitRepresentationPropertyType" minOccurs="0"/>
                    <xs:element name="lod4Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
                    <xs:element name="lod4ImplicitRepresentation" type="core:ImplicitRepresentationPropertyType" minOccurs="0"/>
                    <xs:element ref="_GenericApplicationPropertyOfBridgeInstallation" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="BridgeInstallation" type="BridgeInstallationType" substitutionGroup="core:_CityObject"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfBridgeInstallation" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="BridgeInstallationPropertyType">
        <xs:annotation>
            <xs:documentation>Denotes the relation of an _AbstractBridge to its bridge installations. The BridgePBridgeInstallationPropertyTypeartPropertyType
                element must either carry a reference to a BridgeInstallation object or contain a BridgeInstallation object inline, but neither both nor
                none.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:restriction base="gml:AssociationType">
                <xs:sequence minOccurs="0">
                    <xs:element ref="BridgeInstallation"/>
                </xs:sequence>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:complexType name="IntBridgeInstallationType">
        <xs:annotation>
            <xs:documentation>An IntBridgeInstallation is an interior part of a Bridge which has a specific function or semantic meaning. Examples are interior
                stairs, railings, radiators or pipes. As subclass of _CityObject, an IntBridgeInstallation inherits all attributes and relations, in particular
                an id, names, external references, generic attributes and generalization relations. </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="core:AbstractCityObjectType">
                <xs:sequence>
                    <xs:element name="class" type="gml:CodeType" minOccurs="0"/>
                    <xs:element name="function" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="usage" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="lod4Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
                    <xs:element name="lod4ImplicitRepresentation" type="core:ImplicitRepresentationPropertyType" minOccurs="0"/>
                    <xs:element ref="_GenericApplicationPropertyOfIntBridgeInstallation" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="IntBridgeInstallation" type="IntBridgeInstallationType" substitutionGroup="core:_CityObject"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfIntBridgeInstallation" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="IntBridgeInstallationPropertyType">
        <xs:annotation>
            <xs:documentation>Denotes the relation of an _AbstractBridge to its interior bridge installations. The IntBridgeInstallationPropertyType element
                must either carry a reference to a IntBridgeInstallation object or contain a IntBridgeInstallation object inline, but neither both nor
                none.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:restriction base="gml:AssociationType">
                <xs:sequence minOccurs="0">
                    <xs:element ref="IntBridgeInstallation"/>
                </xs:sequence>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:complexType name="BridgeConstructionElementType">
        <xs:annotation>
            <xs:documentation>Type describing the thematic and geometric attributes and the associations of bridge construction elements.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="core:AbstractCityObjectType">
                <xs:sequence>
                    <xs:annotation>
                        <xs:documentation> The name will be represented by gml:name (inherited from _GML) The lodXMultiSurface must be used, if the geometry of
                            a building is just a collection of surfaces bounding a solid, but not a topologically clean solid boundary necessary for GML3 solid
                            boundaries. </xs:documentation>
                    </xs:annotation>
                    <xs:element name="class" type="gml:CodeType" minOccurs="0"/>
                    <xs:element name="function" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="usage" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="lod1Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
                    <xs:element name="lod2Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
                    <xs:element name="lod3Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
                    <xs:element name="lod4Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
                    <xs:element name="lod1TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
                    <xs:element name="lod2TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
                    <xs:element name="lod3TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
                    <xs:element name="lod4TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
                    <xs:element ref="_GenericApplicationPropertyOfBridgeConstructionElement" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="BridgeConstructionElement" type="BridgeConstructionElementType" substitutionGroup="core:_CityObject"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfBridgeConstructionElement" type="xs:anyType"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="BridgeConstructionElementPropertyType">
        <xs:annotation>
            <xs:documentation>Denotes the relation of an _AbstractBridge to its bridge construction elements. The BridgeConstructionElementPropertyType element
                must either carry a reference to a BridgeConstructionElement object or contain a BridgeConstructionElement object inline, but neither both nor
                none.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:restriction base="gml:AssociationType">
                <xs:sequence minOccurs="0">
                    <xs:element ref="BridgeConstructionElement"/>
                </xs:sequence>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <!-- ========================SURFACES OF BRIDGES AND ROOMS (LOD2 to LOD4)====================-->
    <!-- ========================================================================================= -->
    <xs:complexType name="AbstractBoundarySurfaceType" abstract="true">
        <xs:annotation>
            <xs:documentation>A BoundarySurface is a thematic object which classifies surfaces bounding a bridge or a room. The geometry of a BoundarySurface is
                given by MultiSurfaces. As it is a subclass of _CityObject, it inherits all atributes and relations, in particular the external references, the
                generic attributes, and the generalization relations. </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="core:AbstractCityObjectType">
                <xs:sequence>
                    <xs:element name="lod2MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
                    <xs:element name="lod3MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
                    <xs:element name="lod4MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
                    <xs:element name="opening" type="OpeningPropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="_GenericApplicationPropertyOfBoundarySurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================== -->
    <xs:element name="_BoundarySurface" type="AbstractBoundarySurfaceType" abstract="true" substitutionGroup="core:_CityObject"/>
    <!-- ========================================================================================== -->
    <xs:element name="_GenericApplicationPropertyOfBoundarySurface" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================== -->
    <xs:complexType name="RoofSurfaceType">
        <xs:complexContent>
            <xs:extension base="AbstractBoundarySurfaceType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfRoofSurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================== -->
    <xs:element name="RoofSurface" type="RoofSurfaceType" substitutionGroup="_BoundarySurface"/>
    <!-- ========================================================================================== -->
    <xs:element name="_GenericApplicationPropertyOfRoofSurface" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================== -->
    <xs:complexType name="WallSurfaceType">
        <xs:complexContent>
            <xs:extension base="AbstractBoundarySurfaceType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfWallSurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="WallSurface" type="WallSurfaceType" substitutionGroup="_BoundarySurface"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfWallSurface" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="GroundSurfaceType">
        <xs:complexContent>
            <xs:extension base="AbstractBoundarySurfaceType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfGroundSurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="GroundSurface" type="GroundSurfaceType" substitutionGroup="_BoundarySurface"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfGroundSurface" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="ClosureSurfaceType">
        <xs:complexContent>
            <xs:extension base="AbstractBoundarySurfaceType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfClosureSurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="ClosureSurface" type="ClosureSurfaceType" substitutionGroup="_BoundarySurface"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfClosureSurface" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <!-- ===================================LOD4 only Surfaces======================================= -->
    <!-- ========================================================================================= -->
    <xs:complexType name="FloorSurfaceType">
        <xs:complexContent>
            <xs:extension base="AbstractBoundarySurfaceType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfFloorSurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="FloorSurface" type="FloorSurfaceType" substitutionGroup="_BoundarySurface"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfFloorSurface" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    
    <xs:complexType name="OuterFloorSurfaceType">
        <xs:complexContent>
            <xs:extension base="AbstractBoundarySurfaceType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfOuterFloorSurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================== -->
    <xs:element name="OuterFloorSurface" type="OuterFloorSurfaceType" substitutionGroup="_BoundarySurface"/>
    <!-- ========================================================================================== -->	   
    <xs:element name="_GenericApplicationPropertyOfOuterFloorSurface" type="xs:anyType" abstract="true"/>    
    <!-- ========================================================================================== -->	   
    
    <xs:complexType name="InteriorWallSurfaceType">
        <xs:complexContent>
            <xs:extension base="AbstractBoundarySurfaceType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfInteriorWallSurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="InteriorWallSurface" type="InteriorWallSurfaceType" substitutionGroup="_BoundarySurface"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfInteriorWallSurface" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="CeilingSurfaceType">
        <xs:complexContent>
            <xs:extension base="AbstractBoundarySurfaceType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfCeilingSurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="CeilingSurface" type="CeilingSurfaceType" substitutionGroup="_BoundarySurface"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfCeilingSurface" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    
    <xs:complexType name="OuterCeilingSurfaceType">
        <xs:complexContent>
            <xs:extension base="AbstractBoundarySurfaceType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfOuterCeilingSurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================== -->
    <xs:element name="OuterCeilingSurface" type="OuterCeilingSurfaceType" substitutionGroup="_BoundarySurface"/>
    <!-- ========================================================================================== --> 
    <xs:element name="_GenericApplicationPropertyOfOuterCeilingSurface" type="xs:anyType" abstract="true"/>
    
    
    <!-- =============================Relation of Bridges/Rooms to its bounding Surfaces================== -->
    <!-- ========================================================================================= -->
    <xs:complexType name="BoundarySurfacePropertyType">
        <xs:annotation>
            <xs:documentation>Denotes the relation of an _AbstractBridge to its bounding thematic surfaces (walls, roofs, ..). The BoundarySurfacePropertyType
                element must either carry a reference to a _BoundarySurface object or contain a _BoundarySurface object inline, but neither both nor none. There
                is no differentiation between interior surfaces bounding rooms and outer ones bounding bridges (one reason is, that ClosureSurfaces belong to
                both types). It has to be made sure by additional integrity constraints that, e.g. an _AbstractBridge is not related to CeilingSurfaces or a
                room not to RoofSurfaces.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:restriction base="gml:AssociationType">
                <xs:sequence minOccurs="0">
                    <xs:element ref="_BoundarySurface"/>
                </xs:sequence>
                <xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- ================================Openings (LoD3 and LoD4 only)================================ -->
    <!-- ========================================================================================= -->
    <xs:complexType name="OpeningPropertyType">
        <xs:annotation>
            <xs:documentation>Denotes the relation of an _BondarySurface to its openings (doors, windows). The OpeningPropertyType element must either carry a
                reference to an _Opening object or contain an _Opening object inline, but neither both nor none.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:restriction base="gml:AssociationType">
                <xs:sequence minOccurs="0">
                    <xs:element ref="_Opening"/>
                </xs:sequence>
                <xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:complexType name="AbstractOpeningType" abstract="true">
        <xs:annotation>
            <xs:documentation> Type for openings (doors, windows) in walls. Used in LoD3 and LoD4 only. As subclass of _CityObject, an _Opening inherits all
                attributes and relations, in particular an id, names, external references, generic attributes and generalization relations. </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="core:AbstractCityObjectType">
                <xs:sequence>
                    <xs:element name="lod3MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
                    <xs:element name="lod3ImplicitRepresentation" type="core:ImplicitRepresentationPropertyType" minOccurs="0"/>
                    <xs:element name="lod4MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
                    <xs:element name="lod4ImplicitRepresentation" type="core:ImplicitRepresentationPropertyType" minOccurs="0"/>
                    <xs:element ref="_GenericApplicationPropertyOfOpening" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="_Opening" type="AbstractOpeningType" abstract="true" substitutionGroup="core:_CityObject"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfOpening" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="WindowType">
        <xs:annotation>
            <xs:documentation> Type for windows in walls. Used in LoD3 and LoD4 only . As subclass of _CityObject, a window inherits all attributes and
                relations, in particular an id, names, external references, generic attributes and generalization relations. </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="AbstractOpeningType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfWindow" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="Window" type="WindowType" substitutionGroup="_Opening"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfWindow" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="DoorType">
        <xs:annotation>
            <xs:documentation> Type for doors in walls. Used in LoD3 and LoD4 only . As subclass of _CityObject, a Door inherits all attributes and relations,
                in particular an id, names, external references, generic attributes and generalization relations. </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="AbstractOpeningType">
                <xs:sequence>
                    <xs:element name="address" type="core:AddressPropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="_GenericApplicationPropertyOfDoor" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="Door" type="DoorType" substitutionGroup="_Opening"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfDoor" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <!-- ====================================ROOMS (LoD4 only)===================================== -->
    <!-- ========================================================================================= -->
    <xs:complexType name="BridgeRoomType">
        <xs:annotation>
            <xs:documentation>A Room is a thematic object for modelling the closed parts inside a Bridge. It has to be closed, if necessary by using closure
                surfaces. The geometry may be either a solid, or a MultiSurface if the boundary is not topologically clean. The room connectivity may be derived
                by detecting shared thematic openings or closure surfaces: two rooms are connected if both use the same opening object or the same closure
                surface. The thematic surfaces bounding a room are referenced by the boundedBy property. As subclass of _CityObject, a Room inherits all
                attributes and relations, in particular an id, names, external references, generic attributes and generalization relations. </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="core:AbstractCityObjectType">
                <xs:sequence>
                    <xs:element name="class" type="gml:CodeType" minOccurs="0"/>
                    <xs:element name="function" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="usage" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="lod4Solid" type="gml:SolidPropertyType" minOccurs="0"/>
                    <xs:element name="lod4MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
                    <xs:element name="boundedBy" type="BoundarySurfacePropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="interiorBridgeFurniture" type="InteriorBridgeFurniturePropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="bridgeRoomInstallation" type="IntBridgeInstallationPropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="_GenericApplicationPropertyOfBridgeRoom" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="BridgeRoom" type="BridgeRoomType" substitutionGroup="core:_CityObject"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfBridgeRoom" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="BridgeFurnitureType">
        <xs:annotation>
            <xs:documentation>Type for bridge furnitures. As subclass of _CityObject, a BridgeFurniture inherits all attributes and relations, in particular an
                id, names, external references, generic attributes and generalization relations. </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="core:AbstractCityObjectType">
                <xs:sequence>
                    <xs:element name="class" type="gml:CodeType" minOccurs="0"/>
                    <xs:element name="function" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="usage" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="lod4Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
                    <xs:element name="lod4ImplicitRepresentation" type="core:ImplicitRepresentationPropertyType" minOccurs="0"/>
                    <xs:element ref="_GenericApplicationPropertyOfBridgeFurniture" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="BridgeFurniture" type="BridgeFurnitureType" substitutionGroup="core:_CityObject"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfBridgeFurniture" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <!-- ============================Relation of Bridge to Rooms (LoD4 only)============================ -->
    <!-- ========================================================================================= -->
    <xs:complexType name="InteriorBridgeRoomPropertyType">
        <xs:annotation>
            <xs:documentation>Denotes the relation of an _AbstractBridge to its rooms. The InteriorBridgeRoomPropertyType element must either carry a reference
                to an BridgeRoom object or contain an BridgeRoom object inline, but neither both nor none.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:restriction base="gml:AssociationType">
                <xs:sequence minOccurs="0">
                    <xs:element ref="BridgeRoom"/>
                </xs:sequence>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:complexType name="InteriorBridgeFurniturePropertyType">
        <xs:annotation>
            <xs:documentation>Denotes the relation of a BridgeRoom to its interior bridge furniture. The InteriorBridgeFurniturePropertyType element must either
                carry a reference to an BridgeFurniture object or contain an BridgeFurniture object inline, but neither both nor none.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:restriction base="gml:AssociationType">
                <xs:sequence minOccurs="0">
                    <xs:element ref="BridgeFurniture"/>
                </xs:sequence>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
</xs:schema>
