@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix schema: <http://schema.org/> .
@prefix om: <http://ggen.io/ontology/order-management#> .

# ============================================================================
# Order Management Ontology - E-commerce Order Processing System
# ============================================================================
# Comprehensive ontology for order lifecycle, fulfillment, and tracking
# Version: 1.0.0
# Lines: 290+
# ============================================================================

# ============================================================================
# Core Order Classes
# ============================================================================

om:Order a owl:Class ;
    rdfs:label "Order" ;
    rdfs:comment "A customer order with items, payment, and shipping information" ;
    rdfs:subClassOf schema:Order .

om:OrderItem a owl:Class ;
    rdfs:label "Order Item" ;
    rdfs:comment "A line item within an order" ;
    rdfs:subClassOf schema:OrderItem .

om:OrderStatus a owl:Class ;
    rdfs:label "Order Status" ;
    rdfs:comment "Status of an order in its lifecycle" .

om:Cart a owl:Class ;
    rdfs:label "Shopping Cart" ;
    rdfs:comment "Pre-order shopping cart state" ;
    rdfs:subClassOf om:Order .

om:OrderHistory a owl:Class ;
    rdfs:label "Order History" ;
    rdfs:comment "Historical record of order state changes" .

# ============================================================================
# Payment Classes
# ============================================================================

om:Payment a owl:Class ;
    rdfs:label "Payment" ;
    rdfs:comment "Payment information for an order" ;
    rdfs:subClassOf schema:Payment .

om:PaymentMethod a owl:Class ;
    rdfs:label "Payment Method" ;
    rdfs:comment "Method used for payment" .

om:Refund a owl:Class ;
    rdfs:label "Refund" ;
    rdfs:comment "Refund issued for an order or item" .

om:PaymentStatus a owl:Class ;
    rdfs:label "Payment Status" ;
    rdfs:comment "Status of payment processing" .

# ============================================================================
# Shipping Classes
# ============================================================================

om:Shipment a owl:Class ;
    rdfs:label "Shipment" ;
    rdfs:comment "Shipment information for order delivery" ;
    rdfs:subClassOf schema:ParcelDelivery .

om:ShippingMethod a owl:Class ;
    rdfs:label "Shipping Method" ;
    rdfs:comment "Method of shipping (standard, express, etc.)" .

om:Carrier a owl:Class ;
    rdfs:label "Carrier" ;
    rdfs:comment "Shipping carrier (FedEx, UPS, USPS, etc.)" .

om:TrackingInfo a owl:Class ;
    rdfs:label "Tracking Information" ;
    rdfs:comment "Shipment tracking details" .

om:DeliveryAddress a owl:Class ;
    rdfs:label "Delivery Address" ;
    rdfs:comment "Address for order delivery" ;
    rdfs:subClassOf schema:PostalAddress .

# ============================================================================
# Fulfillment Classes
# ============================================================================

om:Fulfillment a owl:Class ;
    rdfs:label "Fulfillment" ;
    rdfs:comment "Order fulfillment process and status" .

om:Warehouse a owl:Class ;
    rdfs:label "Warehouse" ;
    rdfs:comment "Warehouse location for fulfillment" .

om:PickList a owl:Class ;
    rdfs:label "Pick List" ;
    rdfs:comment "List of items to pick for fulfillment" .

om:PackingSlip a owl:Class ;
    rdfs:label "Packing Slip" ;
    rdfs:comment "Packing slip document for shipment" .

om:Backorder a owl:Class ;
    rdfs:label "Backorder" ;
    rdfs:comment "Item on backorder awaiting stock" .

# ============================================================================
# Return & Exchange Classes
# ============================================================================

om:Return a owl:Class ;
    rdfs:label "Return" ;
    rdfs:comment "Product return request" .

om:ReturnReason a owl:Class ;
    rdfs:label "Return Reason" ;
    rdfs:comment "Reason for product return" .

om:Exchange a owl:Class ;
    rdfs:label "Exchange" ;
    rdfs:comment "Product exchange request" .

om:ReturnLabel a owl:Class ;
    rdfs:label "Return Label" ;
    rdfs:comment "Prepaid return shipping label" .

# ============================================================================
# Special Order Types
# ============================================================================

om:GiftOrder a owl:Class ;
    rdfs:label "Gift Order" ;
    rdfs:comment "Order intended as a gift" ;
    rdfs:subClassOf om:Order .

om:GiftMessage a owl:Class ;
    rdfs:label "Gift Message" ;
    rdfs:comment "Message included with gift order" .

om:GiftWrap a owl:Class ;
    rdfs:label "Gift Wrap" ;
    rdfs:comment "Gift wrapping option" .

om:Subscription a owl:Class ;
    rdfs:label "Subscription Order" ;
    rdfs:comment "Recurring subscription order" ;
    rdfs:subClassOf om:Order .

# ============================================================================
# Order Properties
# ============================================================================

