.. _section-Schema Frames: Schema Frames ~~~~~~~~~~~~~ The other type of frame in Flora is the *schema frame*, which is denoted by [||]. Schema frames are used to define class-level information. For example, .. code-block:: flora Person [| height {1..1} => eng_val#Length, birthDate {1..1} => \date, spouse {0..1} => Person, child {0..*} => Person |]. Here, we have a class Person, with a number of properties. The => arrow indicates the *range* of each property, i.e., the expected type of the values of that property on the class’s instances. The notation {n..m} before an arrow indicates minimum and maximum cardinality on the property, i.e., the number of expected values on the property, with \* being used to indicate “unlimited”. So, here we are saying that a person has exactly one height, exactly one birth date, any number of email addresses and phone numbers, at most one spouse, and any number of children. This example also introduces a new built-in type \\boolean, and a *q-name*, or qualified name, eng\_val#Length. A q-name is an identifier that is qualified by a namespace prefix, in this case eng\_val. Namespace prefixes are defined using iriprefix directives, discussed later in this chapter. The # character separates the prefix from the *local name*, Length. [1]_. Schema frames can be composite, nested, and so on, just like instance frames. The subclass relationship is indicated by the :: operator. .. code-block:: flora Man :: Person. This can be followed by a frame, just as the : operator on an instance frame. In fact, a subject can be followed by any number of :, ::, instance frames, and schema frames. For example, this is a valid Flora statement: .. code-block:: flora a : b : c :: d :: e [foo -> bar] [|flim => flam|]. a is an instance of b and c, and a subclass of d and e (note that all information is about the subject a!). This also illustrates that Flora has no strict instance-class distinction. In fact, the **KB Editor** has to “infer” which identifiers are “classes” and which ones are “instances” based on the type of information that is asserted for the identifier. Mixing of class- and instance-level properties can be useful for certain types of meta-modeling, or for annotation properties such as comments on a class. An example of this is: Man :: Person [comment->’A class which represents a human of male gender’] .. [1] In RDF/OWL, the : character is used for this purpose