Skip to content

Class: FoodItem

Food donation item. COICOP Division 01 (food and non-alcoholic beverages). Grounded in FoodOn (OBO Foundry food ontology):

http://purl.obolibrary.org/obo/foodon.owl

Phase 1 stub — fully declared to establish the schema; the sort_food process path is activated when food-bank organisations are onboarded.

Assessment: packaging_intact + expiry_date (defined in FoodCategory). No condition_grade or assessment_result — food safety is binary: packaging intact or not, expired or not. FoodCategory does not extend CategoryMixin for this reason.

URI: foodon:00001006

 classDiagram
    class FoodItem
    click FoodItem href "../FoodItem/"
      FoodCategory <|-- FoodItem
        click FoodCategory href "../FoodCategory/"
      DonationItem <|-- FoodItem
        click DonationItem href "../DonationItem/"

      FoodItem : attribute_completeness





        FoodItem --> "0..1" AttributeCompletenessEnum : attribute_completeness
        click AttributeCompletenessEnum href "../AttributeCompletenessEnum/"



      FoodItem : category

      FoodItem : created_at

      FoodItem : donation_source





        FoodItem --> "0..1" DonationSource : donation_source
        click DonationSource href "../DonationSource/"



      FoodItem : expiry_date

      FoodItem : food_type





        FoodItem --> "1" FoodTypeEnum : food_type
        click FoodTypeEnum href "../FoodTypeEnum/"



      FoodItem : id

      FoodItem : lifecycle_state





        FoodItem --> "1" ItemLifecycleStateEnum : lifecycle_state
        click ItemLifecycleStateEnum href "../ItemLifecycleStateEnum/"



      FoodItem : packaging_intact

      FoodItem : quantity

      FoodItem : sorting_notes

      FoodItem : source_collection





        FoodItem --> "0..1" DonationCollection : source_collection
        click DonationCollection href "../DonationCollection/"



      FoodItem : storage_requirement





        FoodItem --> "1" StorageRequirementEnum : storage_requirement
        click StorageRequirementEnum href "../StorageRequirementEnum/"



      FoodItem : storage_unit





        FoodItem --> "0..1" StorageLocation : storage_unit
        click StorageLocation href "../StorageLocation/"



      FoodItem : updated_at

      FoodItem : usage





        FoodItem --> "1" ItemUsageEnum : usage
        click ItemUsageEnum href "../ItemUsageEnum/"



Inheritance

Class Properties

Property Value
Class URI foodon:00001006

Slots

