The data model recognizes three broad types: classes, enumerations, and primitives. Background terms and the types in the SAIF data model hierarchy are defined below.
data model: a set of concepts and associated composition rules used to describe types, including classes, and relationships among the instances of these types.
type: a primitive type. (The relationship between type and data value is equivalent to that between class and object. See below for clarification of these terms.)
class: an abstract data type which describes a group of objects that share the same characteristics. A class defines a unique collection of attributes and functions which distinguish it from all other classes. A class does not store any data; it is merely a template from which objects (see below) are created. Spot and Rover may be objects belonging to the class Dog. The association between a class and its attributes is sometimes referred to as an aggregation (or HAS-A or CONTAINS) association.
superclass: a class which maintains a central concept, attributes and methods common to a number of other classes, referred to as subclasses (see below). Dog may be defined as the superclass of Saint Bernard and Dalmatian. If direct instances of a class are not permitted, i.e., all instances belong to a subclass, then the class is considered an abstract superclass. Projection is an abstract superclass, with UTM and LambertConformal (and others) as subclasses. Because SAIF is based on a multiple inheritance model, every subclass has one or more superclasses, with one being the most common. A superclass is sometimes referred to as a parent class or a generalization of its subclasses.
subclass: a specialization of a superclass, typically defining additional attributes or methods, or a narrower central concept. Saint Bernard and Dalmatian are subclasses of Dog. A subclass inherits all attributes and methods of its superclasses. The association between a subclass and its superclasses is sometimes referred to as an IS-A (or an IS-A-KIND-OF or IS-A-TYPE-OF) relationship. (For convenience, the terms superclass and subclass are used in type definitions even if the type is not a class. Thus, in the PrimaryColor example described under Enumeration, PrimaryColor is a subclass of Enumeration, and Enumeration is the superclass of PrimaryColor. Similar relationships hold with the primitive types as well. In general discussion the terms supertype (or parent type) and subtype are used interchangeably for superclass and subclass, respectively.)
data value: an instance (i.e. a value) of a type, where the type is either a SAIF type as defined in the SAIF standard schema or a user-defined type.
object: an instance, i.e. a value, of a class. The class is either from the SAIF data model or standard schema, or from a user defined schema. The term object is similar to data value, but the former does not cover enumerates and primitives, whereas the latter does. Note that objects often relate to real-world entities; however, they may also pertain to more abstract concepts (such as a mapping projection). Objects may be considered as fundamental modelling primitives. They may be characterized by behaviour (the set of operations which can be performed on them) and by state (the values for the attributes defining the objects).
object identifier: a unique, immutable value associated with each object, and expressed in SAIF as either a character string or an integer. Other terms for object identifier are oid and objectIdentifier. If a value for an object identifier is given, it becomes possible to reference the object elsewhere in the data steam or file by using the specified value. Thus a given object may be defined once and referenced or shared by other objects many times. It is also possible that a reference may be given to an object which provides relevant information about data that does not exist in the data stream or file. That is, an object identifier may be given in the definition of another object, without the data to which the referenced object pertains being present in the data stream or file. In these cases, information about the external reference must be given. (See the discussion under ExternalReference in Chapter 3.)
AbstractObject: the base class from which all other classes are derived. All objects are instances of a class whose base type is AbstractObject. AbstractObject ensures that every object (i.e. every instance) may have an object identifier, which must be unique within the transfer. More specifically, the AbstractObject class has an optional attribute, objectIdentifier, from the domain Primitive, which may take either a string or integer value.
Tuple: A subtype of AbstractObject consisting of an ordered collection of attribute-domain pairs.
Multiset: A subtype of AbstractObject consisting of a logically related collection of data values. Duplicate values may exist and no particular order is assumed. Multisets may be instantiated directly, or more typically through lists or sets (see below).
List: A type of multiset in which the values have a specific order. The values are not necessarily unique.
IsoList: A list consisting of elements which are all direct instances of the same type.
Set: A type of multiset in which the values are unordered and unique.
IsoSet: A set consisting of values which are all direct instances of the same type.
Relation: A type of IsoSet in which the values are all direct instances of the same type of tuple, and in which the tuple attributes all have primitive domains.
Enumeration: an ordered collection of named values which permits the user to refer to values by their common (everyday) names, without the need to map them onto the data types of a particular programming language or database. An enumeration describes all possible values which may be assigned to the attribute in question. PrimaryColor may be defined as an enumeration consisting of the values red, green, and blue. The named values of an enumeration are sometimes referred to as enumerates.
Primitive: a simple data type. Primitives are the basic building blocks of data values. Included in the concept of primitives are strings, octetStrings, bitStrings, boolean, integers, and reals. Integers and reals are both considered as types of numeric data. Instances of integers may be categorized as Integer8, Integer8Unsigned, Integer16, Integer16Unsigned, Integer32, Integer32Unsigned, Integer64, or Integer64Unsigned. Instances of reals may be categorized as Real32, Real 64, or Real80.
nil: nil signifies the absence of a data value, regardless of whether the domain for the value is simple or complex. An object may leave the value for an optional attribute unspecified; i.e, the value is considered to be nil. Similarly, in the definition of a subclass, an attribute defined as optional in the superclass may be restricted in the subclass to be nil, i.e., as not to be used.
notNil: notNil signifies in a subclass definition that an attribute defined as optional in a superclass is not considered as optional in the subclass, i.e., a value must be provided.
attribute: a characteristic ascribed to an object; an attribute takes a value from a stated domain. Attributes and their associated domains are designated in the definition of a class. In the class definition it is indicated for each attribute whether provision of a value for a given object is considered as optional or mandatory.
class attribute: an attribute whose value pertains to all objects within a class; consequently, the value as well as the attribute is considered as part of the class definition. For any class which may be instantiated directly, specific class attributes values must exist. However, because their values are part of the class definition, they are not carried in a transfer for each object.
domain: the set of all possible values for an attribute. This may be addressed in a one of three ways. Typically, a domain is indicated by a type. Alternatively, a domain may be defined as a finite set of allowable values from a given primitive type. For example, say an attribute provides the units of currency of a product's price and its domain is defined as a character string. A subclass of the class containing the attribute may limit the possible values to AmericanDollars, CanadianDollars, or JapaneseYen. These value together represent a domain for the attribute, as used in the subclass. This use of domain is similar to an enumeration; it is required in situations where the domain has already been specified in a superclass and it is desired to provide limitations in a subclass (without using a restricted clause). SAIF provides a special Domain construct to define domains in this fashion. SAIF also provides a number of types of restricted clauses which allow a user to specify a single value or type, a set of values or types, or a range of values. (This case includes the capabilities handled in the second case above; however, sometimes it is more convenient to use the above approach.)
schema: a collection of logically related type definitions. The definitions of the subclasses and enumerations described in the next section of this document together constitute the SAIF standard schema. The definitions corresponding to the features in the National Topographic Database, 1:50 000 dataset serve as another schema. That is, the definitions of Tower, Pipeline, Road, etc. (and any associated type definitions such as the enumeration TowerFunctionType) together define that schema. (See the examples in the section of this chapter entitled Modelling with SAIF.) Such schemas, including the SAIF standard schema, are not directly part of the data model. Instead, they are considered as extensions to the model, constructed to convey meaning about certain types of objects.
virtual inheritance: if the identical attribute is inherited more than once because of two or more superclasses having a common ancestor where the attribute is first defined, then only one copy of the attribute is recognized. The SAIF data model always assumes virtual inheritance.