schema:
    metadata:
        name: plant-plain
        version: 1.1.0
    core_schema:
        vertex_config:
            vertices:
            -   name: Machine
                properties:
                -   name: machine_id
                    type: STRING
                -   name: label
                    type: STRING
                -   name: operating_temp
                    type: FLOAT
                    semantics:
                        unit: Cel
                identity:
                -   machine_id
                description: A machine on the plant floor.
                semantics:
                    iri: http://www.w3.org/ns/prov#Entity
                    exact_match:
                    -   http://www.w3.org/ns/prov#Entity
                    -   http://www.w3.org/ns/sosa/FeatureOfInterest
            -   name: ProductionLine
                properties:
                -   name: line_id
                    type: STRING
                -   name: label
                    type: STRING
                identity:
                -   line_id
                description: A line that turns out one product family.
                semantics:
                    iri: http://www.w3.org/ns/prov#Entity
                    synonyms:
                    -   Line
                    -   AssemblyLine
            -   name: MachineState
                properties:
                -   name: machine_id
                    type: STRING
                -   name: status
                    type: STRING
                -   name: valid_from
                    type: DATETIME
                    semantics:
                        iri: http://www.w3.org/ns/prov#generatedAtTime
                -   name: valid_to
                    type: DATETIME
                    semantics:
                        iri: http://www.w3.org/ns/prov#invalidatedAtTime
                -   name: id
                identity:
                -   id
                description: Mutable facts about `Machine`, each holding over one interval. Closing `valid_to` rather than overwriting is what makes history queryable.
                semantics:
                    iri: http://www.w3.org/ns/prov#Entity
                    exact_match:
                    -   http://www.w3.org/ns/prov#Entity
                    -   http://www.w3.org/2006/time#ProperInterval
                hash_identity_properties:
                -   machine_id
                -   valid_from
            -   name: ProductionLineState
                properties:
                -   name: line_id
                    type: STRING
                -   name: operating_mode
                    type: STRING
                -   name: valid_from
                    type: DATETIME
                    semantics:
                        iri: http://www.w3.org/ns/prov#generatedAtTime
                -   name: valid_to
                    type: DATETIME
                    semantics:
                        iri: http://www.w3.org/ns/prov#invalidatedAtTime
                -   name: id
                identity:
                -   id
                description: Mutable facts about `ProductionLine`, each holding over one interval. Closing `valid_to` rather than overwriting is what makes history queryable.
                semantics:
                    iri: http://www.w3.org/ns/prov#Entity
                    exact_match:
                    -   http://www.w3.org/ns/prov#Entity
                    -   http://www.w3.org/2006/time#ProperInterval
                hash_identity_properties:
                -   line_id
                -   valid_from
            -   name: MachineObservation
                properties:
                -   name: machine_id
                    type: STRING
                -   name: observed_property
                    type: STRING
                    semantics:
                        exact_match:
                        -   http://www.w3.org/ns/sosa/observedProperty
                        -   http://www.w3.org/ns/ssn/Property
                -   name: result_value
                    type: FLOAT
                    semantics:
                        exact_match:
                        -   http://www.w3.org/ns/sosa/hasSimpleResult
                -   name: result_unit
                    type: STRING
                    semantics:
                        iri: http://qudt.org/schema/qudt/ucumCode
                -   name: result_time
                    type: DATETIME
                    semantics:
                        iri: http://www.w3.org/ns/sosa/resultTime
                -   name: id
                identity:
                -   id
                description: A measurement of `Machine` at a time.
                semantics:
                    iri: http://www.w3.org/ns/sosa/Observation
                    exact_match:
                    -   http://www.w3.org/ns/sosa/Observation
                hash_identity_properties:
                -   machine_id
                -   observed_property
                -   result_time
            -   name: Evidence
                properties:
                -   name: evidence_id
                    type: STRING
                -   name: source_uri
                    type: STRING
                -   name: media_type
                    type: STRING
                -   name: retrieved_at
                    type: DATETIME
                    semantics:
                        iri: http://www.w3.org/ns/prov#generatedAtTime
                identity:
                -   evidence_id
                description: 'What a fact was read from: a document, an API response, a table row.'
                semantics:
                    iri: http://www.w3.org/ns/prov#Entity
                    exact_match:
                    -   http://www.w3.org/ns/prov#Entity
            -   name: Agent
                properties:
                -   name: agent_id
                    type: STRING
                -   name: label
                    type: STRING
                -   name: agent_kind
                    type: STRING
                identity:
                -   agent_id
                description: Who or what acted or measured.
                semantics:
                    iri: http://www.w3.org/ns/prov#Agent
                    exact_match:
                    -   http://www.w3.org/ns/prov#Agent
                    -   http://www.w3.org/ns/sosa/Sensor
        edge_config:
            edges:
            -   source: Machine
                target: ProductionLine
                relation: installed_on
                semantics:
                    iri: http://www.w3.org/ns/prov#wasInfluencedBy
                directed: true
            -   source: Machine
                target: Machine
                relation: feeds
                semantics:
                    iri: http://www.w3.org/ns/prov#wasInfluencedBy
                directed: true
            -   source: MachineState
                target: Machine
                relation: specializationOf
                description: The Machine this state is a state of.
                semantics:
                    iri: http://www.w3.org/ns/prov#specializationOf
                    exact_match:
                    -   http://www.w3.org/ns/prov#specializationOf
                directed: true
            -   source: ProductionLineState
                target: ProductionLine
                relation: specializationOf
                description: The ProductionLine this state is a state of.
                semantics:
                    iri: http://www.w3.org/ns/prov#specializationOf
                    exact_match:
                    -   http://www.w3.org/ns/prov#specializationOf
                directed: true
            -   source: MachineObservation
                target: Machine
                relation: hasFeatureOfInterest
                description: The Machine this observation measured.
                semantics:
                    iri: http://www.w3.org/ns/sosa/hasFeatureOfInterest
                    exact_match:
                    -   http://www.w3.org/ns/sosa/hasFeatureOfInterest
                directed: true
            -   source: MachineState
                target: Evidence
                relation: wasDerivedFrom
                description: What this fact was read from.
                semantics:
                    iri: http://www.w3.org/ns/prov#wasDerivedFrom
                    exact_match:
                    -   http://www.w3.org/ns/prov#wasDerivedFrom
                directed: true
            -   source: ProductionLineState
                target: Evidence
                relation: wasDerivedFrom
                description: What this fact was read from.
                semantics:
                    iri: http://www.w3.org/ns/prov#wasDerivedFrom
                    exact_match:
                    -   http://www.w3.org/ns/prov#wasDerivedFrom
                directed: true
            -   source: MachineObservation
                target: Evidence
                relation: wasDerivedFrom
                description: What this fact was read from.
                semantics:
                    iri: http://www.w3.org/ns/prov#wasDerivedFrom
                    exact_match:
                    -   http://www.w3.org/ns/prov#wasDerivedFrom
                directed: true
            -   source: Evidence
                target: Agent
                relation: wasAttributedTo
                description: Who or what produced this evidence.
                semantics:
                    iri: http://www.w3.org/ns/prov#wasAttributedTo
                    exact_match:
                    -   http://www.w3.org/ns/prov#wasAttributedTo
                directed: true
metadata:
    name: plant-plain
    description: An ungrounded starting point, before the lift.