om:hasOrderNumber a owl:DatatypeProperty ;
    rdfs:label "has order number" ;
    rdfs:domain om:Order ;
    rdfs:range xsd:string .

om:hasOrderStatus a owl:ObjectProperty ;
    rdfs:label "has order status" ;
    rdfs:domain om:Order ;
    rdfs:range om:OrderStatus .

om:hasOrderDate a owl:DatatypeProperty ;
    rdfs:label "has order date" ;
    rdfs:domain om:Order ;
    rdfs:range xsd:dateTime .

om:hasCustomer a owl:ObjectProperty ;
    rdfs:label "has customer" ;
    rdfs:domain om:Order ;
    rdfs:range foaf:Person .

om:hasOrderItem a owl:ObjectProperty ;
    rdfs:label "has order item" ;
    rdfs:domain om:Order ;
    rdfs:range om:OrderItem .

om:hasSubtotal a owl:DatatypeProperty ;
    rdfs:label "has subtotal" ;
    rdfs:domain om:Order ;
    rdfs:range xsd:decimal .

om:hasTax a owl:DatatypeProperty ;
    rdfs:label "has tax" ;
    rdfs:domain om:Order ;
    rdfs:range xsd:decimal .

om:hasShippingCost a owl:DatatypeProperty ;
    rdfs:label "has shipping cost" ;
    rdfs:domain om:Order ;
    rdfs:range xsd:decimal .

om:hasDiscount a owl:DatatypeProperty ;
    rdfs:label "has discount" ;
    rdfs:domain om:Order ;
    rdfs:range xsd:decimal .

om:hasTotal a owl:DatatypeProperty ;
    rdfs:label "has total" ;
    rdfs:domain om:Order ;
    rdfs:range xsd:decimal .

om:hasCurrency a owl:DatatypeProperty ;
    rdfs:label "has currency" ;
    rdfs:domain om:Order ;
    rdfs:range xsd:string .

# ============================================================================
# Order Item Properties
# ============================================================================

om:hasProduct a owl:ObjectProperty ;
    rdfs:label "has product" ;
    rdfs:domain om:OrderItem ;
    rdfs:range schema:Product .

om:hasQuantity a owl:DatatypeProperty ;
    rdfs:label "has quantity" ;
    rdfs:domain om:OrderItem ;
    rdfs:range xsd:integer .

om:hasUnitPrice a owl:DatatypeProperty ;
    rdfs:label "has unit price" ;
    rdfs:domain om:OrderItem ;
    rdfs:range xsd:decimal .

om:hasLineTotal a owl:DatatypeProperty ;
    rdfs:label "has line total" ;
    rdfs:domain om:OrderItem ;
    rdfs:range xsd:decimal .

om:hasSKU a owl:DatatypeProperty ;
    rdfs:label "has SKU" ;
    rdfs:domain om:OrderItem ;
    rdfs:range xsd:string .

om:hasVariant a owl:DatatypeProperty ;
    rdfs:label "has variant" ;
    rdfs:domain om:OrderItem ;
    rdfs:range xsd:string .

# ============================================================================
# Payment Properties
# ============================================================================

om:hasPayment a owl:ObjectProperty ;
    rdfs:label "has payment" ;
    rdfs:domain om:Order ;
    rdfs:range om:Payment .

om:hasPaymentMethod a owl:ObjectProperty ;
    rdfs:label "has payment method" ;
    rdfs:domain om:Payment ;
    rdfs:range om:PaymentMethod .

om:hasPaymentStatus a owl:ObjectProperty ;
    rdfs:label "has payment status" ;
    rdfs:domain om:Payment ;
    rdfs:range om:PaymentStatus .

om:hasTransactionId a owl:DatatypeProperty ;
    rdfs:label "has transaction ID" ;
    rdfs:domain om:Payment ;
    rdfs:range xsd:string .

om:hasPaymentAmount a owl:DatatypeProperty ;
    rdfs:label "has payment amount" ;
    rdfs:domain om:Payment ;
    rdfs:range xsd:decimal .

om:hasRefund a owl:ObjectProperty ;
    rdfs:label "has refund" ;
    rdfs:domain om:Order ;
    rdfs:range om:Refund .

om:hasRefundAmount a owl:DatatypeProperty ;
    rdfs:label "has refund amount" ;
    rdfs:domain om:Refund ;
    rdfs:range xsd:decimal .

om:hasRefundReason a owl:DatatypeProperty ;
    rdfs:label "has refund reason" ;
    rdfs:domain om:Refund ;
    rdfs:range xsd:string .

# ============================================================================
# Shipping Properties
# ============================================================================

om:hasShipment a owl:ObjectProperty ;
    rdfs:label "has shipment" ;
    rdfs:domain om:Order ;
    rdfs:range om:Shipment .

om:hasShippingMethod a owl:ObjectProperty ;
    rdfs:label "has shipping method" ;
    rdfs:domain om:Shipment ;
    rdfs:range om:ShippingMethod .

