/*! * Copyright 2020 Ron Buckton * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { GraphProperty } from "./graphProperty"; import { GraphObject } from "./graphObject"; /** * Graph metadata defines information about a GraphProperty or GraphCategory. */ export declare class GraphMetadata extends GraphObject { private _label; private _description; private _group; private _defaultValue; private _flags; constructor({ label, description, group, defaultValue, properties, flags, }?: GraphMetadataOptions); /** * Gets or sets a descriptive label for the property. */ get label(): string; set label(value: string); /** * Gets or sets a description for the property. */ get description(): string; set description(value: string); /** * Gets or sets a group for the property. */ get group(): string; set group(value: string); /** * Gets or sets the default value for a property. Only used for a GraphMetadata associated with a property. */ get defaultValue(): V | undefined; set defaultValue(value: V | undefined); /** * Gets or sets the flags that control the behavior of a property or category. */ get flags(): GraphMetadataFlags; set flags(flags: GraphMetadataFlags); /** * Gets a value indicating whether the property can be changed once it is set. */ get isImmutable(): boolean; /** * Gets a value indicating whether the property can be removed. */ get isRemovable(): boolean; /** * Gets a value indicating whether the property can be serialized. */ get isSerializable(): boolean; /** * Gets a value indicating whether the property can be shared. */ get isSharable(): boolean; /** * Creates a copy of the metadata. */ copy(): GraphMetadata; } export interface GraphMetadataOptions { /** * A descriptive label for the property. */ label?: string; /** * A description for the property. */ description?: string; /** * A group for the property. */ group?: string; /** * The default value for a graph property. Only used for a GraphMetadata associated with a property. */ defaultValue?: V; /** * Flags that control the behavior of a property or category. */ flags?: GraphMetadataFlags; /** * Properties to define on the metadata object. Only used for a GraphMetadata associated with a category. */ properties?: Iterable; } export declare const enum GraphMetadataFlags { None = 0, Immutable = 1, Removable = 2, Serializable = 8, Sharable = 32, Default = 42 }