@@ -312,81 +312,6 @@ def _detect_source_type(self, source: str) -> str:
312312
313313 raise ValueError (f"Cannot determine ontology source type: '{ source } '" )
314314
315- # def load(
316- # self,
317- # source: str,
318- # downloader: DownloaderPort = None,
319- # include_obsolete=False,
320- # backend = "pronto",
321- # ) -> Ontology:
322- # """Load an ontology from a file path, an OBO Foundry identifier, or a URL.
323-
324- # The method auto-detects the source type and uses the appropriate loading
325- # strategy:
326- # - "file": local filesystem path
327- # - "obo" : OBO Foundry ontology identifier (alphanumeric, underscore, hyphen)
328- # - "url" : http(s) URL
329-
330- # Args:
331- # source (str): Local path, OBO id, or URL pointing to the ontology.
332- # downloader (DownloaderPort | None): Optional downloader to use when loading from URL.
333- # include_obsolete (bool): If True, include obsolete terms when building GraphBLAS structures.
334- # backend (str): Backend to use for subsequent queries: "pronto" (default) or "graphblas".
335-
336- # Returns:
337- # Ontology: The loaded ontology object.
338-
339- # Raises:
340- # ValueError: If the source type cannot be determined or an unknown backend is provided.
341- # RuntimeError: If loading fails for the detected strategy.
342-
343- # Example:
344- # >>> client = ClientOntology()
345- # >>> ont = client.load("./tests/resources/dummy_ontology.obo")
346- # >>> isinstance(ont, Ontology)
347- # True
348- # """
349-
350- # logger.info(f"Loading ontology from source: {source} ...")
351-
352- # # Load ontology using the selected strategy
353- # try:
354- # logger.debug(f"Instantiating ProntoLoaderAdapter with cache_dir: {self._cache_dir}")
355- # loader = ProntoLoaderAdapter(cache_dir=self._cache_dir)
356- # except Exception as e:
357- # logger.error(f"Failed to instantiate ProntoLoaderAdapter: {e}")
358- # raise
359-
360- # # Detect which strategy to use
361- # strategy = self._detect_source_type(source)
362- # try:
363- # match strategy:
364- # case "file":
365- # self._ontology = loader.load_from_file(file_path_ontology=source)
366- # case "obo":
367- # self._ontology = loader.load_from_catalog(name_id=source, format="obo")
368- # case "url":
369- # self._ontology = loader.load_from_url(source, Path(source).name, downloader)
370- # case _:
371- # raise ValueError(f"Unknown ontology loading strategy: {strategy}")
372- # except Exception as e:
373- # raise RuntimeError(f"Failed to load ontology from '{source}' ({strategy}): {e}") from e
374-
375- # # Handle backend-specific initialization
376- # if backend == "pronto":
377- # self._lookup_tables = None
378-
379- # elif backend == "graphblas":
380- # self._lookup_tables, self._ontology = self.__create_graphblas_ontology(
381- # ontology=self._ontology.get_ontology(),
382- # include_obsolete=include_obsolete
383- # )
384-
385- # # Initialize query adapters
386- # self._initialize_queries(backend=backend)
387-
388- # logger.info(f"Loading ontology from source: DONE")
389-
390315 def load (
391316 self ,
392317 source : str ,
0 commit comments