RepoInterface
in
Tags
Table of Contents
Methods
- getBaseUrl() : string
- Returns the repository REST API base URL.
- getGraphBySearchTerms() : DatasetInterface
- Returns RDF metadata graph of the search results.
- getGraphBySqlQuery() : DatasetInterface
- Returns RDF metadata graph of the search results.
- getResourceById() : RepoResourceInterface
- Tries to find a repository resource with a given id.
- getResourceByIds() : RepoResourceInterface
- Tries to find a single repository resource matching provided identifiers.
- getResourcesBySearchTerms() : Generator<string|int, RepoResourceInterface>
- Returns repository resources matching all provided search terms.
- getResourcesBySqlQuery() : Generator<string|int, RepoResourceInterface>
- Returns repository resources matching a given SQL search query.
- getSchema() : Schema
- Returns the `Schema` object defining repository entities to RDF property mappings.
Methods
getBaseUrl()
Returns the repository REST API base URL.
public
getBaseUrl() : string
Return values
stringgetGraphBySearchTerms()
Returns RDF metadata graph of the search results.
public
getGraphBySearchTerms(array<string|int, SearchTerm> $searchTerms, SearchConfig $config) : DatasetInterface
Parameters
- $searchTerms : array<string|int, SearchTerm>
- $config : SearchConfig
Return values
DatasetInterfacegetGraphBySqlQuery()
Returns RDF metadata graph of the search results.
public
getGraphBySqlQuery(string $query, array<string|int, mixed> $parameters, SearchConfig $config) : DatasetInterface
Parameters
- $query : string
- $parameters : array<string|int, mixed>
- $config : SearchConfig
Return values
DatasetInterfacegetResourceById()
Tries to find a repository resource with a given id.
public
getResourceById(string $id[, SearchConfig|null $config = null ]) : RepoResourceInterface
Throws an error on failure.
Parameters
- $id : string
- $config : SearchConfig|null = null
Return values
RepoResourceInterfacegetResourceByIds()
Tries to find a single repository resource matching provided identifiers.
public
getResourceByIds(array<string|int, string> $ids[, SearchConfig|null $config = null ]) : RepoResourceInterface
A resource matches the search if at lest one id matches the provided list. Resource is not required to have all provided ids.
If more then one resources matches the search or there is no resource matching the search, an error is thrown.
Parameters
- $ids : array<string|int, string>
-
an array of identifiers (being strings)
- $config : SearchConfig|null = null
Return values
RepoResourceInterfacegetResourcesBySearchTerms()
Returns repository resources matching all provided search terms.
public
getResourcesBySearchTerms(array<string|int, SearchTerm> $searchTerms, SearchConfig $config) : Generator<string|int, RepoResourceInterface>
Parameters
- $searchTerms : array<string|int, SearchTerm>
- $config : SearchConfig
Return values
Generator<string|int, RepoResourceInterface>getResourcesBySqlQuery()
Returns repository resources matching a given SQL search query.
public
getResourcesBySqlQuery(string $query, array<string|int, mixed> $parameters, SearchConfig $config) : Generator<string|int, RepoResourceInterface>
The query should return the resources.id database column value of all resources matching the search. The column name "id" has to be used.
Parameters
- $query : string
- $parameters : array<string|int, mixed>
- $config : SearchConfig
Return values
Generator<string|int, RepoResourceInterface>getSchema()
Returns the `Schema` object defining repository entities to RDF property mappings.
public
getSchema() : Schema