@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix skos:    <http://www.w3.org/2004/02/skos/core#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix arch:    <https://meta.linked.archi/core#> .
@prefix am4:     <https://meta.linked.archi/archimate4/onto#> .
@prefix :        <https://meta.linked.archi/examples/nordfreight/> .

#################################################################
# Model Declaration
#################################################################

:NordFreightModel
    a                          arch:Model ;
    skos:prefLabel             "NordFreight Logistics — Architecture Model"@en ;
    arch:modelConformsToMetamodel <https://meta.linked.archi/archimate4/metamodel#ArchiMate4> ;
    dcterms:created            "2025-06-27"^^xsd:date ;
    dcterms:creator            "Kalin Maldzhanski"^^xsd:string ;
    dcterms:description        "ArchiMate 4.0 architecture model for NordFreight Logistics — a Scandinavian freight company modernising its tracking platform."@en ;
.


#################################################################
# Motivation
#################################################################

:EUCustomsCompliance
    a              am4:Requirement ;
    skos:prefLabel "EU Customs Compliance"@en ;
    skos:definition "All cross-border shipments must comply with EU customs electronic declarations by 2026."@en ;
.

:OperationalEfficiency
    a              am4:Goal ;
    skos:prefLabel "Operational Efficiency"@en ;
    skos:definition "Reduce average shipment processing time by 40% through automation and real-time tracking."@en ;
.

:CarbonNeutrality
    a              am4:Goal ;
    skos:prefLabel "Carbon Neutral Operations by 2030"@en ;
    skos:definition "Achieve net-zero carbon emissions across all transport modes by 2030."@en ;
.

:ShipperStakeholder
    a              am4:Stakeholder ;
    skos:prefLabel "Shipper"@en ;
    skos:definition "Commercial customer who contracts NordFreight to transport goods."@en ;
.

:ReceiverStakeholder
    a              am4:Stakeholder ;
    skos:prefLabel "Receiver"@en ;
    skos:definition "End recipient of shipped goods who needs delivery visibility."@en ;
.

:CloudFirstPrinciple
    a              am4:Principle ;
    skos:prefLabel "Cloud-First Principle"@en ;
    skos:definition "All new systems deployed on cloud infrastructure; on-premise only for regulatory exceptions."@en ;
.

:APIFirstPrinciple
    a              am4:Principle ;
    skos:prefLabel "API-First Design"@en ;
    skos:definition "All services expose well-documented APIs before building user interfaces."@en ;
.


#################################################################
# Strategy
#################################################################

:ShipmentTracking
    a              am4:Capability ;
    skos:prefLabel "Shipment Tracking"@en ;
    skos:definition "The ability to track shipment location and status in real-time across all transport modes."@en ;
.

:FreightBooking
    a              am4:Capability ;
    skos:prefLabel "Freight Booking"@en ;
    skos:definition "The ability to accept, validate, and confirm freight transport orders."@en ;
.

:CustomsClearance
    a              am4:Capability ;
    skos:prefLabel "Customs Clearance"@en ;
    skos:definition "The ability to prepare, submit, and manage customs declarations for cross-border shipments."@en ;
.

:RouteOptimisation
    a              am4:Capability ;
    skos:prefLabel "Route Optimisation"@en ;
    skos:definition "The ability to calculate optimal routes considering cost, time, emissions, and capacity."@en ;
.

:FleetManagement
    a              am4:Capability ;
    skos:prefLabel "Fleet Management"@en ;
    skos:definition "The ability to manage vehicles, vessels, and rolling stock across the transport network."@en ;
.


#################################################################
# Business (Common Domain behavior + Business Domain structure)
#################################################################

:BookingProcess
    a              am4:Process ;
    skos:prefLabel "Booking Process"@en ;
    skos:definition "End-to-end process from freight enquiry through quote, booking confirmation, to dispatch."@en ;
.

:TrackingService
    a              am4:Service ;
    skos:prefLabel "Shipment Tracking Service"@en ;
    skos:definition "Service providing real-time shipment location and ETA to shippers and receivers."@en ;
.

