Open Data Catalog v2.0.0
Drupal\dkan_metastore\Service Class Reference
Inheritance diagram for Drupal\dkan_metastore\Service:

Public Member Functions

 __construct (SchemaRetriever $schemaRetriever, Sae $saeFactory)
 
 setDataModifierPlugins (DataModifierManager $pluginManager)
 
 getSchemas ()
 
 getSchema ($identifier)
 
 getAll ($schema_id)
 
 get ($schema_id, $identifier)
 
 getResources ($schema_id, $identifier)
 
 post ($schema_id, string $data)
 
 put ($schema_id, $identifier, string $data)
 
 patch ($schema_id, $identifier, $data)
 
 delete ($schema_id, $identifier)
 
 getCatalog ()
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Detailed Description

Service.

Definition at line 20 of file Service.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\dkan_metastore\Service::__construct ( SchemaRetriever  $schemaRetriever,
Sae  $saeFactory 
)

Constructor.

Definition at line 52 of file Service.php.

Member Function Documentation

◆ create()

static Drupal\dkan_metastore\Service::create ( ContainerInterface  $container)
static

Inherited.

Definition at line 42 of file Service.php.

◆ delete()

Drupal\dkan_metastore\Service::delete (   $schema_id,
  $identifier 
)

Implements DELETE method.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
string$identifierIdentifier.
Returns
string Identifier.

Definition at line 295 of file Service.php.

◆ get()

Drupal\dkan_metastore\Service::get (   $schema_id,
  $identifier 
)

Implements GET method.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
string$identifierIdentifier.
Returns
string The json data.

Definition at line 128 of file Service.php.

◆ getAll()

Drupal\dkan_metastore\Service::getAll (   $schema_id)

Get all.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
Returns
array All objects of the given schema_id.

Definition at line 99 of file Service.php.

◆ getCatalog()

Drupal\dkan_metastore\Service::getCatalog ( )

Assembles the data catalog object.

Returns
object The catalog object

Definition at line 309 of file Service.php.

◆ getResources()

Drupal\dkan_metastore\Service::getResources (   $schema_id,
  $identifier 
)

GET all resources associated with a dataset.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
string$identifierIdentifier.
Returns
array An array of resources.

Definition at line 171 of file Service.php.

◆ getSchema()

Drupal\dkan_metastore\Service::getSchema (   $identifier)

Get schema.

Definition at line 83 of file Service.php.

◆ getSchemas()

Drupal\dkan_metastore\Service::getSchemas ( )

Get schemas.

Definition at line 71 of file Service.php.

◆ patch()

Drupal\dkan_metastore\Service::patch (   $schema_id,
  $identifier,
  $data 
)

Implements PATCH method.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
string$identifierIdentifier.
mixed$dataJson payload.
Returns
\Symfony\Component\HttpFoundation\JsonResponse The json response.

Definition at line 274 of file Service.php.

◆ post()

Drupal\dkan_metastore\Service::post (   $schema_id,
string  $data 
)

Implements POST method.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
string$dataJson payload.
Returns
string The identifier.

Definition at line 198 of file Service.php.

◆ put()

Drupal\dkan_metastore\Service::put (   $schema_id,
  $identifier,
string  $data 
)

Implements PUT method.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
string$identifierIdentifier.
string$dataJson payload.
Returns
array ["identifier" => string, "new" => boolean].

Definition at line 224 of file Service.php.

◆ setDataModifierPlugins()

Drupal\dkan_metastore\Service::setDataModifierPlugins ( DataModifierManager  $pluginManager)

Setter to discover data modifier plugins.

Parameters
\Drupal\dkan_common\Plugin\DataModifierManager$pluginManagerInjected plugin manager.

Definition at line 63 of file Service.php.