Schema Class
Implements
Methods
Name | Description | |
---|---|---|
addCustomAttribute(customAttribute: CustomAttribute): void Protected | ||
addItem<T extends SchemaItem>(item: T): void Protected | ||
addReference(refSchema: Schema): Promise<void> Protected | ||
addReferenceSync(refSchema: Schema): void Protected | ||
createConstant(name: string): Promise<Constant> Protected | Creates a Constant with the provided name in this schema. | |
createConstantSync(name: string): Constant Protected | ||
createCustomAttributeClass(name: string, modifier?: ECClassModifier): Promise<CustomAttributeClass> Protected | Creates a CustomAttributeClass with the provided name in this schema. | |
createCustomAttributeClassSync(name: string, modifier?: ECClassModifier): CustomAttributeClass Protected | ||
createEntityClass(name: string, modifier?: ECClassModifier): Promise<EntityClass> Protected | Creates a EntityClass with the provided name in this schema. | |
createEntityClassSync(name: string, modifier?: ECClassModifier): EntityClass Protected | ||
createEnumeration(name: string, primitiveType?: Integer | String): Promise<Enumeration> Protected | Creates an Enumeration with the provided name in this schema. | |
createEnumerationSync(name: string, primitiveType?: Integer | String): Enumeration Protected | ||
createFormat(name: string): Promise<Format> Protected | Creates an Format with the provided name in this schema. | |
createFormatSync(name: string): Format Protected | ||
createInvertedUnit(name: string): Promise<InvertedUnit> Protected | Creates a Inverted Unit with the provided name in this schema. | |
createInvertedUnitSync(name: string): InvertedUnit Protected | ||
createKindOfQuantity(name: string): Promise<KindOfQuantity> Protected | Creates an KindOfQuantity with the provided name in this schema. | |
createKindOfQuantitySync(name: string): KindOfQuantity Protected | ||
createMixinClass(name: string): Promise<Mixin> Protected | Creates a Mixin with the provided name in this schema. | |
createMixinClassSync(name: string): Mixin Protected | ||
createPhenomenon(name: string): Promise<Phenomenon> Protected | Creates a Phenomenon with the provided name in this schema. | |
createPhenomenonSync(name: string): Phenomenon Protected | ||
createPropertyCategory(name: string): Promise<PropertyCategory> Protected | Creates an PropertyCategory with the provided name in this schema. | |
createPropertyCategorySync(name: string): PropertyCategory Protected | ||
createRelationshipClass(name: string, modifier?: ECClassModifier): Promise<RelationshipClass> Protected | Creates a RelationshipClass with the provided name in this schema. | |
createRelationshipClassSync(name: string, modifier?: ECClassModifier): RelationshipClass Protected | ||
createStructClass(name: string, modifier?: ECClassModifier): Promise<StructClass> Protected | Creates a StructClass with the provided name in this schema. | |
createStructClassSync(name: string, modifier?: ECClassModifier): StructClass Protected | ||
createUnit(name: string): Promise<Unit> Protected | Creates a Unit with the provided name in this schema. | |
createUnitSync(name: string): Unit Protected | ||
createUnitSystem(name: string): Promise<UnitSystem> Protected | Creates a UnitSystem with the provided name in this schema. | |
createUnitSystemSync(name: string): UnitSystem Protected | ||
fromJSON(schemaProps: SchemaProps): Promise<void> | Loads the schema header (name, version alias, label and description) from the input SchemaProps | |
fromJSONSync(schemaProps: SchemaProps): void | Loads the schema header (name, version alias, label and description) from the input SchemaProps | |
getClasses(): IterableIterator<ECClass, any, any> | ||
getItem<T extends SchemaItem>(name: string): Promise<undefined | T> | Gets an item from within this schema. | |
getItems<T extends AnySchemaItem>(): IterableIterator<T, any, any> | ||
getItemSync<T extends SchemaItem>(name: string): undefined | T | Gets an item from within this schema. | |
getReference<T extends Schema>(refSchemaName: string): Promise<undefined | T> | ||
getReferenceNameByAlias(alias: string): undefined | string | ||
getReferenceSync<T extends Schema>(refSchemaName: string): undefined | T | ||
getSchemaItemKey(fullName: string): SchemaItemKey | Returns a SchemaItemKey given the item name and the schema it belongs to | |
lookupItem<T extends SchemaItem>(key: string | Readonly<SchemaItemKey>): Promise<undefined | T> | Attempts to find a schema item within this schema or a (directly) referenced schema | |
lookupItemSync<T extends SchemaItem>(key: string | Readonly<SchemaItemKey>): undefined | T | Attempts to find a schema item within this schema or a (directly) referenced schema | |
setVersion(readVersion?: number, writeVersion?: number, minorVersion?: number): void | Sets the version of the SchemaKey identifying the schema. | |
toJSON(): SchemaProps | Save this Schema's properties to an object for serializing to JSON. | |
toXml(schemaXml: Document): Promise<Document> | Converts the schema to a DOM XML Document. | |
fromJson(jsonObj: string | object, context: SchemaContext): Promise<Schema> Static | ||
fromJsonSync(jsonObj: string | object, context: SchemaContext): Schema Static | Completely loads the Schema from the input json. | |
startLoadingFromJson(jsonObj: string | object, context: SchemaContext): Promise<SchemaInfo> Static | Completely loads the SchemaInfo from the input json and starts loading the entire schema. |
Properties
Name | Type | Description | |
---|---|---|---|
_alias Protected | string | undefined | ||
_description Protected | string | undefined | ||
_label Protected | string | undefined | ||
_schemaKey Protected | SchemaKey | undefined | ||
alias Accessor ReadOnly | string | ||
context Accessor ReadOnly | SchemaContext | Returns the schema context this schema is within. | |
currentECSpecMajorVersion Accessor Static ReadOnly | number | ||
currentECSpecMinorVersion Accessor Static ReadOnly | number | ||
customAttributes Accessor ReadOnly | undefined | | ||
description Accessor ReadOnly | undefined | string | ||
fullName Accessor ReadOnly | string | Returns the schema name. | |
label Accessor ReadOnly | undefined | string | ||
minorVersion Accessor ReadOnly | number | ||
name Accessor ReadOnly | string | ||
originalECSpecMajorVersion Accessor ReadOnly | undefined | number | ||
originalECSpecMinorVersion Accessor ReadOnly | undefined | number | ||
readVersion Accessor ReadOnly | number | ||
references Readonly | Schema[] | ||
schema Accessor ReadOnly | Schema | Returns the schema. | |
schemaKey Accessor ReadOnly | SchemaKey | ||
writeVersion Accessor ReadOnly | number |
Defined in
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.