om:hasCarrier a owl:ObjectProperty ;
    rdfs:label "has carrier" ;
    rdfs:domain om:Shipment ;
    rdfs:range om:Carrier .

om:hasTrackingInfo a owl:ObjectProperty ;
    rdfs:label "has tracking info" ;
    rdfs:domain om:Shipment ;
    rdfs:range om:TrackingInfo .

om:hasTrackingNumber a owl:DatatypeProperty ;
    rdfs:label "has tracking number" ;
    rdfs:domain om:TrackingInfo ;
    rdfs:range xsd:string .

om:hasDeliveryAddress a owl:ObjectProperty ;
    rdfs:label "has delivery address" ;
    rdfs:domain om:Order ;
    rdfs:range om:DeliveryAddress .

om:hasEstimatedDelivery a owl:DatatypeProperty ;
    rdfs:label "has estimated delivery" ;
    rdfs:domain om:Shipment ;
    rdfs:range xsd:dateTime .

om:hasActualDelivery a owl:DatatypeProperty ;
    rdfs:label "has actual delivery" ;
    rdfs:domain om:Shipment ;
    rdfs:range xsd:dateTime .

# ============================================================================
# Fulfillment Properties
# ============================================================================

om:hasFulfillment a owl:ObjectProperty ;
    rdfs:label "has fulfillment" ;
    rdfs:domain om:Order ;
    rdfs:range om:Fulfillment .

om:hasWarehouse a owl:ObjectProperty ;
    rdfs:label "has warehouse" ;
    rdfs:domain om:Fulfillment ;
    rdfs:range om:Warehouse .

om:hasPickList a owl:ObjectProperty ;
    rdfs:label "has pick list" ;
    rdfs:domain om:Fulfillment ;
    rdfs:range om:PickList .

om:hasBackorder a owl:ObjectProperty ;
    rdfs:label "has backorder" ;
    rdfs:domain om:OrderItem ;
    rdfs:range om:Backorder .

om:hasExpectedRestockDate a owl:DatatypeProperty ;
    rdfs:label "has expected restock date" ;
    rdfs:domain om:Backorder ;
    rdfs:range xsd:dateTime .

# ============================================================================
# Return & Exchange Properties
# ============================================================================

om:hasReturn a owl:ObjectProperty ;
    rdfs:label "has return" ;
    rdfs:domain om:Order ;
    rdfs:range om:Return .

om:hasReturnReason a owl:ObjectProperty ;
    rdfs:label "has return reason" ;
    rdfs:domain om:Return ;
    rdfs:range om:ReturnReason .

om:hasExchange a owl:ObjectProperty ;
    rdfs:label "has exchange" ;
    rdfs:domain om:Order ;
    rdfs:range om:Exchange .

om:hasReturnLabel a owl:ObjectProperty ;
    rdfs:label "has return label" ;
    rdfs:domain om:Return ;
    rdfs:range om:ReturnLabel .

# ============================================================================
# Gift Order Properties
# ============================================================================

om:hasGiftMessage a owl:ObjectProperty ;
    rdfs:label "has gift message" ;
    rdfs:domain om:GiftOrder ;
    rdfs:range om:GiftMessage .

om:hasGiftWrap a owl:ObjectProperty ;
    rdfs:label "has gift wrap" ;
    rdfs:domain om:GiftOrder ;
    rdfs:range om:GiftWrap .

om:isGift a owl:DatatypeProperty ;
    rdfs:label "is gift" ;
    rdfs:domain om:Order ;
    rdfs:range xsd:boolean .

# ============================================================================
# Order Status Individuals
# ============================================================================

om:CartStatus a om:OrderStatus ;
    rdfs:label "Cart" ;
    rdfs:comment "Items in shopping cart, not yet ordered" .

om:PendingStatus a om:OrderStatus ;
    rdfs:label "Pending" ;
    rdfs:comment "Order placed, awaiting payment confirmation" .

om:ProcessingStatus a om:OrderStatus ;
    rdfs:label "Processing" ;
    rdfs:comment "Payment confirmed, order being prepared" .

om:ShippedStatus a om:OrderStatus ;
    rdfs:label "Shipped" ;
    rdfs:comment "Order shipped to customer" .

om:DeliveredStatus a om:OrderStatus ;
    rdfs:label "Delivered" ;
    rdfs:comment "Order delivered to customer" .

om:CancelledStatus a om:OrderStatus ;
    rdfs:label "Cancelled" ;
    rdfs:comment "Order cancelled" .

om:RefundedStatus a om:OrderStatus ;
    rdfs:label "Refunded" ;
    rdfs:comment "Order refunded" .

om:OnHoldStatus a om:OrderStatus ;
    rdfs:label "On Hold" ;
    rdfs:comment "Order on hold, awaiting resolution" .

# Total Lines: 290+
