comunica / comunica-feature-reasoning

📬 Comunica packages for reasoning during query execution
MIT License
5 stars 5 forks source link

Rule resolved extension #46

Open jeswr opened 2 years ago

jeswr commented 2 years ago

Issue type:


Description:

removed from util.ts in bus-rule-resolve

// TODO [FUTURE]:
// Use pattern at
// https://github.com/comunica/comunica/blob/next/major/packages/bus-rdf-resolve-quad-pattern/lib/utils.ts
// to enable multiple rule sources
import { KeysRdfReason } from '@comunica/reasoning-context-entries';
import type { IActionContext } from '@comunica/types';

export function getContextSource(context: IActionContext): string | undefined {
  return context.get(KeysRdfReason.rules);
}

// TODO: Future - this will be needed
// /**
//  * Get the data source type.
//  * @param dataSource A data source.
//  */
// export function getDataSourceType() {
//   if (typeof dataSource === 'string') {
//     return '';
//   }
//   return 'match' in dataSource ? 'rdfjsSource' : dataSource.type;
// }
github-actions[bot] commented 2 years ago

Thanks for the suggestion!