Class: Glossarist::V3::PartitiveRelation
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Glossarist::V3::PartitiveRelation
- Defined in:
- lib/glossarist/v3/partitive_relation.rb
Overview
PartitiveRelation — an ISO 704 / ISO 1087-1 / ISO 12620 partitive relation connecting a comprehensive concept (superordinate concept partitive) to two or more partitive concepts (subordinate concepts partitive) which fitted together constitute the comprehensive.
Shown as a rake or bracket in source diagrams. All partitives within one relation are coordinate concepts: they share the comprehensive AND share the criterion of subdivision.
Per-partitive metadata (ISO 704:2022):
- multiplicity (compulsory, optional, compulsory_multiple,
optional_multiple, at_least_one) — encodes the diagram
line notation as data
- is_delimiting — orthogonal flag; a delimiting part behaves
like a delimiting characteristic (distinguishes the
comprehensive from coordinate concepts)
Replaces the prior PartitiveHyperedge class. The "hyperedge" framing was graph-theoretic; ISO calls this a relation.
Constant Summary collapse
- DEFAULT_COMPLETENESS =
"complete"
Instance Method Summary collapse
- #complete? ⇒ Boolean
-
#coordinate? ⇒ Boolean
ISO 704: a partitive relation connects to two or more partitives.
- #partial? ⇒ Boolean
- #validate! ⇒ Object
Instance Method Details
#complete? ⇒ Boolean
50 51 52 |
# File 'lib/glossarist/v3/partitive_relation.rb', line 50 def complete? completeness == "complete" end |
#coordinate? ⇒ Boolean
ISO 704: a partitive relation connects to two or more partitives. A single binary has_part edge is not a PartitiveRelation.
61 62 63 |
# File 'lib/glossarist/v3/partitive_relation.rb', line 61 def coordinate? partitives.length >= 2 end |
#partial? ⇒ Boolean
54 55 56 |
# File 'lib/glossarist/v3/partitive_relation.rb', line 54 def partial? completeness == "partial" end |
#validate! ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/glossarist/v3/partitive_relation.rb', line 42 def validate! validate_comprehensive! validate_partitives! validate_self_loop! validate_completeness! self end |