Skip to content

Including Dependencies of Other Mappings

highsource edited this page Dec 22, 2014 · 1 revision

Synopsis

<jsonix:includes>
  ...
  <jsonix:dependencies-of-mapping id="OtherMappingId" name="OtherMapping"/>
  ...
</jsonix:includes>

Includes all the dependencies (elements, types, properties) of some other depending mapping (referenced by name or id) into this mapping.

Configuration attributes

  • id - id of the depending mapping, must reference an existing mapping with this id. See Mapping Configuration. If name is not specified, the id is required.
  • name - name of the depending mapping, must reference a unique mapping with this name. See [[Mapping Configuration]. If id is not specified, the name is required.

Example:

The Filter 1.1.0 schema uses a few elements from the GML 3.1.1 schema. In order to make the Filter 1.1.0 mappings lighter, we can create special module GML_3_1_1_Filter_1_1_0 which will contain those and only those items from GML 3.1.1 which are needed for Filter 1.1.0:

<jsonix:module name="GML_3_1_1_Filter_1_1_0">
	<jsonix:mapping package="net.opengis.gml.v_3_1_1" name="GML_3_1_1" id="GML_3_1_1_Filter_1_1_0">
		<jsonix:includes>
			<jsonix:dependencies-of-mapping name="Filter_1_1_0"/>
		</jsonix:includes>
	</jsonix:mapping>
</jsonix:module>

This will generate module GML_3_1_1_Filter_1_1_0.js containing a mapping named GML_3_1_1. This GML_3_1_1 will only contain the dependencies of the mapping Filter_1_1_0. This drastically cuts the size of the GML_3_1_1_Filter_1_1_0.js when compared to the full GML_3_1_1.js.

Clone this wiki locally