Inheritance

Data Stores can use Schemas to apply inheritance between classes. This can be configured in Schema-Only Data Stores, or by using certain Fixed Schema Types for Data Stores which do not have inheritance by default.

Inheritance is used to reduce the number of Rules and Actions or their complexity by allowing them to use base classes instead of specific classes. Specific classes inherit attributes from a base class, allowing these base classes to be used to represent any specific class that utilises the shared attributes.

This is configured using one of the following Fixed Schema Types:

     Note: All classes also inherit the Standard Classes that are always available in 1Integrate.

ClosedExample

Checking that "any pipe object must end in either a connector or valve or hydrant" requires two Rules. One for mains water pipes:

Copy
Water mains pipes
There Exists at least one Connector for which end_of(Water_mains_pipe.geometry) intersects Connector.geometry
OR
There Exists at least one Valve for which end_of(Water_mains_pipe.geometry) intersects Valve.geometry
OR 
There Exists at least one Hydrant for which end_of(Water_mains_pipe.geometry) intersects Hydrant.geometry

And a second for service water pipes:

Copy
Water service pipes
There Exists at least one Connector for which end_of(Water_service_pipe.geometry) intersects Connector.geometry
OR
There Exists at least one Valve for which end_of(Water_service_pipe.geometry) intersects Valve.geometry
OR 
There Exists at least one Hydrant for which end_of(Water_service_pipe.geometry) intersects Hydrant.geometry

This approach results in two complex Rules. Inheritance allows these two Rules to be condensed into one simple Rule using just base classes.

This single Rule is made by configuring both Water_mains_pipe and Water_service_pipe to inherit from the Pipe base class, and Connector, Valve, and Hydrant to inherit from the Network_Point base class.

Copy
Pipes (base class)
There Exists at least one Network_Point for which end_of(Pipe.geometry) intersects Network_Point.geometry

Class Inheritance

Ontology and Reference Data Stores are the Fixed Schema Types that allow class inheritance.

Ontology settings
Data Store settings with an Ontology Fixed Schema Type

Classes and attributes that already exist in both the Data Store and the Fixed Schema will be mapped automatically, displaying The Class Hierarchy next to the Source class or attribute.

A Data Store with an inherited Schema

Fixed Schema classes and attributes that are missing from the Data Store will have custom classes and attributes automatically created. These will be named "Required Class" and "Required Attribute" and will display an inherited class next to the name if there is one.