import { DirectedGraph } from 'graphology'; import { CloudEvent } from '../models'; /** * The Graph resolver is a component that is used to resolve * a cloud event into a graph representation. */ export declare class GraphResolver { private event; /** * Graph resolver constructor. * @param event the cloud event to resolve. */ constructor(event: CloudEvent); /** * A helper function that returns the name of the document. * @param document the document instance. * @param metadata the metadata of the document. * @returns the name of the document. */ private getName; /** * Adds the current document to the graph with * its attributes. * @param graph the graph instance. * @returns a reference to the graph resolver. */ private addDocument; /** * Adds the source document to the graph. * @param graph the graph instance. * @returns a reference to the graph resolver. */ private addSource; /** * Adds the language of the document to the graph * as a separate node. * @param graph the graph instance. * @param document the document instance. * @returns a reference to the graph resolver. */ private addLanguage; /** * Adds the topics of the document to the graph * as separate nodes. * @param graph the graph instance. * @param document the document instance. * @returns a reference to the graph resolver. */ private addTopics; /** * Adds the publisher of the document to the graph * as a separate node. * @param graph the graph instance. * @param document the document instance. * @returns a reference to the graph resolver. */ private addPublisher; /** * Adds the authors of the document to the graph * as separate nodes. * @param graph the graph instance. * @param document the document instance. * @returns a reference to the graph resolver. */ private addAuthors; /** * Adds the class of the document to the graph * as a separate node. * @param graph the graph instance. * @param document the document instance. * @returns a reference to the graph resolver. */ private addClass; /** * Adds the kind of the document to the graph * as a separate node. * @param graph the graph instance. * @param document the document instance. * @returns a reference to the graph resolver. */ private addKind; /** * Adds the custom ontology to the graph. * @param graph the graph instance. * @param document the document instance. * @returns a reference to the graph resolver. */ private addCustomOntology; /** * Resolve the cloud event into a graph representation. * @returns a graph representation of the cloud event. */ resolve(): Promise; }