DependentImportWorker
extends ImportFormatImportWorker
in package
Class DependentImportWorker
Table of Contents
- ALLOWED_GEOMETRY_TYPE = ['Point', 'MultiPoint', 'LineString', 'MultiLineString', 'Polygon', 'MultiPolygon', 'GeometryCollection']
- ALLOWED_UPDATE_PROPERTIES_STRATEGY = ['replace', 'merge']
- $dataSetCollection : DependentDataSet
- $author : array<string|int, mixed>
- $categoryLogger : CategoryLogger
- $changes : array<string|int, mixed>
- $customer : array<string|int, mixed>
- $dataSetCollection : AbstractDataset
- $defaultCategories : array<string|int, mixed>
- $errors : array<string|int, mixed>
- $logger : ImportWorkerLogger
- $updatePropertiesStrategy : string
- $warnings : array<string|int, mixed>
- $categories : array<string|int, mixed>
- $categoriesCollection : CategoriesCollection
- $scriptService : DataSetScriptService
- __construct() : mixed
- getCategory() : Category
- getChanges() : array<string|int, mixed>
- getDataSetCollection() : AbstractDataset
- getErrors() : array<string|int, ErrorInterface>
- getTotalChanges() : array<string|int, mixed>
- getUpdatedRelations() : array<string|int, RelationEntity>
- getWarnings() : array<string|int, ErrorInterface>
- import() : mixed
- addError() : void
- addErrorRecursive() : void
- createProperties() : array<string|int, mixed>
- findCategoryByFields() : Category|null
- getAuthorValue() : array<string|int, mixed>
- importFeatureGeometryValidate() : bool
- importFeatureUniqueValueValidate() : bool
- importFeatureValidate() : bool
- isFieldsEqual() : bool
- processing() : void
- saveLog() : void
- createRelation() : RelationEntity
- deleteRelation() : void
- findRelation() : RelationEntity|null
- updateRelation() : void
Constants
ALLOWED_GEOMETRY_TYPE
protected
mixed
ALLOWED_GEOMETRY_TYPE
= ['Point', 'MultiPoint', 'LineString', 'MultiLineString', 'Polygon', 'MultiPolygon', 'GeometryCollection']
ALLOWED_UPDATE_PROPERTIES_STRATEGY
protected
mixed
ALLOWED_UPDATE_PROPERTIES_STRATEGY
= ['replace', 'merge']
Properties
$dataSetCollection
public
DependentDataSet
$dataSetCollection
$author
protected
array<string|int, mixed>
$author
$categoryLogger
protected
CategoryLogger
$categoryLogger
$changes
protected
array<string|int, mixed>
$changes
= ['create' => [], 'update' => [], 'delete' => []]
$customer
protected
array<string|int, mixed>
$customer
$dataSetCollection
protected
AbstractDataset
$dataSetCollection
$defaultCategories
protected
array<string|int, mixed>
$defaultCategories
$errors
protected
array<string|int, mixed>
$errors
= []
$logger
protected
ImportWorkerLogger
$logger
$updatePropertiesStrategy
protected
string
$updatePropertiesStrategy
$warnings
protected
array<string|int, mixed>
$warnings
= []
$categories
private
array<string|int, mixed>
$categories
= []
$categoriesCollection
private
CategoriesCollection
$categoriesCollection
$scriptService
private
DataSetScriptService
$scriptService
Methods
__construct()
public
__construct(DependentDataSet $dataSetCollection, DataSetLogEntity $log[, string $updatePropertiesStrategy = 'replace' ]) : mixed
Parameters
- $dataSetCollection : DependentDataSet
- $log : DataSetLogEntity
- $updatePropertiesStrategy : string = 'replace'
Return values
mixed —getCategory()
public
getCategory(array<string|int, mixed> $feature) : Category
Parameters
- $feature : array<string|int, mixed>
Return values
Category —getChanges()
public
getChanges() : array<string|int, mixed>
Return values
array<string|int, mixed> —getDataSetCollection()
public
getDataSetCollection() : AbstractDataset
Return values
AbstractDataset —getErrors()
public
getErrors() : array<string|int, ErrorInterface>
Return values
array<string|int, ErrorInterface> —getTotalChanges()
public
getTotalChanges() : array<string|int, mixed>
Return values
array<string|int, mixed> —getUpdatedRelations()
public
getUpdatedRelations() : array<string|int, RelationEntity>
Return values
array<string|int, RelationEntity> —getWarnings()
public
getWarnings() : array<string|int, ErrorInterface>
Return values
array<string|int, ErrorInterface> —import()
public
abstract import(array<string|int, mixed> $importFeatures) : mixed
Parameters
- $importFeatures : array<string|int, mixed>
Return values
mixed —addError()
protected
addError(ErrorInterface $error) : void
Parameters
- $error : ErrorInterface
Return values
void —addErrorRecursive()
protected
addErrorRecursive(ImportWorkerException $error) : void
Parameters
- $error : ImportWorkerException
Return values
void —createProperties()
protected
createProperties(array<string|int, mixed> $oldProperties, array<string|int, mixed> $newProperties, Category $category) : array<string|int, mixed>
Parameters
- $oldProperties : array<string|int, mixed>
- $newProperties : array<string|int, mixed>
- $category : Category
Return values
array<string|int, mixed> —findCategoryByFields()
protected
findCategoryByFields(array<string|int, mixed> $feature, array<string|int, mixed> $fields, array<string|int, CustomCategory> $categories) : Category|null
Parameters
- $feature : array<string|int, mixed>
- $fields : array<string|int, mixed>
- $categories : array<string|int, CustomCategory>
Return values
Category|null —getAuthorValue()
protected
getAuthorValue(array<string|int, mixed> $customer) : array<string|int, mixed>
Parameters
- $customer : array<string|int, mixed>
Return values
array<string|int, mixed> —importFeatureGeometryValidate()
protected
importFeatureGeometryValidate(array<string|int, mixed> $feature) : bool
Parameters
- $feature : array<string|int, mixed>
Return values
bool —importFeatureUniqueValueValidate()
protected
importFeatureUniqueValueValidate(array<string|int, mixed> $feature) : bool
Parameters
- $feature : array<string|int, mixed>
Return values
bool —importFeatureValidate()
protected
importFeatureValidate(mixed $feature) : bool
Parameters
- $feature : mixed
Return values
bool —isFieldsEqual()
protected
isFieldsEqual(array<string|int, mixed> $fields, array<string|int, mixed> $featureProperties, array<string|int, Property> $categoryProperties) : bool
Parameters
- $fields : array<string|int, mixed>
- $featureProperties : array<string|int, mixed>
- $categoryProperties : array<string|int, Property>
Return values
bool —processing()
protected
processing(array<string|int, mixed> $importFeature) : void
Parameters
- $importFeature : array<string|int, mixed>
Tags
Return values
void —saveLog()
protected
saveLog() : void
Return values
void —createRelation()
private
createRelation(Category $category[, string|null $geometryType = null ][, array<string|int, mixed>|null $properties = null ][, array<string|int, mixed>|null $systemProperties = null ]) : RelationEntity
Parameters
- $category : Category
- $geometryType : string|null = null
- $properties : array<string|int, mixed>|null = null
- $systemProperties : array<string|int, mixed>|null = null
Return values
RelationEntity —deleteRelation()
private
deleteRelation(array<string|int, mixed> $importFeature) : void
Parameters
- $importFeature : array<string|int, mixed>
Return values
void —findRelation()
private
findRelation(array<string|int, mixed> $importFeature) : RelationEntity|null
Parameters
- $importFeature : array<string|int, mixed>
Return values
RelationEntity|null —updateRelation()
private
updateRelation(RelationEntity $relation, Category $category[, string|null $geometryType = null ][, array<string|int, mixed>|null $properties = null ][, array<string|int, mixed>|null $systemProperties = null ]) : void
Parameters
- $relation : RelationEntity
- $category : Category
- $geometryType : string|null = null
- $properties : array<string|int, mixed>|null = null
- $systemProperties : array<string|int, mixed>|null = null