import { GraphDocument, Observation } from './../classes/';
import { GraphElement, TextEntity, GraphDatasource } from '@csnext/cs-data';
import { SearchEntity } from '../classes/document/search-entity';
import { ViewType } from '../classes/document/view-type';
import { IDocumentPlugin } from '../plugins/document-plugin';
import { EntityParser } from "../plugins/EntityParser";
import { EntityList } from '../components/document/node-entities';
import { IFormOptions } from '@csnext/cs-core';
import { DataSet, FeatureType } from '@csnext/cs-data';
import { GeojsonPlusLayer, IMapLayer, MapLayers } from '@csnext/cs-map';
import { Editor } from '@tiptap/vue-2';
import { CrossFilterDatasource } from "@csnext/cs-crossfilter";
import { IImportPlugin } from '../plugins/import-plugin';
import { IDocumentViewerPlugin } from '../plugins/viewer-plugin';
export declare class DocDatasource extends GraphDatasource {
    base_url: string;
    timesourceId: string;
    mapsourceId: string;
    id: string;
    static DOCUMENT: string;
    static DOCUMENT_UPDATED: string;
    static DOCUMENT_ENTITIES: string;
    static ENTITIES_UPDATED: string;
    static FEATURE_TYPES: string;
    static FEATURE_TYPE_SELECTED: string;
    activeDocument?: GraphDocument;
    map?: CrossFilterDatasource;
    activeOperation?: GraphElement;
    searchEntities?: SearchEntity[];
    viewTypes: {
        [id: string]: ViewType;
    };
    sources?: GraphElement[];
    documentPlugins: IDocumentPlugin[];
    importPlugins: IImportPlugin[];
    viewerPlugins: IDocumentViewerPlugin[];
    visibleViewTypes: ViewType[];
    editor?: Editor | null;
    elementHistory?: string[];
    entityParser: EntityParser;
    layers: {
        [type: string]: GeojsonPlusLayer;
    };
    constructor(base_url: string, timesourceId: string, mapsourceId: string);
    reset(): Promise<boolean>;
    getObservation(type: string): FeatureType | undefined;
    initLayer(ml: MapLayers, key: string, obs: FeatureType): Promise<IMapLayer>;
    openFeatureTypeEditor(featureType: FeatureType): void;
    openOriginal(original: GraphElement): void;
    initLayers(defaultLayer?: string): Promise<void>;
    addElementToLayer(layer: DataSet, element: GraphElement): void;
    updateLayer(type: FeatureType): void;
    updateLayers(): void;
    updateLayerElements(elements: GraphElement[]): Promise<void>;
    linkObservationToDocument(observation: FeatureType, doc: GraphDocument): Promise<FeatureType>;
    linkEntityToDocument(entity: TextEntity, doc: GraphDocument): Promise<TextEntity>;
    linkEntityListToDocument(entity: EntityList, doc: GraphDocument): Promise<EntityList>;
    triggerDocumentEntities(): void;
    updateHighlights(): void;
    removeEntityNodeFromDocument(node: any, doc: GraphDocument): void;
    removeEntityListFromDocument(list: EntityList, doc: GraphDocument, removeInstances?: boolean): Promise<EntityList>;
    removeEntityFromDocument(entity: TextEntity, doc: GraphDocument): Promise<TextEntity>;
    loadTypes(): Promise<boolean>;
    loadSchema(): Promise<boolean>;
    elementEditorForm(node: GraphElement): IFormOptions;
    loadGraph(url: string, clearCache?: boolean): Promise<void>;
    deleteDocument(doc: GraphDocument): void;
    openEntityEditor(entity: SearchEntity): void;
    addToOperation(operation: GraphElement, element: GraphElement): void;
    updateSources(): void;
    parseDocument(doc: GraphDocument): Promise<GraphDocument>;
    addNewDocument(makeActive?: boolean): Promise<GraphDocument | undefined>;
    addNewReport(type: FeatureType): Promise<GraphDocument | undefined>;
    initDocumentPlugins(): void;
    openViewer(element: GraphElement, document: GraphElement): void;
    linkDocumentObservations(doc: GraphDocument): void;
    linkDocumentEntities(doc: GraphDocument): void;
    initDocument(doc: GraphDocument): GraphDocument;
    parseDocuments(): void;
    checkQueryParams(): void;
    refresh(loadGraph?: boolean): Promise<boolean>;
    saveFeatureType(type: FeatureType): Promise<FeatureType>;
    getSimplifiedEntities(doc: GraphDocument): TextEntity[];
    getSimplifiedObservations(doc: GraphDocument): Observation[];
    saveDocument(d: GraphDocument): Promise<GraphDocument>;
    removeObservation(observation: FeatureType): Promise<boolean>;
    updateTextEntity(document: GraphDocument, entity: TextEntity): void;
    updateDocumentOriginals(doc: GraphDocument): void;
    refreshViewTypes(): void;
    syncEntities(document: GraphDocument, content: any, triggerUpdated?: boolean, key?: string): void;
    removeNode(element: GraphElement, relations?: boolean, notify?: boolean): Promise<boolean>;
    saveNode(element: GraphElement): Promise<GraphElement>;
    parseEntities(): Promise<void>;
    activateDocument(doc?: GraphDocument): Promise<GraphDocument>;
    removeEdge(edge: GraphElement): Promise<boolean>;
    addNewEdge(edge: GraphElement): Promise<GraphElement>;
    addNewNode(element: GraphElement): Promise<GraphElement>;
    selectElementId(id: string, open?: boolean): void;
    includeElement(element: GraphElement): void;
    toggleElement(element: GraphElement): void;
    selectElement(element: GraphElement | undefined, open?: boolean): void;
    startEditElement(element: GraphElement): void;
    stopEditElement(element: GraphElement): void;
    createKGView(elements?: GraphElement[], expand?: boolean): void;
    addElementToGraph(el: GraphElement): void;
    removeElementFromGraph(el: GraphElement): void;
    addRelationsToGraph(element: GraphElement, classId?: string): void;
    openElement(node: GraphElement | string): void;
    updateSearchEntities(): void;
    removeReports(): Promise<void>;
    setQueryParams(): void;
    loadElementHistory(): void;
    saveElementHistory(): void;
    addElementToHistory(id: string): void;
    execute(): Promise<DocDatasource>;
}
