names === null) { $nameInstances = $this->getNameProperty()->getRange()->getInstances(); $this->names = []; foreach ($nameInstances as $nameInstance) { $this->names[strtolower($nameInstance->getLabel())] = $nameInstance->getUri(); } } return $this->names; } public function getExclusionsList(): array { if ($this->excluded === null) { $instances = $this->getRootClass()->getInstances(true); $this->excluded = []; foreach ($instances as $instance) { $properties = $instance->getPropertiesValues([ $this->getNameProperty(), $this->getVersionProperty() ]); $excludedNameProperty = current($properties[$this->getNamePropertyUri()]); if ($excludedNameProperty) { $excludedName = strtolower($excludedNameProperty->getLabel()); $excludedVersion = (string)current($properties[$this->getVersionPropertyUri()]); $this->excluded[$excludedName][] = $excludedVersion; } } } return $this->excluded; } public function getExclusionsByName($name): array { return $this->getRootClass()->searchInstances( [OntologyRdfs::RDFS_LABEL => $name], ['like' => false] ); } public function getListDefinitionByName($name): ?core_kernel_classes_Resource { $results = $this->getListClass()->searchInstances( [OntologyRdfs::RDFS_LABEL => $name], ['like' => false] ); return array_pop($results); } }