Class: Edoxen::Topic

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/edoxen/topic.rb,
sig/edoxen.rbs

Overview

Topic — the subject of discussion at a Meeting. A Topic can have documents (text), assets (non-text), references (external pointers), and is the anchor for Motions and Decisions.

Cross-meeting threading via resumption_of (URN to a prior Topic in a prior Meeting) — pattern from HK LegCo OData schema.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#assetsArray[TopicAsset]? (readonly)

Returns the value of attribute assets.

Returns:



281
282
283
# File 'sig/edoxen.rbs', line 281

def assets
  @assets
end

#decisionsArray[String]? (readonly)

Returns the value of attribute decisions.

Returns:

  • (Array[String], nil)


284
285
286
# File 'sig/edoxen.rbs', line 284

def decisions
  @decisions
end

#descriptionString? (readonly)

Returns the value of attribute description.

Returns:

  • (String, nil)


277
278
279
# File 'sig/edoxen.rbs', line 277

def description
  @description
end

#documentsArray[TopicDocument]? (readonly)

Returns the value of attribute documents.

Returns:



280
281
282
# File 'sig/edoxen.rbs', line 280

def documents
  @documents
end

#identifierString? (readonly)

Returns the value of attribute identifier.

Returns:

  • (String, nil)


274
275
276
# File 'sig/edoxen.rbs', line 274

def identifier
  @identifier
end

#motionsArray[String]? (readonly)

Returns the value of attribute motions.

Returns:

  • (Array[String], nil)


283
284
285
# File 'sig/edoxen.rbs', line 283

def motions
  @motions
end

#referencesArray[Reference]? (readonly)

Returns the value of attribute references.

Returns:



282
283
284
# File 'sig/edoxen.rbs', line 282

def references
  @references
end

#resumption_ofString? (readonly)

Returns the value of attribute resumption_of.

Returns:

  • (String, nil)


279
280
281
# File 'sig/edoxen.rbs', line 279

def resumption_of
  @resumption_of
end

#statusString? (readonly)

Returns the value of attribute status.

Returns:

  • (String, nil)


278
279
280
# File 'sig/edoxen.rbs', line 278

def status
  @status
end

#titleString? (readonly)

Returns the value of attribute title.

Returns:

  • (String, nil)


276
277
278
# File 'sig/edoxen.rbs', line 276

def title
  @title
end

#urnString? (readonly)

Returns the value of attribute urn.

Returns:

  • (String, nil)


275
276
277
# File 'sig/edoxen.rbs', line 275

def urn
  @urn
end

Instance Method Details

#decisions_in(collection:) ⇒ Object

--- v2.1 derivation accessor (TODO.refactor/45) -------------------- Returns the Decisions in collection whose about_topics includes this Topic's URN.

Storage side: Decision.aboutTopics (SSOT for the relationship). The stored decisions[] field remains on the wire for back-compat through v2.x; v3.0 removes it and this becomes the only path.



31
32
33
34
35
# File 'lib/edoxen/topic.rb', line 31

def decisions_in(collection:)
  return [] unless collection && urn

  collection.decisions.select { |decision| decision.about_topics&.include?(urn) }
end