Interface KonceptDefinitionSource

All Known Implementing Classes:
CompositeKonceptDefinitionSource, YamlKonceptDefinitionSource

public interface KonceptDefinitionSource
Strategy interface for resolving Koncept definitions.

Implementations may source definitions from:

  • YAML files on the classpath or filesystem
  • OWL ontology files via OWL API
  • IKE knowledge graph REST endpoints
  • SNOMED CT terminology servers (FHIR or native)
  • Method Summary

    Modifier and Type
    Method
    Description
    fromClasspath(String classpathResource)
    Create a source backed by a YAML file on the classpath.
    fromFile(String filePath)
    Create a source backed by a YAML file on the filesystem.
    All identifiers this source can enumerate, for a comprehensive glossary that lists every known koncept (not only those referenced in the document) and for inverting the broader taxonomy into children.
    lookup(String identifier)
    Look up the definition for the given koncept identifier.
  • Method Details

    • lookup

      Optional<KonceptDefinition> lookup(String identifier)
      Look up the definition for the given koncept identifier.
      Parameters:
      identifier - CamelCase koncept identifier (e.g., "HeartFailure")
      Returns:
      the definition if found
    • identifiers

      default Collection<String> identifiers()
      All identifiers this source can enumerate, for a comprehensive glossary that lists every known koncept (not only those referenced in the document) and for inverting the broader taxonomy into children. Sources that cannot enumerate (for example a live terminology server queried on demand) return an empty collection, and the glossary falls back to referenced koncepts only.
      Returns:
      every known identifier, or an empty collection if enumeration is unsupported
    • fromClasspath

      static KonceptDefinitionSource fromClasspath(String classpathResource)
      Create a source backed by a YAML file on the classpath.
      Parameters:
      classpathResource - resource path (e.g., "/koncepts.yml")
      Returns:
      a YAML-backed definition source
    • fromFile

      static KonceptDefinitionSource fromFile(String filePath)
      Create a source backed by a YAML file on the filesystem.
      Parameters:
      filePath - absolute or relative filesystem path
      Returns:
      a YAML-backed definition source