Name Cardinality and Range Description Inheritance
food_type 1
FoodTypeEnum
Primary food type classification FoodCategory
expiry_date 0..1
Date
Expiry or best-before date as printed on the packaging FoodCategory
packaging_intact 1
Boolean
Whether the item's original packaging is intact and uncompromised FoodCategory
storage_requirement 1
StorageRequirementEnum
Required storage condition FoodCategory
quantity 0..1
Integer
Quantity in natural units (items, cans, bags, kg, etc FoodCategory
id 1
Uriorcurie
A unique identifier for the entity DonationItem
usage 1
ItemUsageEnum
Provenance condition — was the item ever used before donation? Orthogonal to ... DonationItem
category 1
String
Type-defining slot on DonationItem DonationItem
lifecycle_state 1
ItemLifecycleStateEnum
Current lifecycle state of the entity DonationItem
attribute_completeness 0..1
AttributeCompletenessEnum
Data quality tier set by the fragment engine on sorting completion DonationItem
source_collection 0..1
DonationCollection
FK — the DonationCollection (arrival type) this item was registered from DonationItem
donation_source 0..1
DonationSource
Reference to the DonationSource — privacy boundary between item records and d... DonationItem
storage_unit 0..1
StorageLocation
FK — set when lifecycle_state transitions to stored DonationItem
sorting_notes 0..1
String
Free-text notes recorded by the sorter during sorting DonationItem
created_at 1
Datetime
Timestamp when the entity was created DonationItem
updated_at 1
Datetime
Timestamp when the entity record was last modified DonationItem

Rules

lc-sorted-food-storage-required

Rule Applied Preconditions Postconditions Elseconditions
slot_conditions {'lifecycle_state': {'equals_string': 'sorted'}} {'storage_requirement': {'required': True}}

See Also

Identifier and Mapping Information

Annotations

property value
label_en Food
label_de Essen

Schema Source

  • from schema: https://inkind-at.github.io/inkind-knowledge-repo

Mappings

Mapping Type Mapped Value
self foodon:00001006
native inkind_knowledge_repo:FoodItem

LinkML Source

Direct

name: FoodItem
annotations:
  label_en:
    tag: label_en
    value: Food
  label_de:
    tag: label_de
    value: Essen
description: "Food donation item. COICOP Division 01 (food and non-alcoholic beverages).\
  \ Grounded in FoodOn (OBO Foundry food ontology):\n  http://purl.obolibrary.org/obo/foodon.owl\n\
  \nPhase 1 stub  fully declared to establish the schema; the sort_food process path\
  \ is activated when food-bank organisations are onboarded.\nAssessment: packaging_intact\
  \ + expiry_date (defined in FoodCategory). No condition_grade or assessment_result\
  \ — food safety is binary: packaging intact or not, expired or not. FoodCategory\
  \ does not extend CategoryMixin for this reason."
from_schema: https://inkind-at.github.io/inkind-knowledge-repo
see_also:
- foodon:00001006
- http://purl.obolibrary.org/obo/foodon.owl
is_a: DonationItem
mixins:
- FoodCategory
class_uri: foodon:00001006
rules:
- preconditions:
    slot_conditions:
      lifecycle_state:
        name: lifecycle_state
        equals_string: sorted
  postconditions:
    slot_conditions:
      storage_requirement:
        name: storage_requirement
        required: true
  description: storage_requirement required at sorted state.
  title: lc-sorted-food-storage-required

Induced

name: FoodItem
annotations:
  label_en:
    tag: label_en
    value: Food
  label_de:
    tag: label_de
    value: Essen
description: "Food donation item. COICOP Division 01 (food and non-alcoholic beverages).\
  \ Grounded in FoodOn (OBO Foundry food ontology):\n  http://purl.obolibrary.org/obo/foodon.owl\n\
  \nPhase 1 stub  fully declared to establish the schema; the sort_food process path\
  \ is activated when food-bank organisations are onboarded.\nAssessment: packaging_intact\
  \ + expiry_date (defined in FoodCategory). No condition_grade or assessment_result\
  \ — food safety is binary: packaging intact or not, expired or not. FoodCategory\
  \ does not extend CategoryMixin for this reason."
from_schema: https://inkind-at.github.io/inkind-knowledge-repo
see_also:
- foodon:00001006
- http://purl.obolibrary.org/obo/foodon.owl
is_a: DonationItem
mixins:
- FoodCategory
attributes:
  food_type:
    name: food_type
    description: Primary food type classification. Grounded in FoodOn food product
      taxonomy. Determines valid storage_requirement values via value map.
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    see_also:
    - foodon:00001017
    rank: 1000
    alias: food_type
    owner: FoodItem
    domain_of:
    - FoodCategory
    range: FoodTypeEnum
    required: true
  expiry_date:
    name: expiry_date
    annotations:
      uc_action:
        tag: uc_action
        value: block
      uc_suggest:
        tag: uc_suggest
        value: disposal
      uc_note:
        tag: uc_note
        value: Dynamic date comparison — runtime enforcement
    description: 'Expiry or best-before date as printed on the packaging. UC block:
      expiry_date < today (runtime check by Django model clean()).'
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    see_also:
    - foodon:00001043
    rank: 1000
    alias: expiry_date
    owner: FoodItem
    domain_of:
    - PersonalCareCategory
    - BabyInfantCategory
    - FoodCategory
    range: date
  packaging_intact:
    name: packaging_intact
    description: 'Whether the item''s original packaging is intact and uncompromised.
      UC block: false + perishable food_type  must not redistribute. Primary safety
      signal for food items  analogous to is_sealed in PersonalCareCategory.'
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    see_also:
    - foodon:00001043
    rank: 1000
    alias: packaging_intact
    owner: FoodItem
    domain_of:
    - FoodCategory
    range: boolean
    required: true
  storage_requirement:
    name: storage_requirement
    description: Required storage condition. Valid values constrained by food_type
      via vm-storage-* rules. Set during sorting to enable correct storage slot assignment
      and demand signal matching.
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    rank: 1000
    alias: storage_requirement
    owner: FoodItem
    domain_of:
    - FoodCategory
    range: StorageRequirementEnum
    required: true
  quantity:
    name: quantity
    description: Quantity in natural units (items, cans, bags, kg, etc.). Optional
      — detailed completeness tier. Supports demand signal fulfilment tracking.
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    rank: 1000
    alias: quantity
    owner: FoodItem
    domain_of:
    - FoodCategory
    range: integer
  id:
    name: id
    description: A unique identifier for the entity.
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    rank: 1000
    slot_uri: schema:identifier
    identifier: true
    alias: id
    owner: FoodItem
    domain_of:
    - NamedThing
    - SocialOrganisation
    - Actor
    - StorageLocation
    - DonationSource
    - DonationCollection
    - DonationItem
    - DemandSignal
    - Campaign
    - ProvenanceRecord
    range: uriorcurie
    required: true
  usage:
    name: usage
    annotations:
      label_en:
        tag: label_en
        value: Provenance
      label_de:
        tag: label_de
        value: Provenance
    description: Provenance condition — was the item ever used before donation? Orthogonal
      to condition_grade and assessment_result. Maps to schema:NewCondition / schema:UsedCondition.
      usage = new does NOT imply no defects — manufacturing defects are possible and
      assessment must always be performed regardless of usage.
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    see_also:
    - schema:OfferItemCondition
    - schema:NewCondition
    - schema:UsedCondition
    rank: 1000
    slot_uri: schema:itemCondition
    alias: usage
    owner: FoodItem
    domain_of:
    - DonationItem
    range: ItemUsageEnum
    required: true
  category:
    name: category
    annotations:
      label_en:
        tag: label_en
        value: Item Type
      label_de:
        tag: label_de
        value: Artikeltyp
    description: Type-defining slot on DonationItem. Value is the class URI of the
      concrete subclass (e.g. inkind_knowledge_repo:ClothingItem). linkml-validate,
      gen-json-schema, and gen-pydantic all use this slot to dispatch to the correct
      subclass schema and valid slot set. For other entities (DemandSignal, StorageLocation)
      the range is overridden via slot_usage to CategoryEnum.
    notes:
    - Due to a limitation in LinkML, the designates_type annotation was removed because
      the range is an Enum and not a string.
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    rank: 1000
    slot_uri: schema:additionalType
    designates_type: true
    alias: category
    owner: FoodItem
    domain_of:
    - DonationItem
    - DemandSignal
    range: string
    required: true
  lifecycle_state:
    name: lifecycle_state
    description: Current lifecycle state of the entity. Concrete enum range applied
      via slot_usage. Transitions enforced by Django model clean().
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    rank: 1000
    alias: lifecycle_state
    owner: FoodItem
    domain_of:
    - DonationSource
    - DonationCollection
    - DonationItem
    - DemandSignal
    - Campaign
    range: ItemLifecycleStateEnum
    required: true
  attribute_completeness:
    name: attribute_completeness
    description: 'Data quality tier set by the fragment engine on sorting completion.
      Not derived from field presence. Not a lifecycle gate. Used by the match engine
      to filter candidates by data quality tier. See AttributeCompletenessEnum for
      the relationship to lifecycle_state. Set by: fragment_engine. Read by: match_engine.'
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    rank: 1000
    alias: attribute_completeness
    owner: FoodItem
    domain_of:
    - DonationItem
    range: AttributeCompletenessEnum
    required: false
  source_collection:
    name: source_collection
    description: FK — the DonationCollection (arrival type) this item was registered
      from. Null for items not arriving as part of a collection.
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    rank: 1000
    alias: source_collection
    owner: FoodItem
    domain_of:
    - DonationItem
    range: DonationCollection
    required: false
  donation_source:
    name: donation_source
    description: Reference to the DonationSource — privacy boundary between item records
      and donor identity. Concrete range applied via slot_usage.
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    rank: 1000
    slot_uri: inkind_knowledge_repo:donation_source
    alias: donation_source
    owner: FoodItem
    domain_of:
    - DonationCollection
    - DonationItem
    range: DonationSource
    required: false
  storage_unit:
    name: storage_unit
    description: FK — set when lifecycle_state transitions to stored. Null until the
      item reaches stored state.
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    rank: 1000
    alias: storage_unit
    owner: FoodItem
    domain_of:
    - DonationItem
    range: StorageLocation
    required: false
  sorting_notes:
    name: sorting_notes
    annotations:
      label_en:
        tag: label_en
        value: Notes
      label_de:
        tag: label_de
        value: Notizen
    description: Free-text notes recorded by the sorter during sorting. Required by
      UC warn rules to capture explicit sorter confirmation (e.g. incomplete pair,
      body-contact item, inconclusive assessment).
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    rank: 1000
    alias: sorting_notes
    owner: FoodItem
    domain_of:
    - DonationItem
    range: string
  created_at:
    name: created_at
    description: Timestamp when the entity was created.
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    rank: 1000
    alias: created_at
    owner: FoodItem
    domain_of:
    - DonationSource
    - DonationCollection
    - DonationItem
    range: datetime
    required: true
  updated_at:
    name: updated_at
    description: Timestamp when the entity record was last modified.
    from_schema: https://inkind-at.github.io/inkind-knowledge-repo
    rank: 1000
    alias: updated_at
    owner: FoodItem
    domain_of:
    - DonationItem
    range: datetime
    required: true
class_uri: foodon:00001006
rules:
- preconditions:
    slot_conditions:
      lifecycle_state:
        name: lifecycle_state
        equals_string: sorted
  postconditions:
    slot_conditions:
      storage_requirement:
        name: storage_requirement
        required: true
  description: storage_requirement required at sorted state.
  title: lc-sorted-food-storage-required