EntitiesDatabase
in package
Description of EntitiesDatabase
Tags
Table of Contents
Properties
- $byClass : array<string, array<string, DatasetNodeInterface>>
- $byId : array<string, DateasetNodeInterface>
- $log : LoggerInterface|null
- $ontology : Ontology
- $schema : Schema
Methods
- __construct() : mixed
- add() : int
- exists() : bool
- get() : DatasetNodeInterface|null
- getClasses() : array<string|int, NamedNode>
- getEntitiesOfClass() : array<string|int, mixed>
- getId() : string|null
- checkAndMap() : void
Properties
$byClass
private
array<string, array<string, DatasetNodeInterface>>
$byClass
= []
$byId
private
array<string, DateasetNodeInterface>
$byId
= []
$log
private
LoggerInterface|null
$log
$ontology
private
Ontology
$ontology
$schema
private
Schema
$schema
Methods
__construct()
public
__construct(Ontology $ontology, Schema $schema[, LoggerInterface|null $log = null ]) : mixed
Parameters
add()
public
add(iterable<string|int, DatasetNodeInterface> $entities) : int
Parameters
- $entities : iterable<string|int, DatasetNodeInterface>
Return values
int —number of added entities
exists()
public
exists(string $id[, string|null $class = null ]) : bool
Parameters
- $id : string
- $class : string|null = null
Return values
boolget()
public
get(string $id[, string|null $class = null ]) : DatasetNodeInterface|null
Parameters
- $id : string
- $class : string|null = null
Return values
DatasetNodeInterface|nullgetClasses()
public
getClasses() : array<string|int, NamedNode>
Return values
array<string|int, NamedNode>getEntitiesOfClass()
public
getEntitiesOfClass(string $class) : array<string|int, mixed>
Parameters
- $class : string
Return values
array<string|int, mixed>getId()
public
getId(string $id[, string|null $class = null ]) : string|null
Parameters
- $id : string
- $class : string|null = null
Return values
string|nullcheckAndMap()
private
checkAndMap(DatasetNodeInterface $entity, string $key, array<string|int, DatasetNodeInterface> &$map[, string $msg = '' ]) : void
Parameters
- $entity : DatasetNodeInterface
- $key : string
- $map : array<string|int, DatasetNodeInterface>
- $msg : string = ''