import { CdmAttributeContext, CdmCollection, CdmCorpusContext, CdmDefinitionCollection, CdmFolderDefinition, CdmImportCollection, CdmObject, CdmObjectBase, CdmObjectDefinition, cdmObjectSimple, cdmObjectType, copyOptions, ImportPriorities, ResolvedAttributeSetBuilder, ResolvedTraitSetBuilder, resolveOptions, VisitCallback } from '../internal';
export declare class CdmDocumentDefinition extends cdmObjectSimple implements CdmDocumentDefinition {
    private TAG;
    static get objectType(): cdmObjectType;
    /**
     * @deprecated Use atCorpusPath instead.
     */
    get corpusPath(): string;
    name: string;
    /**
     * @deprecated Only for internal use.
     */
    folderPath: string;
    /**
     * @deprecated Only for internal use.
     */
    namespace: string;
    schema: string;
    jsonSchemaSemanticVersion: string;
    documentVersion: string;
    readonly imports: CdmImportCollection;
    definitions: CdmDefinitionCollection;
    importSetKey: string;
    /**
     * @deprecated Use owner property instead.
     */
    get folder(): CdmFolderDefinition;
    /**
     * @deprecated Use owner property instead.
     */
    set folder(value: CdmFolderDefinition);
    /**
     * @internal
     */
    importPriorities: ImportPriorities;
    /**
     * @internal
     */
    internalDeclarations: Map<string, CdmObjectBase>;
    /**
     * @internal
     */
    needsIndexing: boolean;
    /**
     * @internal
     */
    isDirty: boolean;
    /**
     * @internal
     */
    declarationsIndexed: boolean;
    /**
     * @internal
     */
    importsIndexed: boolean;
    /**
     * @internal
     */
    currentlyIndexing: boolean;
    /**
     * @internal
     */
    isValid: boolean;
    /**
     * @internal
     */
    _fileSystemModifiedTime: Date;
    /**
     * The maximum json semantic version supported by this ObjectModel version.
     */
    static currentJsonSchemaSemanticVersion: string;
    /**
     * A list of all objects contained by this document.
     * Only using during indexing and cleared after indexing is done.
     */
    private internalObjects;
    constructor(ctx: CdmCorpusContext, name: string, hasImports?: boolean);
    /**
     * Validates all the objects in this document.
     * @internal
     */
    checkIntegrity(): void;
    /**
     * Clear all document's internal caches and update the declared path of every object contained by this document.
     * @internal
     */
    clearCaches(): void;
    /**
     * Indexes all definitions contained by this document.
     * @internal
     */
    declareObjectDefinitions(): void;
    /**
     * @internal
     */
    finishIndexing(loadedImports: boolean): void;
    /**
     * Fetches the corresponding object definition for every object reference.
     * @internal
     */
    resolveObjectDefinitions(resOpt: resolveOptions): void;
    /**
     * Verifies if the trait argument data type matches what is specified on the trait definition.
     * @internal
     */
    resolveTraitArguments(resOpt: resolveOptions): void;
    /**
     * @internal
     * finds any relative corpus paths that are held within this document and makes them relative to the new folder instead
     */
    localizeCorpusPaths(newFolder: CdmFolderDefinition): boolean;
    getObjectType(): cdmObjectType;
    fetchObjectDefinition<T = CdmObjectDefinition>(resOpt: resolveOptions): T;
    fetchObjectDefinitionName(): string;
    copy(resOpt?: resolveOptions, host?: CdmObject): CdmObject;
    validate(): boolean;
    /**
     * @internal
     */
    constructResolvedAttributes(resOpt: resolveOptions, under?: CdmAttributeContext): ResolvedAttributeSetBuilder;
    /**
     * @internal
     */
    constructResolvedTraits(rtsb: ResolvedTraitSetBuilder, resOpt: resolveOptions): void;
    getSchema(): string;
    getName(): string;
    setName(name: string): string;
    getSchemaVersion(): string;
    getDefinitions(): CdmCollection<CdmObjectDefinition>;
    getFolder(): CdmFolderDefinition;
    get atCorpusPath(): string;
    visit(pathFrom: string, preChildren: VisitCallback, postChildren: VisitCallback): boolean;
    /**
     * saves the document back through the adapter in the requested format
     * format is specified via document name/extension based on conventions:
     * 'model.json' for back compat model, '*.manifest.cdm.json' for manifest, '*.cdm.json' for cdm defs
     * saveReferenced (default false) when true will also save any schema defintion documents that are
     * linked from the source doc and that have been modified. existing document names are used for those.
     * returns false on any failure
     */
    saveAsAsync(newName: string, saveReferenced?: boolean, options?: copyOptions): Promise<boolean>;
    refreshAsync(resOpt: resolveOptions): Promise<boolean>;
    /**
     * @internal
     * Remove any old document content from caches and re-declare and resolve with new content
     */
    indexIfNeeded(resOpt: resolveOptions, loadImports?: boolean): Promise<boolean>;
    /**
     * @internal
     */
    getImportPriorities(): ImportPriorities;
    /**
     * @internal
     */
    fetchObjectFromDocumentPath(objectPath: string, resOpt: resolveOptions): CdmObject;
    /**
     * @internal
     */
    reload(): Promise<void>;
    /**
     * @internal
     */
    saveLinkedDocuments(options?: copyOptions): Promise<boolean>;
    /**
     * changes a relative corpus path to be relative to the new folder
     */
    private localizeCorpusPath;
    private prioritizeImports;
    /**
     * @internal
     */
    importPathToDoc(docDest: CdmDocumentDefinition): string;
}