:CustomsDeclarationProcess
    a              am4:Process ;
    skos:prefLabel "Customs Declaration Process"@en ;
    skos:definition "Process of preparing and submitting electronic customs declarations for cross-border freight."@en ;
.

:FreightOperations
    a              am4:Role ;
    skos:prefLabel "Freight Operations"@en ;
    skos:definition "Operational role responsible for coordinating transport execution and exception handling."@en ;
.

:CustomsBroker
    a              am4:Role ;
    skos:prefLabel "Customs Broker"@en ;
    skos:definition "Specialist role managing customs documentation and regulatory compliance."@en ;
.

:Shipment
    a              am4:Object ;
    skos:prefLabel "Shipment"@en ;
    skos:definition "A consignment of goods being transported from origin to destination."@en ;
.

:WaybillDocument
    a              am4:Object ;
    skos:prefLabel "Waybill"@en ;
    skos:definition "Transport document containing shipment details, routing, and delivery instructions."@en ;
.

:BookingConfirmationEvent
    a              am4:Event ;
    skos:prefLabel "Booking Confirmed"@en ;
    skos:definition "Event triggered when a freight booking is validated and confirmed."@en ;
.

:ShipmentDeliveredEvent
    a              am4:Event ;
    skos:prefLabel "Shipment Delivered"@en ;
    skos:definition "Event triggered when goods are delivered to the receiver and proof of delivery captured."@en ;
.


#################################################################
# Application Architecture
#################################################################

:TMS
    a              am4:ApplicationComponent ;
    skos:prefLabel "Transport Management System"@en ;
    skos:definition "Core system managing freight orders, routing, carrier allocation, and execution monitoring."@en ;
.

:TrackingPortal
    a              am4:ApplicationComponent ;
    skos:prefLabel "Tracking Portal"@en ;
    skos:definition "Web application providing real-time shipment visibility to shippers and receivers."@en ;
.

:CustomsGateway
    a              am4:ApplicationComponent ;
    skos:prefLabel "Customs Gateway"@en ;
    skos:definition "Integration platform connecting to EU customs systems (ICS2, NCTS) for electronic declarations."@en ;
.

:RouteEngine
    a              am4:ApplicationComponent ;
    skos:prefLabel "Route Optimisation Engine"@en ;
    skos:definition "AI-powered system calculating optimal multi-modal routes considering cost, time, and emissions."@en ;
.

:ShipmentData
    a              am4:DataObject ;
    skos:prefLabel "Shipment Data"@en ;
    skos:definition "Structured data representing shipment lifecycle — booking, tracking events, delivery confirmation."@en ;
.

:CustomsData
    a              am4:DataObject ;
    skos:prefLabel "Customs Declaration Data"@en ;
    skos:definition "Structured data for customs declarations — HS codes, values, origins, certificates."@en ;
.

:TrackingAPI
    a              am4:ApplicationInterface ;
    skos:prefLabel "Tracking API"@en ;
    skos:definition "REST API exposing real-time shipment tracking events to external consumers."@en ;
.

:BookingAPI
    a              am4:ApplicationInterface ;
    skos:prefLabel "Booking API"@en ;
    skos:definition "REST API for programmatic freight booking by shipper systems."@en ;
.


#################################################################
# Technology Architecture
#################################################################

:AzureCloud
    a              am4:Node ;
    skos:prefLabel "Azure North Europe"@en ;
    skos:definition "Microsoft Azure North Europe region hosting NordFreight production workloads."@en ;
.

:K8sCluster
    a              am4:SystemSoftware ;
    skos:prefLabel "AKS Kubernetes Cluster"@en ;
    skos:definition "Azure Kubernetes Service cluster running containerised microservices."@en ;
.

:IoTGateway
    a              am4:Device ;
    skos:prefLabel "IoT Tracking Gateway"@en ;
    skos:definition "Edge device aggregating GPS, temperature, and shock sensor data from transport units."@en ;
.

:EventBus
    a              am4:SystemSoftware ;
    skos:prefLabel "Azure Event Hubs"@en ;
    skos:definition "Event streaming platform processing millions of tracking events per day."@en ;
.

:PostgresDB
    a              am4:SystemSoftware ;
    skos:prefLabel "Azure Database for PostgreSQL"@en ;
    skos:definition "Managed PostgreSQL database storing shipment and booking data."@en ;
