Sfoglia il codice sorgente

added wps data input type

Piotr Labudda 8 anni fa
parent
commit
16614eeb97

+ 4 - 0
SE/se-lib/Api/WfsNs.php

@@ -4,6 +4,10 @@ Lib::loadClass('Request');
 
 class Api_WfsNs {
 
+	static function toNamespace($typeNameOrNamespace) {
+		return str_replace([ '__x3A__', ':' ], '/', $typeNameOrNamespace);
+	}
+
 	public static function typeName($namespaceUri) {
 		$ex = explode('/', $namespaceUri);
 		$name = array_pop($ex);

+ 82 - 27
SE/se-lib/Api/WpsHelper.php

@@ -7,16 +7,17 @@ class Api_WpsHelper {
 
 	static function getUserWpsProcessList($userLogin = null) {
 		// TODO: $userLogin
-		$defaultWpsProcessList = self::getDefaultWpsProcessList();
-		if (array_key_exists($identifier, $defaultWpsProcessList)) return Type_WpsProcess::build( $defaultWpsProcessList[$identifier] );
+		$defaultWpsProcessList = array_map(function ($wpsProcess) {
+			return Type_WpsProcess::build($wpsProcess);
+		}, self::getDefaultWpsProcessList());
 
-		$wpsProcessList = [];
+		$wpsProcessList = []; // [ Type_WpsProcess ]
 		// TODO: fetch from DB - `CRM_#CACHE_ACL_FUNCTIONS` or object like UrlActions
 
 		$wpsProcessList = array_merge($defaultWpsProcessList, $wpsProcessList);
-		return array_map(function ($wpsProcess, $identifier) {
-			return (object)[ 'identifier' => $identifier, 'title' => $wpsProcess['title'], 'description' => $wpsProcess['description'] ];
-		}, $wpsProcessList, array_keys($wpsProcessList));
+		// return array_map(function ($wpsProcess, $identifier) {
+		// 	return (object)[ 'identifier' => $identifier, 'title' => $wpsProcess['title'], 'description' => $wpsProcess['description'] ];
+		// }, $wpsProcessList, array_keys($wpsProcessList));
 		return $wpsProcessList;
 	}
 
@@ -33,32 +34,52 @@ class Api_WpsHelper {
 	static function getDefaultWpsProcessList() {
 		$defaultWpsProcessList = [];
 
-		{
-			$selectFeatureArgTypeName = [
-				'minOccurs' => "1", 'maxOccurs' => "1", // 1 arg is required
-				'identifier' => 'typeName',
-				'title' => "Feature typeName",
-				'description' => "Feature typeName eg.: 'default_db/PROBLEMS'",
-				'type' => 'literal',
-			];
-			$selectFeatureArgPrimaryKey = [
-				'minOccurs' => "1", 'maxOccurs' => "unbounded", // min 1 arg is required
-				'identifier' => 'primaryKey',
-				'title' => "Feature primaryKey",
-				'description' => "Feature primaryKey",
-				'type' => 'literal',
-			];
+		$wpsArgTypeName = [
+			'minOccurs' => "1", 'maxOccurs' => "1", // 1 arg is required
+			'identifier' => 'typeName',
+			'title' => "Feature typeName",
+			'description' => "Feature typeName eg.: 'default_db/PROBLEMS'",
+			'dataType' => 'literal',
+			'xsdType' => 'p5:typeName',
+		];
+		$wpsArgPrimaryKey = [
+			'minOccurs' => "1", 'maxOccurs' => "unbounded", // min 1 arg is required
+			'identifier' => 'primaryKey',
+			'title' => "Feature primaryKey",
+			'description' => "Feature primaryKey",
+			'dataType' => 'literal',
+			'xsdType' => 'p5:primaryKey',
+		];
+		$wpsArgRemoteTypeName = [
+			'minOccurs' => "1", 'maxOccurs' => "1", // 1 arg is required
+			'identifier' => 'remoteTypeName',
+			'title' => "Remote Feature typeName",
+			'description' => "Remote Feature typeName eg.: 'default_db/PROBLEMS'",
+			'dataType' => 'literal',
+			'xsdType' => 'p5:typeName',
+		];
+		$wpsArgRemotePrimaryKey = [
+			'minOccurs' => "1", 'maxOccurs' => "unbounded", // min 1 arg is required
+			'identifier' => 'remotePrimaryKey',
+			'title' => "Remote Feature primaryKey",
+			'description' => "Remote Feature primaryKey",
+			'dataType' => 'literal',
+			'xsdType' => 'p5:primaryKey',
+		];
+
+		{ // Selected Feature
 			$selectFeatureArgFilterQuery = [
 				'minOccurs' => "0", 'maxOccurs' => "1", // optional max 1 arg
 				'identifier' => 'filterQuery',
 				'title' => "Query string",
 				'description' => "Query string eg.: 'f_ID=123&sf_Msgs=NEW_MSGS'",
-				'type' => 'literal',
+				'dataType' => 'literal',
+				'xsdType' => 'p5:queryString',
 			];
 			$selectFeatureBase = [
 				'dataInputs' => [
-					$selectFeatureArgTypeName,
-					$selectFeatureArgPrimaryKey,
+					$wpsArgTypeName,
+					$wpsArgPrimaryKey,
 				],
 				// 'MimeType' => text/xml, 'Encoding' => base64, 'Schema' => http://foo.bar/gml/3.1.0/polygon.xsd
 				'defaultOutput' => [ 'MimeType' => "application/json" ], // TODO: result type - like Insert Wfs Transaction result - list of: Success (primaryKey = 123), ...
@@ -76,18 +97,52 @@ class Api_WpsHelper {
 			$defaultWpsProcessList['p5:getSelectedFeatures'] = array_merge([ 'title' => "Get selected features", 'descriptin' => "Get list of selected features (with attribute @selected = true)" ], $selectFeatureBase);
 			$defaultWpsProcessList['p5:unselectAllFeatures'] = array_merge([ 'title' => "Unselect all features", 'descriptin' => "Unselect all features (set attribute @selected to false)" ], $selectFeatureBase, [
 				'dataInputs' => [
-					$selectFeatureArgTypeName,
+					$wpsArgTypeName,
 				]
 			]);
 			$defaultWpsProcessList['p5:selectAllFeaturesMatchingFilter'] = array_merge([ 'title' => "Select all features matching filter" ], $selectFeatureBase, [
 				'dataInputs' => [
-					$selectFeatureArgTypeName,
-					array_merge($selectFeatureArgPrimaryKey, [ 'minOccurs' => 0 ]), // optional arg
+					$wpsArgTypeName,
+					array_merge($wpsArgPrimaryKey, [ 'minOccurs' => 0 ]), // optional arg
 					$selectFeatureArgFilterQuery,
 				]
 			]);
 		}
 
+		// { // Relations (ref's)
+		// 	$wpsArgTypeName = [
+		// 		'minOccurs' => "1", 'maxOccurs' => "1", // 1 arg is required
+		// 		'identifier' => 'typeName',
+		// 		'title' => "Feature typeName",
+		// 		'description' => "Feature typeName eg.: 'default_db/PROBLEMS'",
+		// 		'dataType' => 'literal',
+		// 		'xsdType' => 'p5:typeName',
+		// 	];
+		//
+		// 	$relationsBase = [
+		// 		'dataInputs' => [
+		// 			$wpsArgTypeName,
+		// 			array_merge($wpsArgPrimaryKey, [ 'maxOccurs' => 1 ]),
+		// 			$wpsArgRemoteTypeName,
+		// 			$wpsArgRemotePrimaryKey,
+		// 		],
+		// 		// 'MimeType' => text/xml, 'Encoding' => base64, 'Schema' => http://foo.bar/gml/3.1.0/polygon.xsd
+		// 		'defaultOutput' => [ 'MimeType' => "application/json" ],
+		// 		'supportedOutput' => [
+		// 			[ 'MimeType' => "application/json" ],
+		// 		]
+		// 	];
+		// 	$defaultWpsProcessList['p5:getRelations'] = array_merge([ 'title' => "Fetch relations between features" ], $relationsBase, [
+		// 		'dataInputs' => [
+		// 			$wpsArgTypeName,
+		// 			array_merge($wpsArgPrimaryKey, [ 'maxOccurs' => 1 ]),
+		// 			$wpsArgRemoteTypeName,
+		// 		],
+		// 	]);
+		// 	$defaultWpsProcessList['p5:createRelation'] = array_merge([ 'title' => "Create relation between features" ], $relationsBase);
+		// 	$defaultWpsProcessList['p5:deleteRelation'] = array_merge([ 'title' => "Delete relation between features" ], $relationsBase);
+		// }
+
 		array_walk($defaultWpsProcessList, function (&$wpsFunction, $identifier) {
 			$wpsFunction['identifier'] = $identifier;
 		});

+ 49 - 32
SE/se-lib/Api/WpsV1/DescribeProcess.php

@@ -27,47 +27,25 @@ class Api_WpsV1_DescribeProcess {
 		$xmlWriter->writeAttribute('xmlns:xlink', "http://www.w3.org/1999/xlink");
 		$xmlWriter->writeAttribute('xmlns:xsi', "http://www.w3.org/2001/XMLSchema-instance");
 		// $xmlWriter->writeAttribute('xsi:schemaLocation', "http://www.opengis.net/wps/1.0.0 ../wpsGetCapabilities_response.xsd");
-		// foreach (Api_WfsNs::getNsList() as $uri => $prefix) {
-		// 	$xmlWriter->writeAttribute("xmlns:{$prefix}", $uri);
-		// }
+		foreach (Api_WfsNs::getNsList() as $uri => $prefix) {
+			$xmlWriter->writeAttribute("xmlns:{$prefix}", $uri);
+		}
 		// $schemaLocations = [];
 		//$schemaLocations[] = 'http://www.opengis.net/wfs http://webgis.regione.sardegna.it:80/geoserver/schemas/wfs/1.0.0/WFS-capabilities.xsd';// @from http://webgis.regione.sardegna.it/geoserver/ows?service=WFS&request=GetCapabilities
 		// if (!empty($schemaLocations)) $xmlWriter->writeAttribute('xsi:schemaLocation', implode(' ', $schemaLocations));
+		DBG::log($wpsProcess, 'array', "\$wpsProcess");
 		$xmlWriter->h('ProcessDescription', [
 			[ 'ows:Identifier', $wpsProcess->identifier ],
 			[ 'ows:Title', $wpsProcess->title ],
 			[ 'ows:Abstract', $wpsProcess->description ],
-			[ 'DataInputs', array_map(function ($dataInput) {
-				return [ 'Input', [ 'maxOccurs' => $dataInput->maxOccurs, 'minOccurs' => $dataInput->minOccurs ], [
-					[ 'ows:Identifier', $dataInput->identifier ],
-					[ 'ows:Title', $dataInput->title ],
-					[ 'ows:Abstract', $dataInput->description ],
-					('xml' === $dataInput->type)
-					? [ 'ComplexData', [
-							[ 'Default', [
-								[ 'Format', [
-									[ 'MimeType', "text/xml; subtype=gml/3.1.1" ],
-								] ],
-							] ],
-						] ]
-					: [
-							[ 'LiteralData', [
-								[ 'ows:AnyValue' ],
-							] ],
-						],
-				] ];
-			}, $wpsProcess->dataInputs) ],
+			[ 'DataInputs', array_map([ self, 'convertInputToXmlWriter' ], $wpsProcess->dataInputs) ],
 			[ 'ProcessOutputs', [
 				[ 'Output', [
 					[ 'ows:Identifier', "result" ],
 					[ 'ows:Title', "result" ],
 					[ 'ComplexOutput', [
-						[ 'Default', [
-							[ 'Format', self::convertOutputToWpsFormatXml($wpsProcess->defaultOutput) ],
-						] ],
-						[ 'Supported', array_map(function ($output) {
-							return [ 'Format', self::convertOutputToWpsFormatXml($output) ];
-						}, $wpsProcess->supportedOutput) ],
+						[ 'Default', [ self::convertOutputFormatToXmlWriter($wpsProcess->defaultOutput) ] ],
+						[ 'Supported', array_map([ self, 'convertOutputFormatToXmlWriter' ], $wpsProcess->supportedOutput) ],
 						// [ 'Supported', [
 						// 	[ 'Format', [ [ 'MimeType', "text/xml; subtype=wfs-collection/1.0" ] ] ],
 						// 	[ 'Format', [ [ 'MimeType', "text/xml; subtype=wfs-collection/1.1" ] ] ],
@@ -86,14 +64,53 @@ class Api_WpsV1_DescribeProcess {
 		exit;
 	}
 
-	static function convertOutputToWpsFormatXml($output) {
+	static function convertInputToXmlWriter($input) {
+		DBG::log($input, 'array', "convertInputToXmlWriter(\$input)");
+		return [ 'Input', [ 'maxOccurs' => $input->maxOccurs, 'minOccurs' => $input->minOccurs ], array_filter([
+			[ 'ows:Identifier', $input->identifier ],
+			[ 'ows:Title', $input->title ],
+			(!empty($input->description)) ? [ 'ows:Abstract', $input->description ] : null,
+			self::convertInputFormChoiceToXmlWriter($input),
+		], [ 'V', 'filterNotEmpty' ]) ];
+			// (isset($input->description)) ? [ [ 'ows:Abstract', $input->description ] ] : [],
+	}
+	static function convertInputFormChoiceToXmlWriter($input) {
+		switch ($input->dataType) {
+			case 'literal': return self::convertInputLiteralDataToXmlWriter($input);
+			case 'complex': return self::convertInputComplexDataToXmlWriter($input);
+			case 'boundingBox': return self::convertInputBoundingBoxDataToXmlWriter($input);
+		}
+	}
+	static function convertInputLiteralDataToXmlWriter($input) {
+		$owsDataTypeAttribs = ( !empty($input->xsdType) ) ? [ 'ows:reference' => $input->xsdType ] : [];
+		return [ 'LiteralData', [], array_merge(
+			[ [ 'ows:AnyValue' ] ],
+			( !empty($input->xsdType) ) ? [ [ 'ows:DataType', $owsDataTypeAttribs, $input->xsdType ] ] : []
+		) ];
+	}
+	static function convertInputComplexDataToXmlWriter($input) {
+		return [ 'ComplexData', [], [
+			[ 'Default', [
+				[ 'Format', [
+					[ 'MimeType', "text/xml" ],
+				] ],
+			] ],
+		] ];
+	}
+	static function convertInputBoundingBoxDataToXmlWriter($input) {
+		return [ 'BoundingBoxData', [], [
+		] ];
+	}
+
+	static function convertOutputFormatToXmlWriter($output) {
+		DBG::log($output, 'array', "convertOutputFormatToXmlWriter(\$output)");
 		// 'MimeType' => text/xml, 'Encoding' => base64, 'Schema' => http://foo.bar/gml/3.1.0/polygon.xsd
 		// return <MimeType>text/xml</MimeType><Encoding>base64</Encoding><Schema>http://foo.bar/gml/3.1.0/polygon.xsd</Schema>
-		return array_merge(
+		return [ 'Format', array_merge(
 			(!empty($output['MimeType'])) ? [ [ 'MimeType', $output['MimeType'] ] ] : [],
 			(!empty($output['Encoding'])) ? [ [ 'Encoding', $output['Encoding'] ] ] : [],
 			(!empty($output['Schema']))   ? [ [ 'Schema',   $output['Schema'] ] ]   : []
-		);
+		) ];
 	}
 
 }

+ 95 - 14
SE/se-lib/Type/WpsProcess.php

@@ -7,6 +7,67 @@ class Type_WpsProcess {
 
 	var $_data = [];
 
+	// @see http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd
+
+	// wps:ProcessDescriptions / ProcessDescription [ @minOccurs=1, @maxOccurs=unbounded ]
+
+	// ProcessDescription / ows:Identifier [ @minOccurs=1, @maxOccurs=1 ]
+	// ProcessDescription / ows:Title [ @minOccurs=1, @maxOccurs=1 ]
+	// ProcessDescription / ows:Abstract [ @minOccurs=0, @maxOccurs=1 ]
+	// ProcessDescription / ows:Metadata [ @xlink:title, @xlink:type, @xlink:href, @about ]
+	// ProcessDescription / DataInputs / Input [ @minOccurs=1, @maxOccurs=unbounded ]
+	// ProcessDescription / ProcessOutputs / Output [ @minOccurs=1, @maxOccurs=unbounded ]
+
+	// Input / ows:Identifier [ @minOccurs=1, @maxOccurs=1 ]
+	// Input / ows:Title [ @minOccurs=1, @maxOccurs=1 ]
+	// Input / ows:Abstract [ @minOccurs=0, @maxOccurs=1 ]
+	// Input / ( LiteralData | ComplexData | BoundingBoxData )
+	// Input / ( LiteralData )
+	// Input / ( LiteralData ) / ows:DataType [ @minOccurs=0, @maxOccurs=1, @ows:reference ]
+	// Input / ( LiteralData ) / UOMs [ @minOccurs=0, @maxOccurs=1 ]
+	// Input / ( LiteralData ) / ( ows:AllowedValues | ows:AnyValue | ValuesReference )
+	// Input / ( LiteralData ) / ( ows:AllowedValues )
+	// Input / ( LiteralData ) / ( ows:AllowedValues ) / ( ows:Value | ows:Range )
+	// Input / ( LiteralData ) / ( ows:AllowedValues ) / ( ows:Value )
+	// Input / ( LiteralData ) / ( ows:AllowedValues ) / ( ows:Range ) / [ @ows:MinimumValue, @ows:MaximumValue, @ows:Spacing ]
+	// Input / ( LiteralData ) / ( ows:AnyValue )
+	// Input / ( LiteralData ) / ( ValuesReference ) / [ @ows:reference, valuesForm anyURI ]
+	// Input / ( LiteralData ) / DefaultValue [ @minOccurs=0, @maxOccurs=1 ]
+	// Input / ( ComplexData )
+	// Input / ( ComplexData ) / Default / Format [ @minOccurs=1, @maxOccurs=1 ]
+	// Input / ( ComplexData ) / Supported / Format [ @minOccurs=1, @maxOccurs=unbounded ]
+	// Input / ( ComplexData ) / @maximumMegabytes integer
+	// Input / ( BoundingBoxData )
+	// Input / ( BoundingBoxData ) / Default / CRS anyURI
+	// Input / ( BoundingBoxData ) / Supported / CRS anyURI
+
+	// Output / ows:Identifier
+	// Output / ows:Title
+	// Output / ( ComplexOutput | LiteralOutput | BoundingBoxOutput )
+	// Output / ( ComplexOutput )
+	// Output / ( ComplexOutput ) / Default / Format [ @minOccurs=1, @maxOccurs=1 ]
+	// Output / ( ComplexOutput ) / Supported / Format [ @minOccurs=1, @maxOccurs=unbounded ]
+	// Output / ( LiteralOutput )
+	// Output / ( LiteralOutput ) / ows:DataType [ @minOccurs=0, @maxOccurs=1 ]
+	// Output / ( LiteralOutput ) / UOMs [ @minOccurs=0, @maxOccurs=1 ]
+	// Output / ( BoundingBoxOutput )
+	// Output / ( BoundingBoxData ) / Default / CRS anyURI
+	// Output / ( BoundingBoxData ) / Supported / CRS anyURI
+
+	// Format / MimeType string [ @minOccurs=1, @maxOccurs=1 ]
+	// Format / Encoding AnyURI [ @minOccurs=0, @maxOccurs=1 ]
+	// Format / Schema AnyURI [ @minOccurs=0, @maxOccurs=1 ]
+	// UOMs / ( Default / ows:UOM | Supported / ows:UOM [ @minOccurs=1, @maxOccurs=unbounded ] )
+	// ows:UOM string [ @ows:reference ]
+
+	// @ows:reference - URI (local or remote) or URN (like ogc:*, xs:*)
+
+	// example: Output / LiteralOutput / <ows:DataType ows:reference="http://www.w3.org/TR/xmlschema-2/#float">float</ows:DataType>
+	// example: Input / LiteralData:
+	// 	<ows:DataType ows:reference="xs:float">float</ows:DataType>
+	// 	<ows:AnyValue/>
+	// 	<DefaultValue>1.01</DefaultValue>
+
 	// Type_WpsProcessOutput: [ 'MimeType' => text/xml, 'Encoding' => base64, 'Schema' => http://foo.bar/gml/3.1.0/polygon.xsd ]
 	// supportedOutput: [ Type_WpsProcessOutput, ... ]
 	// 	[ 'MimeType' => "text/xml; subtype=wfs-collection/1.0" ],
@@ -21,19 +82,25 @@ class Type_WpsProcess {
 		if (empty($conf['title'])) throw new Exception("WpsProcess parse error - missing input title for '{$conf['identifier']}'");
 	}
 	static function build($conf) { // @return Type_WpsProcess or throw Exception
+		return self::buildProcess($conf);
+	}
+	static function buildProcess($conf) { // @return Type_WpsProcess or throw Exception
 		self::validate($conf);
 		$wpsProcess = new Type_WpsProcess();
 		$wpsProcess->identifier = $conf['identifier'];
 		$wpsProcess->title = $conf['title'];
 		$wpsProcess->description = $conf['description'];
 		$wpsProcess->processVersion = V::get('processVersion', '1.0.0', $conf);
-		$wpsProcess->dataInputs = array_map(function ($input) {
-			return ($input instanceof Type_WpsProcessInput) ? $input : Type_WpsProcessInput::build($input);
-		}, $conf['dataInputs']);
+		$wpsProcess->dataInputs = array_map([ self, 'buildInput' ], $conf['dataInputs']);
+		// $wpsProcess->dataInputs = array_map(function ($input) {
+		// 	return ($input instanceof Type_WpsProcessInput) ? $input : Type_WpsProcessInput::build($input);
 		$wpsProcess->defaultOutput = $conf['defaultOutput'];
 		$wpsProcess->supportedOutput = $conf['supportedOutput'];
 		return $wpsProcess;
 	}
+	static function buildInput($input) { // @return Type_WpsProcessInput or throw Exception
+		return ($input instanceof Type_WpsProcessInput) ? $input : Type_WpsProcessInput::build($input);
+	}
 
 	function __isset($name) {
 		return (array_key_exists($name, $this->_data));
@@ -130,13 +197,23 @@ class Type_WpsProcess {
 
 class Type_WpsProcessInput {
 
-	var $_data = [];
+	var $_data = []; // $_data['dataType'] === $this->dataType
+	// $_data['dataType']: ( 'literal' | 'complex' | 'boundingBox' )
 
 	static function validate($conf) {
 		if (empty($conf['identifier'])) throw new Exception("WpsProcessInput parse error - missing input identifier");
 		if (empty($conf['title'])) throw new Exception("WpsProcessInput parse error - missing input title for '{$conf['identifier']}'");
+		switch ($conf['dataType']) {
+			case 'literal': break;
+			case 'complex': break;
+			case 'boundingBox': break;
+			default: throw new Exception("WpsProcessInput parse error - missing input type for '{$conf['identifier']}'");
+		}
 	}
 	static function build($conf) { // @return Type_WpsProcessInput or throw Exception
+		return self::buildInput($conf);
+	}
+	static function buildInput($conf) { // @return Type_WpsProcessInput or throw Exception
 		self::validate($conf);
 		$input = new Type_WpsProcessInput();
 		$input->identifier = $conf['identifier'];
@@ -144,8 +221,8 @@ class Type_WpsProcessInput {
 		$input->description = V::get('description', "", $conf);
 		$input->maxOccurs = V::get('maxOccurs', 1, $conf, 'maxOccurs');
 		$input->minOccurs = V::get('minOccurs', 1, $conf, 'minOccurs');
-		$input->literalData = [ 'anyValue' => true ]; // default string input for all functions
-		$input->_xsdType = $conf['type']; // for validation
+		$input->dataType = $conf['dataType']; // 'literal' | 'complex' | 'boundingBox'
+		$input->xsdType = V::get('xsdType', '', $conf);
 		return $input;
 	}
 
@@ -175,14 +252,18 @@ class Type_WpsProcessInput {
 	}
 
 	function toWpsJson() {
-		return [
-			'identifier' => $this->_data['identifier'],
-			'title' => $this->_data['title'],
-			'abstract' => $this->_data['description'],
-			'literalData' => $this->_data['literalData'],
-			'maxOccurs' => $this->_data['maxOccurs'],
-			'minOccurs' => $this->_data['minOccurs'],
-		];
+		return array_merge(
+			[
+				'identifier' => $this->_data['identifier'],
+				'title' => $this->_data['title'],
+				'abstract' => $this->_data['description'],
+				'maxOccurs' => $this->_data['maxOccurs'],
+				'minOccurs' => $this->_data['minOccurs'],
+			],
+			('literal' === $this->dataType) ? [ 'literalData' => $this->_data['literalData'] ] : [],
+			('complex' === $this->dataType) ? [ 'complexData' => $this->_data['complexData'] ] : [],
+			('boundingBox' === $this->dataType) ? [ 'boundingBoxData' => $this->_data['boundingBoxData'] ] : []
+		);
 	}
 
 }