---
to: "ontology_{{ domain | snake_case }}.ttl"
vars:
  domain: "ECommerce"
  description: "E-commerce domain ontology with products, orders, and customers"
  base_uri: "http://example.org/ecommerce#"
  version: "1.0.0"
---
# AI-Generated Ontology for {{ domain }}
# Description: {{ description }}
# Version: {{ version }}
# Generated by ggen-ai

@prefix : <{{ base_uri }}> .
@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 foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .

# Ontology Declaration
:{{ domain | snake_case }}_ontology rdf:type owl:Ontology ;
    dc:title "{{ domain }} Ontology" ;
    dc:description "{{ description }}" ;
    dc:version "{{ version }}" ;
    dc:created "{{ created_date }}"^^xsd:dateTime ;
    dc:creator "ggen-ai" .

# Core Classes
:Customer rdf:type owl:Class ;
    rdfs:label "Customer" ;
    rdfs:comment "A customer who can place orders" ;
    rdfs:subClassOf foaf:Person .

:Product rdf:type owl:Class ;
    rdfs:label "Product" ;
    rdfs:comment "A product that can be sold" .

:Order rdf:type owl:Class ;
    rdfs:label "Order" ;
    rdfs:comment "A customer order containing products" .

:OrderItem rdf:type owl:Class ;
    rdfs:label "Order Item" ;
    rdfs:comment "An item within an order" .

:Category rdf:type owl:Class ;
    rdfs:label "Product Category" ;
    rdfs:comment "A category for organizing products" .

:Payment rdf:type owl:Class ;
    rdfs:label "Payment" ;
    rdfs:comment "A payment for an order" .

:Address rdf:type owl:Class ;
    rdfs:label "Address" ;
    rdfs:comment "A physical address" .

# Object Properties
:placesOrder rdf:type owl:ObjectProperty ;
    rdfs:label "places order" ;
    rdfs:comment "Relates a customer to an order they placed" ;
    rdfs:domain :Customer ;
    rdfs:range :Order .

:containsItem rdf:type owl:ObjectProperty ;
    rdfs:label "contains item" ;
    rdfs:comment "Relates an order to its items" ;
    rdfs:domain :Order ;
    rdfs:range :OrderItem .

:hasProduct rdf:type owl:ObjectProperty ;
    rdfs:label "has product" ;
    rdfs:comment "Relates an order item to a product" ;
    rdfs:domain :OrderItem ;
    rdfs:range :Product .

:belongsToCategory rdf:type owl:ObjectProperty ;
    rdfs:label "belongs to category" ;
    rdfs:comment "Relates a product to its category" ;
    rdfs:domain :Product ;
    rdfs:range :Category .

:hasPayment rdf:type owl:ObjectProperty ;
    rdfs:label "has payment" ;
    rdfs:comment "Relates an order to its payment" ;
    rdfs:domain :Order ;
    rdfs:range :Payment .

:hasAddress rdf:type owl:ObjectProperty ;
    rdfs:label "has address" ;
    rdfs:comment "Relates a customer to their address" ;
    rdfs:domain :Customer ;
    rdfs:range :Address .

:hasShippingAddress rdf:type owl:ObjectProperty ;
    rdfs:label "has shipping address" ;
    rdfs:comment "Relates an order to its shipping address" ;
    rdfs:domain :Order ;
    rdfs:range :Address .

# Data Properties
:productName rdf:type owl:DatatypeProperty ;
    rdfs:label "product name" ;
    rdfs:comment "The name of a product" ;
    rdfs:domain :Product ;
    rdfs:range xsd:string .

:productPrice rdf:type owl:DatatypeProperty ;
    rdfs:label "product price" ;
    rdfs:comment "The price of a product" ;
    rdfs:domain :Product ;
    rdfs:range xsd:decimal .

:productDescription rdf:type owl:DatatypeProperty ;
    rdfs:label "product description" ;
    rdfs:comment "The description of a product" ;
    rdfs:domain :Product ;
    rdfs:range xsd:string .

:productSKU rdf:type owl:DatatypeProperty ;
    rdfs:label "product SKU" ;
    rdfs:comment "The SKU (Stock Keeping Unit) of a product" ;
    rdfs:domain :Product ;
    rdfs:range xsd:string .

