UNPKG

@accordproject/concerto-core

Version:

Core Implementation for the Concerto Modeling Language

134 lines (133 loc) 4 kB
declare const Declaration: any; /** * ScalarDeclaration defines the structure (model/schema) of composite data. * It is composed of a set of Properties, may have an identifying field, and may * have a super-type. * A ScalarDeclaration is conceptually owned by a ModelFile which * defines all the classes that are part of a namespace. * * @abstract * @class * @memberof module:concerto-core */ declare class ScalarDeclaration extends Declaration { /** * Process the AST and build the model * * @throws {IllegalModelException} * @private */ process(): void; /** * Semantic validation of the structure of this class. Subclasses should * override this method to impose additional semantic constraints on the * contents/relations of fields. * * @throws {IllegalModelException} * @protected */ validate(): void; /** * Returns false as scalars are never identified. * @returns {Boolean} false as scalars are never identified * @deprecated */ isIdentified(): boolean; /** * Returns false as scalars are never identified. * @returns {Boolean} false as scalars are never identified * @deprecated */ isSystemIdentified(): boolean; /** * Returns null as scalars are never identified. * @return {string} as scalars are never identified * @deprecated */ getIdentifierFieldName(): null; /** * Returns the FQN of the super type for this class or null if this * class does not have a super type. * * @return {string} the FQN name of the super type or null */ getType(): any; /** * Returns the FQN of the super type for this class or null if this * class does not have a super type. * * @return {string} the FQN name of the super type or null * @deprecated */ getSuperType(): null; /** * Get the super type class declaration for this class. * @return {ClassDeclaration} the super type declaration, or null if there is no super type. * @deprecated */ getSuperTypeDeclaration(): null; /** * Returns the validator string for this scalar definition * @return {Validator} the validator for the field or null */ getValidator(): any; /** * Returns the default value for the field or null * @return {string | number | null} the default value for the field or null */ getDefaultValue(): any; /** * Returns the string representation of this class * @return {String} the string representation of the class */ toString(): string; /** * Returns true if this class is abstract. * * @return {boolean} true if the class is abstract * @deprecated */ isAbstract(): boolean; /** * Returns true if this class is the definition of a scalar declaration. * * @return {boolean} true if the class is a scalar */ isScalarDeclaration(): boolean; /** * Returns true if this class is the definition of an asset. * * @return {boolean} true if the class is an asset * @deprecated */ isAsset(): boolean; /** * Returns true if this class is the definition of a participant. * * @return {boolean} true if the class is a participant * @deprecated */ isParticipant(): boolean; /** * Returns true if this class is the definition of a transaction. * * @return {boolean} true if the class is a transaction * @deprecated */ isTransaction(): boolean; /** * Returns true if this class is the definition of an event. * * @return {boolean} true if the class is an event * @deprecated */ isEvent(): boolean; /** * Returns true if this class is the definition of a concept. * * @return {boolean} true if the class is a concept * @deprecated */ isConcept(): boolean; } export = ScalarDeclaration;