.


#################################################################
# Implementation & Migration
#################################################################

:PlatformModernisation
    a              am4:WorkPackage ;
    skos:prefLabel "Platform Modernisation Programme"@en ;
    skos:definition "2-year programme migrating from monolithic TMS to cloud-native microservices architecture."@en ;
.

:CustomsIntegration
    a              am4:WorkPackage ;
    skos:prefLabel "EU Customs Integration Project"@en ;
    skos:definition "Project implementing ICS2 and NCTS5 electronic customs declaration interfaces."@en ;
.

:TargetArchitecture2027
    a              am4:Plateau ;
    skos:prefLabel "Target Architecture 2027"@en ;
    skos:definition "Fully cloud-native, API-first architecture with real-time tracking and automated customs."@en ;
.


#################################################################
# Relationships
#################################################################

## Assignment (active structure performs behavior)
:FreightOperations am4:assignedTo :BookingProcess .
:CustomsBroker am4:assignedTo :CustomsDeclarationProcess .

## Realization (capability realized by process/service)
:BookingProcess am4:realizes :FreightBooking .
:TrackingService am4:realizes :ShipmentTracking .
:CustomsDeclarationProcess am4:realizes :CustomsClearance .

## Serving (element serves another)
:TMS am4:serves :BookingProcess .
:TMS am4:serves :FreightOperations .
:TrackingPortal am4:serves :TrackingService .
:CustomsGateway am4:serves :CustomsDeclarationProcess .
:RouteEngine am4:serves :BookingProcess .
:TrackingAPI am4:serves :ShipperStakeholder .
:TrackingAPI am4:serves :ReceiverStakeholder .

## Access (behavior accesses passive structure)
:BookingProcess am4:accesses :Shipment .
:BookingProcess am4:accesses :WaybillDocument .
:CustomsDeclarationProcess am4:accesses :CustomsData .
:TMS am4:accesses :ShipmentData .

## Composition (element consists of)
:AzureCloud am4:composedOf :K8sCluster .
:AzureCloud am4:composedOf :EventBus .
:AzureCloud am4:composedOf :PostgresDB .

## Flow (transfer of content)
:TMS am4:flowsTo :CustomsGateway .
:IoTGateway am4:flowsTo :EventBus .
:EventBus am4:flowsTo :TMS .
:TMS am4:flowsTo :TrackingPortal .

## Triggering
:BookingConfirmationEvent am4:triggers :BookingProcess .
:BookingProcess am4:triggers :TrackingService .

## Influence (motivation)
:EUCustomsCompliance am4:influences :CustomsGateway .
:CloudFirstPrinciple am4:influences :AzureCloud .
:APIFirstPrinciple am4:influences :TrackingAPI .
:APIFirstPrinciple am4:influences :BookingAPI .

## Realization (physical realizes logical / work package realizes goal)
:K8sCluster am4:realizes :TMS .
:K8sCluster am4:realizes :TrackingPortal .
:K8sCluster am4:realizes :CustomsGateway .
:PlatformModernisation am4:realizes :OperationalEfficiency .
:CustomsIntegration am4:realizes :EUCustomsCompliance .

## Aggregation
:PlatformModernisation am4:aggregates :CustomsIntegration .


#################################################################
# Views
#################################################################

:NordFreightLayeredView
    a                            arch:View ;
    skos:prefLabel               "NordFreight Layered View"@en ;
    arch:viewConformsToViewpoint <https://meta.linked.archi/archimate4/viewpoints#LayeredViewpoint> ;
.

:NordFreightCapabilityView
    a                            arch:View ;
    skos:prefLabel               "NordFreight Capability Map"@en ;
    arch:viewConformsToViewpoint <https://meta.linked.archi/archimate4/viewpoints#CapabilityMapViewpoint> ;
.

:NordFreightApplicationCooperationView
    a                            arch:View ;
    skos:prefLabel               "NordFreight Application Cooperation"@en ;
    arch:viewConformsToViewpoint <https://meta.linked.archi/archimate4/viewpoints#ApplicationCooperationViewpoint> ;
.