:orderNumber rdf:type owl:DatatypeProperty ;
    rdfs:label "order number" ;
    rdfs:comment "The unique order number" ;
    rdfs:domain :Order ;
    rdfs:range xsd:string .

:orderDate rdf:type owl:DatatypeProperty ;
    rdfs:label "order date" ;
    rdfs:comment "The date when the order was placed" ;
    rdfs:domain :Order ;
    rdfs:range xsd:dateTime .

:orderStatus rdf:type owl:DatatypeProperty ;
    rdfs:label "order status" ;
    rdfs:comment "The current status of an order" ;
    rdfs:domain :Order ;
    rdfs:range xsd:string .

:quantity rdf:type owl:DatatypeProperty ;
    rdfs:label "quantity" ;
    rdfs:comment "The quantity of a product in an order item" ;
    rdfs:domain :OrderItem ;
    rdfs:range xsd:integer .

:unitPrice rdf:type owl:DatatypeProperty ;
    rdfs:label "unit price" ;
    rdfs:comment "The unit price of a product in an order item" ;
    rdfs:domain :OrderItem ;
    rdfs:range xsd:decimal .

:totalAmount rdf:type owl:DatatypeProperty ;
    rdfs:label "total amount" ;
    rdfs:comment "The total amount of an order" ;
    rdfs:domain :Order ;
    rdfs:range xsd:decimal .

:paymentAmount rdf:type owl:DatatypeProperty ;
    rdfs:label "payment amount" ;
    rdfs:comment "The amount of a payment" ;
    rdfs:domain :Payment ;
    rdfs:range xsd:decimal .

:paymentMethod rdf:type owl:DatatypeProperty ;
    rdfs:label "payment method" ;
    rdfs:comment "The method used for payment" ;
    rdfs:domain :Payment ;
    rdfs:range xsd:string .

:paymentDate rdf:type owl:DatatypeProperty ;
    rdfs:label "payment date" ;
    rdfs:comment "The date when payment was made" ;
    rdfs:domain :Payment ;
    rdfs:range xsd:dateTime .

:streetAddress rdf:type owl:DatatypeProperty ;
    rdfs:label "street address" ;
    rdfs:comment "The street address" ;
    rdfs:domain :Address ;
    rdfs:range xsd:string .

:city rdf:type owl:DatatypeProperty ;
    rdfs:label "city" ;
    rdfs:comment "The city" ;
    rdfs:domain :Address ;
    rdfs:range xsd:string .

:state rdf:type owl:DatatypeProperty ;
    rdfs:label "state" ;
    rdfs:comment "The state or province" ;
    rdfs:domain :Address ;
    rdfs:range xsd:string .

:postalCode rdf:type owl:DatatypeProperty ;
    rdfs:label "postal code" ;
    rdfs:comment "The postal or ZIP code" ;
    rdfs:domain :Address ;
    rdfs:range xsd:string .

:country rdf:type owl:DatatypeProperty ;
    rdfs:label "country" ;
    rdfs:comment "The country" ;
    rdfs:domain :Address ;
    rdfs:range xsd:string .

# Category hierarchy
:Electronics rdf:type :Category ;
    rdfs:label "Electronics" .

:Clothing rdf:type :Category ;
    rdfs:label "Clothing" .

:Books rdf:type :Category ;
    rdfs:label "Books" .

:Home rdf:type :Category ;
    rdfs:label "Home & Garden" .

# Order status values
:OrderStatus rdf:type owl:Class ;
    rdfs:label "Order Status" .

:Pending rdf:type :OrderStatus ;
    rdfs:label "Pending" .

:Processing rdf:type :OrderStatus ;
    rdfs:label "Processing" .

:Shipped rdf:type :OrderStatus ;
    rdfs:label "Shipped" .

:Delivered rdf:type :OrderStatus ;
    rdfs:label "Delivered" .

:Cancelled rdf:type :OrderStatus ;
    rdfs:label "Cancelled" .

# Payment method values
:PaymentMethod rdf:type owl:Class ;
    rdfs:label "Payment Method" .

:CreditCard rdf:type :PaymentMethod ;
    rdfs:label "Credit Card" .

:DebitCard rdf:type :PaymentMethod ;
    rdfs:label "Debit Card" .

:PayPal rdf:type :PaymentMethod ;
    rdfs:label "PayPal" .

:BankTransfer rdf:type :PaymentMethod ;
    rdfs:label "Bank Transfer" .

