Open Data Catalog
v2.0.0
Dataset.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Drupal\dkan_harvest\Load
;
4
5
use
Drupal\dkan_metastore\Service
;
6
use Harvest\ETL\Load\Load;
7
11
class
Dataset
extends
Load {
12
16
public
function
removeItem
($id) {
17
$service = $this->
getMetastoreService
();
18
$service->delete(
"dataset"
,
"{$id}"
);
19
}
20
24
protected
function
saveItem
($item) {
25
$service = $this->
getMetastoreService
();
26
if
(!is_string($item)) {
27
$item = json_encode($item);
28
}
29
$service->post(
'dataset'
, $item);
30
}
31
40
protected
function
getMetastoreService
():
Service
{
41
$service = \Drupal::service(
'dkan_metastore.service'
);
42
return
$service;
43
}
44
45
}
Drupal\dkan_harvest\Load\Dataset\saveItem
saveItem($item)
Definition:
Dataset.php:24
Drupal\dkan_harvest\Load
Definition:
Dataset.php:3
Drupal\dkan_harvest\Load\Dataset\getMetastoreService
getMetastoreService()
Definition:
Dataset.php:40
Drupal\dkan_metastore\Service
Definition:
Service.php:20
Drupal\dkan_harvest\Load\Dataset
Definition:
Dataset.php:11
Drupal\dkan_harvest\Load\Dataset\removeItem
removeItem($id)
Definition:
Dataset.php:16
modules
dkan_harvest
src
Load
Dataset.php
Generated by
1.8.17