Class YamlKonceptDefinitionSource
java.lang.Object
network.ike.docs.koncept.YamlKonceptDefinitionSource
- All Implemented Interfaces:
KonceptDefinitionSource
Loads Koncept definitions from a YAML file.
Expected YAML structure:
HeartFailure:
label: Heart Failure
definition: >
A clinical syndrome characterized by the heart's inability
to pump sufficient blood to meet metabolic demands.
axiom: "≡ ClinicalSyndrome ⊓ ∃hasPathology.(InsufficientCardiacOutput)"
sctid: "84114007"
iri: "http://snomed.info/id/84114007"
AorticStenosis:
label: Aortic Stenosis
definition: Narrowing of the aortic valve orifice.
axiom: "≡ StenosisOfValve ⊓ ∃hasMorphology.Stenosis ⊓ ∃findingSite.AorticValve"
sctid: "60573004"
-
Method Summary
Modifier and TypeMethodDescriptionstatic YamlKonceptDefinitionSourcefromClasspath(String resource) Loads definitions from a classpath resource.static YamlKonceptDefinitionSourceLoads definitions from a filesystem path.Look up the definition for the given koncept identifier.
-
Method Details
-
lookup
Description copied from interface:KonceptDefinitionSourceLook up the definition for the given koncept identifier.- Specified by:
lookupin interfaceKonceptDefinitionSource- Parameters:
identifier- CamelCase koncept identifier (e.g., "HeartFailure")- Returns:
- the definition if found
-
fromClasspath
Loads definitions from a classpath resource.- Parameters:
resource- the classpath resource path (e.g.,/koncepts.yml)- Returns:
- a definition source backed by the parsed YAML, or an empty source if not found
-
fromFile
Loads definitions from a filesystem path.- Parameters:
filePath- the absolute or relative path to the YAML file- Returns:
- a definition source backed by the parsed YAML, or an empty source if not found
-