Package com.io7m.cardant.model

# Interface CAInventoryObjectType<S>

Type Parameters:
  `S` - The type of object summaries

All Known Implementing Classes:
  `CAItem`, `CALocation`

public sealed interface CAInventoryObjectType<S> permits CAItem, CALocation
The type of major inventory objects.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SortedMap<CAAttachmentKey,CAAttachment>`
  `attachments()`
  `default Stream<CAAttachment>`
  `attachmentsWithRelation(String relation)`
  Get the set of attachments on this object with the given relation.
  `default Optional<CAAttachment>`
  `firstAttachmentWithRelation(String relation)`
  Get the first attachment on this object with the given relation.
  `default boolean`
  `hasAttachmentWithRelation(String relation)`
  Check if this object has an attachment with the given relation.
  `SortedMap<com.io7m.lanark.core.RDottedName,CAMetadataType>`
  `metadata()`
  `S`
  `summary()`
  `SortedSet<com.io7m.lanark.core.RDottedName>`
  `types()`

- ## Method Details

  - ### summary

    S summary()
    Returns:
      A summary of the object

  - ### attachmentsWithRelation

    default Stream<CAAttachment> attachmentsWithRelation(String relation)
    Get the set of attachments on this object with the given relation.
    Parameters:
      `relation` - The relation
    Returns:
      The attachments

  - ### firstAttachmentWithRelation

    default Optional<CAAttachment> firstAttachmentWithRelation(String relation)
    Get the first attachment on this object with the given relation.
    Parameters:
      `relation` - The relation
    Returns:
      The attachment

  - ### hasAttachmentWithRelation

    default boolean hasAttachmentWithRelation(String relation)
    Check if this object has an attachment with the given relation.
    Parameters:
      `relation` - The relation
    Returns:
      `true` if this object has an attachment with the given relation

  - ### metadata

    SortedMap<com.io7m.lanark.core.RDottedName,CAMetadataType> metadata()
    Returns:
      The metadata on this object

  - ### attachments

    SortedMap<CAAttachmentKey,CAAttachment> attachments()
    Returns:
      The attachments on this object

  - ### types

    SortedSet<com.io7m.lanark.core.RDottedName> types()
    Returns:
      The types assigned to this object