Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • EXPRESS_EXTENSION_SCHEMA   extensionSchemaName FOR expressSchemaName; <body>  END_EXPRESS_EXTENSION_SCHEMA;
  • EXPRESS_EXTENSION_SCHEMA   extensionSchemaName {‘GUUID’‘GUID’} FOR expressSchemaName;<body>  END_EXPRESS_EXTENSION_SCHEMA;

...

The

...

reason

...

for

...

the

...

optional

...

GUID is

...

to

...

be

...

able

...

to

...

track/label

...

one

...

particular

...

version

...

of

...

an

...

extension

...

schema 

...

and

...

population(data).

Example:  exporting a population including “extension schema data” on a step file package. When importing such step file package, the

...

GUID is used to ensure that the extension schemata in the importing DB is exactly the same as in the exporting DB. There will be an option in write/read step file package to include exporting/defining of the extension schemata.

ENTITY Declaration

ENTITY declarations in an extension schema have the same syntax as in an Express schema except the following:

  • Declarations not supported:  UNIQUE , WHERE
  • New featureExtension: GENERIC_ENTITY is allowed as domain for all attribute types.
  • Extension: INVERSE attribute may be declared:  ALL_LOCAL_REFS_TO_ME : SET OF  GENERIC_ENTITY;   -- no “ FOR ‘attributeName’ “
    • The attribute will return a set containing all instances that refers this instance within the same model
  • Extension: INVERSE attribute may be declared:  ALL_CROSS_MODEL_REFS_TO_ME      : SET OF  GENERIC_ENTITY;  -- no “ FOR ‘attributeName’ “FOR ‘attributeName’ “
    • The attribute will return a set containing all instances that refers this instance within the same database - all models
Expand
titleExample
-- extend the IFC schema with a window suitable for cars	
ENTITY xifcWindShield SUBTYPE of IfcWindow;		
	fitsMakes : LIST OF xifcVehicle; -- list of car makes that this window will fit in
END_ENTITY;
 
ENTITY xifcVehicle;		
	brand : STRING; 	-- i.e. 'Ford'		
	model : STRING;  	-- i-e 'T'        
	year  : STRING; 	-- i.e '1921-1924'    
END_ENTITY;

ENTITY_EXTENSION Declaration

...

We can discuss how many of the ”extension schema rules checking”  we implement in the compiler and how many we implement in the edmCloseExtensionSchemaCompilerModel() (similar as edmCloseCompilerModel()).

 

Syntax Illustration 0.3

Code Block
EXPRESS_EXTENSION_SCHEMA   ExtensionSchemaName FOR IFC2X3;

    ENTITY_EXTENSION extToIfcxx1 FOR  ifcxx1;
       (* Attribute name must be unique within the extended entity (ifcxx1), may be same as
          attribute names in super type Entity. When so, this extended attribute must be
          accessed by name using "full qualified attribute name".
          The attribute domains can be any domain in the actual schema or domain (instance type)
          defined in the current extension schema
       *)
       extendedExplicitAttr1 : STRING;           -- any simple data type can be used, not defined types
       extendedExplicitAttr2 : GENERIC_ENTITY;   --sdaiINSTANCE of any type. can be used as link to instance in any other model.
       extendedExplicitAttr3 : SET OF GENERIC_ENTITY;
    INVERSE
       ALL_CROSS_MODEL_REFERENCES_TO_ME : SET OF GENERIC_ENTITY; GENERIC_ENTITY;  -- reserved name, keeps all references from other models
	   ALL_LOCAL_REFS_TO_ME : SET OF  GENERIC_ENTITY;             -- reserved name, keeps all references from other models
       extendedInverseAttr : SET OF GENERIC_ENTITY FOR (entityx.explicitAttr1, entityx.explicitAttr2, ...entityz.explicitAttr5);
    END_ENTITY_EXTENSION;

    ENTITY_EXTENSION extToifcxx2 FOR SUBTYPES ifcxx2;
       (* same as ENTITY_EXTENSION except that all extensions will be valid for all subtypes of the extended entity, i.e., all subtypes of ifcxx2 *)
       extendedExplicitAttr1 : STRING;           -- any simple data type can be used, not defined types
       extendedExplicitAttr2 : GENERIC_ENTITY;   --sdaiINSTANCE of any type. can be used as link to instance in any other model.
       extendedExplicitAttr3 : SET OF GENERIC_ENTITY;
    INVERSE
       ALL_CROSS_MODEL_REFERENCES_TO_ME : SET OF GENERIC_ENTITY; : SET OF GENERIC_ENTITY;  -- reserved name, keeps all references from other models
	   ALL_LOCAL_REFS_TO_ME : SET OF  GENERIC_ENTITY;             -- reserved name, keeps all references from other models
       extendedInverseAttr : SET OF GENERIC_ENTITY FOR (entityx.explicitAttr1, entityx.explicitAttr2, ...entityz.explicitAttr5);
    END_ENTITY_EXTENSION;
     
    ENTITY_EXTENSION  name; -- no FOR clause means it is a "new" entity
        explicitAttr1 : INTEGER;
        explicitAttr2 : GENERIC_ENTITY;
        -- ........
     INVERSE
        -- .......
        ALL_CROSS_MODEL_REFERENCES_TO_ME : SET OF GENERIC_ENTITY;  -- reserved name, keeps all references from other models
    END_ENTITY_EXTENSION;

    ENTITY_EXTENSION name SUBTYPE OF (FOR entity1, entity2, ... entityN);  -- subtype of any entity in main schema (FOR xxx) or "extended entity" in schema
        explicitAttr1 : INTEGER;
        explicitAttr2 : GENERIC_ENTITY;
        -- ........
     INVERSE
        -- .......
        ALL_CROSS_MODEL_REFERENCES_TO_ME : SET OF GENERIC_ENTITY;  -- reserved name, keeps all references from other models
        ALL_LOCAL_REFS_TO_ME : SET OF  GENERIC_ENTITY;             -- reserved name, keeps all references from other models
    END_ENTITY_EXTENSION;
	

END_EXPRESS_EXTENSION_SCHEMA;

...