<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd">
    <namespaces>
        <Namespace>
            <prefix>gml</prefix>
            <uri>http://www.opengis.net/gml/3.2</uri>
        </Namespace>
        <Namespace>
            <prefix>er-v</prefix>
            <uri>http://inspire.ec.europa.eu/schemas/er-v/4.0</uri>
        </Namespace>
        <Namespace>
            <prefix>gco</prefix>
            <uri>http://www.isotc211.org/2005/gco</uri>
        </Namespace>
        <Namespace>
            <prefix>xlink</prefix>
            <uri>http://www.w3.org/1999/xlink</uri>
        </Namespace>
        <Namespace>
            <prefix>base</prefix>
            <uri>http://inspire.ec.europa.eu/schemas/base/3.3</uri>
        </Namespace>
		<Namespace>
			<prefix>base2</prefix>
			<uri>http://inspire.ec.europa.eu/schemas/base2/2.0</uri>
		</Namespace>
		<Namespace>
			<prefix>gn</prefix>
			<uri>http://inspire.ec.europa.eu/schemas/gn/4.0</uri>
		</Namespace>
        <Namespace>
            <prefix>xsi</prefix>
            <uri>http://www.w3.org/2001/XMLSchema-instance</uri>
        </Namespace>
    </namespaces>
    <includedTypes>
		<Include>er-v_FossilFuelResourceType.xml</Include>
	</includedTypes>
    <sourceDataStores>
        <DataStore>
            <id>ds_FossilFuelResource</id>
            <parameters>
				[.anonymised.]
            </parameters>
        </DataStore>
    </sourceDataStores>
    <targetTypes>
        <FeatureType>
            <schemaUri>https://inspire.ec.europa.eu/schemas/er-v/4.0/EnergyResourcesVector.xsd</schemaUri>
        </FeatureType>
    </targetTypes>
    <typeMappings>
        <FeatureTypeMapping>
            <sourceDataStore>ds_FossilFuelResource</sourceDataStore>
            <sourceType>[.anonymised.]</sourceType>
            <targetElement>er-v:FossilFuelResource</targetElement>
            <defaultGeometry>er-v:geometry</defaultGeometry>
            <isDenormalised>false</isDenormalised>
            <attributeMappings>
                <AttributeMapping>
                    <targetAttribute>er-v:FossilFuelResource</targetAttribute>
                    <idExpression>
                        <OCQL>FIELD_DBK</OCQL>
                    </idExpression>
                </AttributeMapping>
				<AttributeMapping>
                    <targetAttribute>er-v:beginLifespanVersion</targetAttribute>
                    <sourceExpression>
                        <OCQL>FormatDateTimezone('yyyy-MM-dd''T''HH:mm:ss''Z''', POLYGON_BEGIN_DATE, 'Europe/Amsterdam')</OCQL>
                    </sourceExpression>
                </AttributeMapping>			
                <AttributeMapping>
                    <targetAttribute>er-v:ClassificationAndQuantificationFramework</targetAttribute>
					<encodeIfEmpty>true</encodeIfEmpty>
                    <ClientProperty>
                        <name>xlink:href</name>
                        <value>'http://inspire.ec.europa.eu/codelist/ClassificationAndQuantificationFrameworkValue/SPE-WPC-AAPG-PRMS'</value>
                    </ClientProperty>
                </AttributeMapping>
				<AttributeMapping>
					<targetAttribute>er-v:exploitationPeriod</targetAttribute>
                    <ClientProperty>
                        <name>xlink:href</name>
                        <value>if_then_else(isNull(MIN_PSD), 'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown', Expression.NIL)</value>
                    </ClientProperty>
                    <ClientProperty>
                        <name>xsi:nil</name>
                        <value>if_then_else(isNull(MIN_PSD), 'true', Expression.NIL)</value>
                    </ClientProperty>					
				</AttributeMapping>
				<AttributeMapping>
                    <targetAttribute>er-v:exploitationPeriod/er-v:ExploitationPeriodType/er-v:beginTime</targetAttribute>
                    <sourceExpression>
                        <OCQL>FormatDateTimezone('yyyy-MM-dd''T''HH:mm:ss''Z''', MIN_PSD, 'Europe/Amsterdam')</OCQL>
                    </sourceExpression>
                </AttributeMapping>	
				<AttributeMapping>
                    <targetAttribute>er-v:exploitationPeriod/er-v:ExploitationPeriodType/er-v:endTime</targetAttribute>
                    <sourceExpression>
                        <OCQL>FormatDateTimezone('yyyy-MM-dd''T''HH:mm:ss''Z''', END_DATE, 'Europe/Amsterdam')</OCQL>
                    </sourceExpression>
                </AttributeMapping>>
                <AttributeMapping>
                    <targetAttribute>er-v:geometry</targetAttribute>
                    <sourceExpression>
                        <OCQL>GEOMETRY</OCQL>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>er-v:inspireId</targetAttribute>
                    <targetAttributeNode>base:IdentifierPropertyType</targetAttributeNode>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>er-v:inspireId/base:Identifier/base:localId</targetAttribute>
                    <sourceExpression>
                        <OCQL>FIELD_DBK</OCQL>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>er-v:inspireId/base:Identifier/base:namespace</targetAttribute>
                    <sourceExpression>
                        <OCQL>'nl-tno-er-ogv'</OCQL>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>er-v:reportingAuthority[1]/base2:RelatedParty/base2:organisationName/gco:CharacterString</targetAttribute>
                    <sourceExpression>
                        <OCQL>'Ministry for Climate Policy and Green Growth'</OCQL>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>er-v:reportingAuthority[1]/base2:RelatedParty/base2:contact/base2:Contact/base2:website</targetAttribute>
                    <sourceExpression>
                        <OCQL>'https://www.government.nl/ministries/ministry-of-climate-policy-and-green-growth'</OCQL>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>er-v:reportingAuthority[1]/base2:RelatedParty/base2:role</targetAttribute>
					<encodeIfEmpty>true</encodeIfEmpty>
                    <ClientProperty>
                        <name>xlink:href</name>
                        <value>'http://inspire.ec.europa.eu/codelist/RelatedPartyRoleValue/authority'</value>
                    </ClientProperty>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>er-v:reportingAuthority[2]/base2:RelatedParty/base2:organisationName/gco:CharacterString</targetAttribute>
                    <sourceExpression>
                        <OCQL>if_then_else(isNull(OPERATOR_NM), Expression.NIL , OPERATOR_NM)</OCQL>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>er-v:reportingAuthority[2]/base2:RelatedParty/base2:role</targetAttribute>
                    <ClientProperty>
                        <name>xlink:href</name>
                        <value>if_then_else(isNull(OPERATOR_NM), Expression.NIL, 'http://inspire.ec.europa.eu/codelist/RelatedPartyRoleValue/operator')</value>
                    </ClientProperty>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>er-v:resourceName/gn:GeographicalName/gn:language</targetAttribute>
                    <sourceExpression>
                        <OCQL>'nld'</OCQL>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>er-v:resourceName/gn:GeographicalName/gn:nativeness</targetAttribute>
					<encodeIfEmpty>true</encodeIfEmpty>
                    <ClientProperty>
                        <name>xlink:href</name>
                        <value>'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'</value>
                    </ClientProperty>
                    <ClientProperty>
                        <name>xsi:nil</name>
                        <value>'true'</value>
                    </ClientProperty>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>er-v:resourceName/gn:GeographicalName/gn:nameStatus</targetAttribute>
					<encodeIfEmpty>true</encodeIfEmpty>
                    <ClientProperty>
                        <name>xlink:href</name>
                        <value>'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'</value>
                    </ClientProperty>
                    <ClientProperty>
                        <name>xsi:nil</name>
                        <value>'true'</value>
                    </ClientProperty>
                </AttributeMapping>
				<AttributeMapping>
                    <targetAttribute>er-v:resourceName/gn:GeographicalName/gn:sourceOfName</targetAttribute>
					<encodeIfEmpty>true</encodeIfEmpty>
                    <ClientProperty>
                        <name>xlink:href</name>
                        <value>'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'</value>
                    </ClientProperty>
                    <ClientProperty>
                        <name>xsi:nil</name>
                        <value>'true'</value>
                    </ClientProperty>
                </AttributeMapping>
				<AttributeMapping>
                    <targetAttribute>er-v:resourceName/gn:GeographicalName/gn:pronunciation</targetAttribute>
					<encodeIfEmpty>true</encodeIfEmpty>
                    <ClientProperty>
                        <name>xlink:href</name>
                        <value>'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'</value>
                    </ClientProperty>
                    <ClientProperty>
                        <name>xsi:nil</name>
                        <value>'true'</value>
                    </ClientProperty>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>er-v:resourceName/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text</targetAttribute>
                    <sourceExpression>
                        <OCQL>FIELD_NM</OCQL>
                    </sourceExpression>
                </AttributeMapping>
				<AttributeMapping>
                    <targetAttribute>er-v:resourceName/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:script</targetAttribute>
                    <sourceExpression>
                        <OCQL>'Latn'</OCQL>
                    </sourceExpression>
                </AttributeMapping>
				<AttributeMapping>
                    <targetAttribute>er-v:dateOfDiscovery</targetAttribute>
                    <sourceExpression>
                        <OCQL>strConCat(DISCOVERY_YEAR, '-01-01T00:00:00Z')</OCQL>
                    </sourceExpression>
                </AttributeMapping>
				<AttributeMapping>
                    <targetAttribute>er-v:resource</targetAttribute>
                    <sourceExpression>
                        <OCQL>FIELD_DBK</OCQL>
						<linkElement>er-v:FossilFuelResourceType</linkElement>
						<linkField>FEATURE_LINK[1]</linkField>
                    </sourceExpression>
					<isMultiple>true</isMultiple>
                </AttributeMapping>
            </attributeMappings>
        </FeatureTypeMapping>
    </typeMappings>
</as:AppSchemaDataAccess>
