RepoInterface
in
Tags
Table of Contents
Methods
- getBaseUrl() : string
- Returns the repository REST API base URL.
- getGraphBySearchTerms() : Graph
- Returns RDF metadata graph of the search results.
- getGraphBySqlQuery() : Graph
- 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) : Graph
Parameters
- $searchTerms : array<string|int, SearchTerm>
- $config : SearchConfig
Return values
GraphgetGraphBySqlQuery()
Returns RDF metadata graph of the search results.
public
getGraphBySqlQuery(string $query, array<string|int, mixed> $parameters, SearchConfig $config) : Graph
Parameters
- $query : string
- $parameters : array<string|int, mixed>
- $config : SearchConfig
Return values
GraphgetResourceById()
Tries to find a repository resource with a given id.
public
getResourceById(string $id[, string $class = null ]) : RepoResourceInterface
Throws an error on failure.
Parameters
- $id : string
- $class : string = null
-
an optional class of the resulting object representing the resource (to be used by extension libraries)
Return values
RepoResourceInterfacegetResourceByIds()
Tries to find a single repository resource matching provided identifiers.
public
getResourceByIds(array<string|int, string> $ids[, string $class = 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)
- $class : string = null
-
an optional class of the resulting object representing the resource (to be used by extension libraries)
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