19declare(strict_types=1);
60 if (isset($this->paths_by_slot_id[$identifier->value])) {
61 return $this->paths_by_slot_id[$identifier->value];
63 return $this->paths_by_slot_id[$identifier->value] = match ($identifier) {
64 Identifier::GENERAL_STRUCTURE => $this->
buildPath(
'general',
'structure',
'value'),
65 Identifier::GENERAL_AGGREGATION_LEVEL => $this->
buildPath(
'general',
'aggregationLevel',
'value'),
66 Identifier::GENERAL_COVERAGE => $this->
buildPath(
'general',
'coverage',
'string'),
67 Identifier::GENERAL_IDENTIFIER_CATALOG => $this->
buildPath(
'general',
'identifier',
'catalog'),
68 Identifier::LIFECYCLE_STATUS => $this->
buildPath(
'lifeCycle',
'status',
'value'),
69 Identifier::LIFECYCLE_CONTRIBUTE_ROLE => $this->
buildPath(
'lifeCycle',
'contribute',
'role',
'value'),
70 Identifier::LIFECYCLE_CONTRIBUTE_PUBLISHER => $this->
buildPath(
'lifeCycle',
'contribute',
'entity'),
71 Identifier::METAMETADATA_IDENTIFIER_CATALOG => $this->
buildPath(
'metaMetadata',
'identifier',
'catalog'),
72 Identifier::METAMETADATA_CONTRIBUTE_ROLE => $this->
buildPath(
'metaMetadata',
'contribute',
'role',
'value'),
73 Identifier::METAMETADATA_SCHEMA => $this->
buildPath(
'metaMetadata',
'metadataSchema'),
74 Identifier::TECHNICAL_REQUIREMENT_TYPE => $this->
buildPath(
'technical',
'requirement',
'orComposite',
'type',
'value'),
75 Identifier::TECHNICAL_REQUIREMENT_BROWSER, Identifier::TECHNICAL_REQUIREMENT_OS => $this->
buildPath(
'technical',
'requirement',
'orComposite',
'name',
'value'),
76 Identifier::TECHNICAL_OTHER_PLATFORM_REQUIREMENTS => $this->
buildPath(
'technical',
'otherPlatformRequirements',
'string'),
77 Identifier::TECHNICAL_FORMAT => $this->
buildPath(
'technical',
'format'),
78 Identifier::EDUCATIONAL_INTERACTIVITY_TYPE => $this->
buildPath(
'educational',
'interactivityType',
'value'),
79 Identifier::EDUCATIONAL_LEARNING_RESOURCE_TYPE => $this->
buildPath(
'educational',
'learningResourceType',
'value'),
80 Identifier::EDUCATIONAL_INTERACTIVITY_LEVEL => $this->
buildPath(
'educational',
'interactivityLevel',
'value'),
81 Identifier::EDUCATIONAL_SEMANTIC_DENSITY => $this->
buildPath(
'educational',
'semanticDensity',
'value'),
82 Identifier::EDCUCATIONAL_INTENDED_END_USER_ROLE => $this->
buildPath(
'educational',
'intendedEndUserRole',
'value'),
83 Identifier::EDUCATIONAL_CONTEXT => $this->
buildPath(
'educational',
'context',
'value'),
84 Identifier::EDUCATIONAL_DIFFICULTY => $this->
buildPath(
'educational',
'difficulty',
'value'),
85 Identifier::EDUCATIONAL_TYPICAL_AGE_RANGE => $this->
buildPath(
'educational',
'typicalAgeRange',
'string'),
86 Identifier::RIGHTS_COST => $this->
buildPath(
'rights',
'cost',
'value'),
87 Identifier::RIGHTS_CP_AND_OTHER_RESTRICTIONS => $this->
buildPath(
'rights',
'copyrightAndOtherRestrictions',
'value'),
88 Identifier::RIGHTS_DESCRIPTION => $this->
buildPath(
'rights',
'description',
'string'),
89 Identifier::RELATION_KIND => $this->
buildPath(
'relation',
'kind',
'value'),
90 Identifier::RELATION_RESOURCE_IDENTIFIER_CATALOG => $this->
buildPath(
'relation',
'resource',
'identifier',
'catalog'),
91 Identifier::CLASSIFICATION_PURPOSE => $this->
buildPath(
'classification',
'purpose',
'value'),
92 Identifier::CLASSIFICATION_KEYWORD => $this->
buildPath(
'classification',
'keyword',
'string'),
93 Identifier::CLASSIFICATION_TAXPATH_SOURCE => $this->
buildPath(
'classification',
'taxonPath',
'source',
'string'),
106 return match ($identifier) {
107 Identifier::LIFECYCLE_CONTRIBUTE_PUBLISHER => $this->
buildCondition(
113 Identifier::TECHNICAL_REQUIREMENT_BROWSER => $this->
buildCondition(
134 ?
string $condition_value
136 foreach (
Identifier::cases() as $identifier) {
143 $condition?->value() !== $condition_value ||
156 if (!isset($this->identifiers_by_path)) {
157 $this->identifiers_by_path = [];
158 foreach (Identifier::cases() as $identifier) {
159 $path_for_slot = $this->pathForSlot($identifier);
160 $this->identifiers_by_path[$path_for_slot->toString()][] = $identifier;
163 yield
from $this->identifiers_by_path[$path_to_element->
toString()] ?? [];
169 ?
string $condition_value
171 $identifier = $this->identiferFromPathAndCondition(
181 $builder = $this->path_factory->custom();
182 foreach ($steps as $step) {
183 $builder = $builder->withNextStep($step);
185 return $builder->get();
189 string $condition_value,
192 $builder = $this->path_factory->
custom();
193 foreach ($steps_to_condition as $step) {
195 $builder = $builder->withNextStepToSuperElement();
198 $builder = $builder->withNextStep($step);
200 $path = $builder->withRelative(
true)->get();
210 return $this->navigator_factory->structureNavigator(
211 $this->pathForSlot($identifier),
212 $this->structure->getRoot()
213 )->elementAtFinalStep()->getDefinition()->dataType();