Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OntologyCache

Caches ontologies obtained from Knora and handles direct dependencies between ontologies.

Hierarchy

Index

Constructors

constructor

Methods

Protected getDependenciesOfItem

Protected getItem

  • getItem(key: string, isDependency?: boolean): AsyncSubject<ReadOntology>
  • Gets a specific item from the cache. If not cached yet, the information will be fetched from Knora.

    Parameters

    • key: string

      the id of the item to be returned.

    • Default value isDependency: boolean = false

      true if the item to be returned is a dependency of another item (recursive call to this method).

    Returns AsyncSubject<ReadOntology>

    the requested item.

Protected getKeyOfItem

getOntology

  • getOntology(ontologyIri: string): Observable<Map<string, ReadOntology>>
  • Gets an ontology from the cache including its direct dependencies.

    The ontology Iris are the keys of the resulting Map.

    Parameters

    • ontologyIri: string

      the Iri of the ontology.

    Returns Observable<Map<string, ReadOntology>>

    the requested ontology and its direct dependencies.

getResourceClassDefinition

Protected reloadItem

Protected requestItemFromKnora

  • requestItemFromKnora(key: string, isDependency: boolean): Observable<ReadOntology[]>

Generated using TypeDoc