Here is an example. Please comment on structure and content. Thanks.
-- Mary
3.2 Functional Requirements
Functional Requirement SP No. 1: Define Topics Used as Association Role
Types with their Classes
(Best title for this?)
Source: Steve Pepper (N 226 Section 3.1)
(Question: This is quite complex. Do we need to break up this into separate
functional requirements?)
Criticality: "MUST HAVE"
Definition: The TMCL must be able to define which topics are used for
association role types and the permitted classes of these role-playing
topics. Cardinality may be expressed. Data typing is not. Validity in
scope may be expressed. The TMCL may define more complex constraining of
association role type topics with their classes. (Please comment on this)
(Note: This was rewritten to fit this format. Please review and correct)
Information flow (how is the information flowing between parts?) Not
defined. Do we need this and if so, how would it be written?
Process Description (source: N226 section 3.1)
Usage Scenario 1: Constrain the topic "T" to be used for typing
associations and nothing else.
Example: The topic "born in" defines a class of associations.
Usage Scenario 2: Constrain associations of type "T" to consist of N roles,
"R1", "R2", ... "Rn".
Example: Associations of type "born in" must have two roles, "person" and
"place".
Usage Scanario 3: Constrain the role "R" in an association of a given type
to be played by exactly one topic belonging to the class "C".
Example: The roles "person" and "place" in an association of type "born in"
must each be played by exactly one topic belonging to the classes "person"
and "place", respectively.
Usage Scanario 4: Constrain the role "R" in an association of a given type
to be played by one or more topics belonging to the class "C".
Example: The role "project" in an association of type "project membership"
must be played by a topic of type "project", and the role "project member"
must be played by one or more topics of type "employee".
Usage Scanario 5: Constrain associations of type "T", such that
if role "R1" is played by a topic of type A1, then role "R2" must be played
by a topic of type "A2", "A2'", or "A2''";
if role "R1" is played by a topic of type B1, then role "R2" must be played
by a topic of type "B2", "B2'", or "B2''";
Example: Associations of type "located in" consist of two roles,
"container" and "containee" such that the "container" may be
¡¦ a topic of type "country", in which case the "containee" must
be
of type "state", "county", or "city";
¡¦ a topic of type "state", in which case the "containee" must be
of type "county" or "city";
¡¦ a topic of type "county", in which case the "containee" must be
of type "city";
¡¦ a topic of type "city", in which case the "containee" must be
of
type "theatre";
Usage Scenario 6: Constrain associations of type "T" to be in the scope "S".
Example: Associations of type "born in" must be in the scope "biography".
Data Constructs: N/A
Data Dictionary: N/A
3.3 Classes (object-oriented) or Syntax Examples illustrating usage
Scenarios in Functional Requirements Section 3.2
We can use this section to clarify the context of the usage scenarios
above. We may want to describe that the constraint may be described at the
schema level or application level and use pseudo code for the application
level descriptions.
Functional Requirement No. 1 Define Topics Used as Association Role Types
with their Classes
Proposal 1 Syntax: XML DTD
Source: Steve Pepper, Lars Marius Garshol; N0267 Ontopia Schema Language
Specification Sections 2.7, 2.8, 2.9 Also see relvant sections in DTD.
Proposal 2 Syntax: AsTma!
Source: xxx
Proposal 3: OOP pseudocode
Source: xxx
---------------------------------------
Original Content from N 226 for your reference
---------------------------------------
3. Catalog of typical constraints
This section lists some typical ways in which designers might want to
constrain topic maps. The constraints are grouped according to the types of
topic map objects. The catalog is intended to provide a means whereby
different proposals might be evaluated. It is not complete and suggestions
are invited for other constraints that might be useful.
3.1 By association type
permitted association role types and cardinalities
permitted classes of role playing topics
valid combinations of the above
valid scopes
Example 1.1: Constrain the topic "T" to be used for typing associations and
nothing else.
Example: The topic "born in" defines a class of associations.
Example 1.2: Constrain associations of type "T" to consist of N roles,
"R1", "R2", ... "Rn".
Example: Associations of type "born in" must have two roles, "person" and
"place".
Example 1.3: Constrain the role "R" in an association of a given type to be
played by exactly one topic belonging to the class "C".
Example: The roles "person" and "place" in an association of type "born in"
must each be played by exactly one topic belonging to the classes "person"
and "place", respectively.
Example 1.4: Constrain the role "R" in an association of a given type to be
played by one or more topics belonging to the class "C".
Example: The role "project" in an association of type "project membership"
must be played by a topic of type "project", and the role "project member"
must be played by one or more topics of type "employee".
Example 1.5: Constrain associations of type "T", such that
if role "R1" is played by a topic of type A1, then role "R2" must be played
by a topic of type "A2", "A2'", or "A2''";
if role "R1" is played by a topic of type B1, then role "R2" must be played
by a topic of type "B2", "B2'", or "B2''";
etc.
Example: Associations of type "located in" consist of two roles,
"container" and "containee" such that the "container" may be
a topic of type (or supertype) "country", in which case the "containee"
must be of type (or supertype) "state", "county", or "city";
a topic of type (or supertype) "state", in which case the "containee" must
be of type (or supertype) "county" or "city";
a topic of type (or supertype) "county", in which case the "containee" must
be of type (or supertype) "city";
a topic of type (or supertype) "city", in which case the "containee" must
be of type (or supertype) "theatre";
Example 1.6: Constrain associations of type "T" to be in the scope "S".
Example: Associations of type "born in" must be in the scope "biography".