@prefix bank: <http://ggen.dev/ontology/banking-core#> .
@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 owl: <http://www.w3.org/2002/07/owl#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .

# Ontology Metadata
bank:BankingCoreOntology a owl:Ontology ;
    dc:title "Banking Core System Ontology" ;
    dc:description "Comprehensive ontology for core banking systems" ;
    dc:creator "ggen Marketplace" ;
    dc:date "2025-11-08" ;
    owl:versionInfo "1.0.0" .

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

bank:Customer a owl:Class ;
    rdfs:label "Customer" ;
    rdfs:comment "Banking customer" .

bank:Account a owl:Class ;
    rdfs:label "Account" ;
    rdfs:comment "Bank account" .

bank:CheckingAccount a owl:Class ;
    rdfs:subClassOf bank:Account ;
    rdfs:label "Checking Account" ;
    rdfs:comment "Demand deposit account" .

bank:SavingsAccount a owl:Class ;
    rdfs:subClassOf bank:Account ;
    rdfs:label "Savings Account" ;
    rdfs:comment "Interest-bearing savings account" .

bank:LoanAccount a owl:Class ;
    rdfs:subClassOf bank:Account ;
    rdfs:label "Loan Account" ;
    rdfs:comment "Loan or credit account" .

bank:CreditCardAccount a owl:Class ;
    rdfs:subClassOf bank:Account ;
    rdfs:label "Credit Card Account" ;
    rdfs:comment "Revolving credit card account" .

bank:InvestmentAccount a owl:Class ;
    rdfs:subClassOf bank:Account ;
    rdfs:label "Investment Account" ;
    rdfs:comment "Investment brokerage account" .

# ==================== Transaction Classes ====================

bank:Transaction a owl:Class ;
    rdfs:label "Transaction" ;
    rdfs:comment "Financial transaction" .

bank:Deposit a owl:Class ;
    rdfs:subClassOf bank:Transaction ;
    rdfs:label "Deposit" ;
    rdfs:comment "Deposit transaction" .

bank:Withdrawal a owl:Class ;
    rdfs:subClassOf bank:Transaction ;
    rdfs:label "Withdrawal" ;
    rdfs:comment "Withdrawal transaction" .

bank:Transfer a owl:Class ;
    rdfs:subClassOf bank:Transaction ;
    rdfs:label "Transfer" ;
    rdfs:comment "Account transfer" .

bank:ACHTransfer a owl:Class ;
    rdfs:subClassOf bank:Transfer ;
    rdfs:label "ACH Transfer" ;
    rdfs:comment "Automated Clearing House transfer" .

bank:WireTransfer a owl:Class ;
    rdfs:subClassOf bank:Transfer ;
    rdfs:label "Wire Transfer" ;
    rdfs:comment "Wire transfer" .

bank:CheckPayment a owl:Class ;
    rdfs:subClassOf bank:Transaction ;
    rdfs:label "Check Payment" ;
    rdfs:comment "Check payment transaction" .

bank:CardPayment a owl:Class ;
    rdfs:subClassOf bank:Transaction ;
    rdfs:label "Card Payment" ;
    rdfs:comment "Debit/credit card payment" .

bank:P2PTransfer a owl:Class ;
    rdfs:subClassOf bank:Transfer ;
    rdfs:label "P2P Transfer" ;
    rdfs:comment "Peer-to-peer transfer" .

# ==================== Ledger Classes ====================

bank:Ledger a owl:Class ;
    rdfs:label "Ledger" ;
    rdfs:comment "Accounting ledger" .

bank:GeneralLedger a owl:Class ;
    rdfs:subClassOf bank:Ledger ;
    rdfs:label "General Ledger" ;
    rdfs:comment "General ledger" .

bank:SubLedger a owl:Class ;
    rdfs:subClassOf bank:Ledger ;
    rdfs:label "Sub-Ledger" ;
    rdfs:comment "Subsidiary ledger" .

bank:LedgerEntry a owl:Class ;
    rdfs:label "Ledger Entry" ;
    rdfs:comment "Double-entry ledger entry" .

bank:DebitEntry a owl:Class ;
    rdfs:subClassOf bank:LedgerEntry ;
    rdfs:label "Debit Entry" ;
    rdfs:comment "Debit ledger entry" .

bank:CreditEntry a owl:Class ;
    rdfs:subClassOf bank:LedgerEntry ;
    rdfs:label "Credit Entry" ;
    rdfs:comment "Credit ledger entry" .

bank:Reconciliation a owl:Class ;
    rdfs:label "Reconciliation" ;
    rdfs:comment "Account reconciliation" .

# ==================== Interest & Rates ====================

bank:InterestRate a owl:Class ;
    rdfs:label "Interest Rate" ;
    rdfs:comment "Interest rate structure" .

bank:SimpleInterest a owl:Class ;
    rdfs:subClassOf bank:InterestRate ;
    rdfs:label "Simple Interest" ;
    rdfs:comment "Simple interest calculation" .

bank:CompoundInterest a owl:Class ;
    rdfs:subClassOf bank:InterestRate ;
    rdfs:label "Compound Interest" ;
    rdfs:comment "Compound interest calculation" .

bank:APY a owl:Class ;
    rdfs:subClassOf bank:InterestRate ;
    rdfs:label "APY" ;
    rdfs:comment "Annual percentage yield" .

bank:TieredRate a owl:Class ;
    rdfs:subClassOf bank:InterestRate ;
    rdfs:label "Tiered Rate" ;
    rdfs:comment "Balance-tiered interest rate" .

bank:InterestAccrual a owl:Class ;
    rdfs:label "Interest Accrual" ;
    rdfs:comment "Interest accrual calculation" .

# ==================== Limits & Controls ====================

bank:Limit a owl:Class ;
    rdfs:label "Limit" ;
    rdfs:comment "Account or transaction limit" .

bank:DailyLimit a owl:Class ;
    rdfs:subClassOf bank:Limit ;
    rdfs:label "Daily Limit" ;
    rdfs:comment "Daily transaction limit" .

bank:MonthlyLimit a owl:Class ;
    rdfs:subClassOf bank:Limit ;
    rdfs:label "Monthly Limit" ;
    rdfs:comment "Monthly transaction limit" .

bank:WithdrawalLimit a owl:Class ;
    rdfs:subClassOf bank:Limit ;
    rdfs:label "Withdrawal Limit" ;
    rdfs:comment "Withdrawal limit (Reg D)" .

bank:CreditLimit a owl:Class ;
    rdfs:subClassOf bank:Limit ;
    rdfs:label "Credit Limit" ;
    rdfs:comment "Credit card/line limit" .

bank:OverdraftProtection a owl:Class ;
    rdfs:label "Overdraft Protection" ;
    rdfs:comment "Overdraft protection service" .

# ==================== Regulatory Classes ====================

bank:RegulatoryReport a owl:Class ;
    rdfs:label "Regulatory Report" ;
    rdfs:comment "Regulatory filing or report" .

bank:CallReport a owl:Class ;
    rdfs:subClassOf bank:RegulatoryReport ;
    rdfs:label "Call Report" ;
    rdfs:comment "FFIEC Call Report" .

bank:CTR a owl:Class ;
    rdfs:subClassOf bank:RegulatoryReport ;
    rdfs:label "CTR" ;
    rdfs:comment "Currency Transaction Report" .

bank:SAR a owl:Class ;
    rdfs:subClassOf bank:RegulatoryReport ;
    rdfs:label "SAR" ;
    rdfs:comment "Suspicious Activity Report" .

bank:OFACScreening a owl:Class ;
    rdfs:label "OFAC Screening" ;
    rdfs:comment "OFAC sanctions screening" .

bank:AMLCheck a owl:Class ;
    rdfs:label "AML Check" ;
    rdfs:comment "Anti-Money Laundering check" .

bank:KYCVerification a owl:Class ;
    rdfs:label "KYC Verification" ;
    rdfs:comment "Know Your Customer verification" .

bank:AuditTrail a owl:Class ;
    rdfs:label "Audit Trail" ;
    rdfs:comment "Transaction audit trail" .

# ==================== Object Properties ====================

bank:ownsAccount a owl:ObjectProperty ;
    rdfs:domain bank:Customer ;
    rdfs:range bank:Account ;
    rdfs:label "owns account" .

bank:executesTransaction a owl:ObjectProperty ;
    rdfs:domain bank:Account ;
    rdfs:range bank:Transaction ;
    rdfs:label "executes transaction" .

bank:transfersFrom a owl:ObjectProperty ;
    rdfs:domain bank:Transfer ;
    rdfs:range bank:Account ;
    rdfs:label "transfers from" .

bank:transfersTo a owl:ObjectProperty ;
    rdfs:domain bank:Transfer ;
    rdfs:range bank:Account ;
    rdfs:label "transfers to" .

bank:recordedIn a owl:ObjectProperty ;
    rdfs:domain bank:Transaction ;
    rdfs:range bank:Ledger ;
    rdfs:label "recorded in" .

bank:hasEntry a owl:ObjectProperty ;
    rdfs:domain bank:Ledger ;
    rdfs:range bank:LedgerEntry ;
    rdfs:label "has entry" .

bank:earnsInterest a owl:ObjectProperty ;
    rdfs:domain bank:Account ;
    rdfs:range bank:InterestRate ;
    rdfs:label "earns interest" .

bank:accrues a owl:ObjectProperty ;
    rdfs:domain bank:Account ;
    rdfs:range bank:InterestAccrual ;
    rdfs:label "accrues" .

bank:hasLimit a owl:ObjectProperty ;
    rdfs:domain bank:Account ;
    rdfs:range bank:Limit ;
    rdfs:label "has limit" .

bank:hasProtection a owl:ObjectProperty ;
    rdfs:domain bank:Account ;
    rdfs:range bank:OverdraftProtection ;
    rdfs:label "has protection" .

bank:reportsTo a owl:ObjectProperty ;
    rdfs:domain bank:Account ;
    rdfs:range bank:RegulatoryReport ;
    rdfs:label "reports to" .

bank:screenedBy a owl:ObjectProperty ;
    rdfs:domain bank:Customer ;
    rdfs:range bank:OFACScreening ;
    rdfs:label "screened by" .

bank:passesAML a owl:ObjectProperty ;
    rdfs:domain bank:Customer ;
    rdfs:range bank:AMLCheck ;
    rdfs:label "passes AML" .

bank:passesKYC a owl:ObjectProperty ;
    rdfs:domain bank:Customer ;
    rdfs:range bank:KYCVerification ;
    rdfs:label "passes KYC" .

bank:hasAuditTrail a owl:ObjectProperty ;
    rdfs:domain bank:Transaction ;
    rdfs:range bank:AuditTrail ;
    rdfs:label "has audit trail" .

bank:reconcilesTo a owl:ObjectProperty ;
    rdfs:domain bank:Account ;
    rdfs:range bank:Reconciliation ;
    rdfs:label "reconciles to" .

# ==================== Data Properties ====================

bank:customerId a owl:DatatypeProperty ;
    rdfs:domain bank:Customer ;
    rdfs:range xsd:string ;
    rdfs:label "customer ID" .

bank:customerName a owl:DatatypeProperty ;
    rdfs:domain bank:Customer ;
    rdfs:range xsd:string ;
    rdfs:label "customer name" .

bank:ssn a owl:DatatypeProperty ;
    rdfs:domain bank:Customer ;
    rdfs:range xsd:string ;
    rdfs:label "SSN" .

bank:accountNumber a owl:DatatypeProperty ;
    rdfs:domain bank:Account ;
    rdfs:range xsd:string ;
    rdfs:label "account number" .

bank:accountType a owl:DatatypeProperty ;
    rdfs:domain bank:Account ;
    rdfs:range xsd:string ;
    rdfs:label "account type" .

bank:balance a owl:DatatypeProperty ;
    rdfs:domain bank:Account ;
    rdfs:range xsd:decimal ;
    rdfs:label "balance" .

bank:availableBalance a owl:DatatypeProperty ;
    rdfs:domain bank:Account ;
    rdfs:range xsd:decimal ;
    rdfs:label "available balance" .

bank:openDate a owl:DatatypeProperty ;
    rdfs:domain bank:Account ;
    rdfs:range xsd:date ;
    rdfs:label "open date" .

bank:status a owl:DatatypeProperty ;
    rdfs:domain bank:Account ;
    rdfs:range xsd:string ;
    rdfs:label "status" .

bank:transactionId a owl:DatatypeProperty ;
    rdfs:domain bank:Transaction ;
    rdfs:range xsd:string ;
    rdfs:label "transaction ID" .

bank:amount a owl:DatatypeProperty ;
    rdfs:domain bank:Transaction ;
    rdfs:range xsd:decimal ;
    rdfs:label "amount" .

bank:transactionDate a owl:DatatypeProperty ;
    rdfs:domain bank:Transaction ;
    rdfs:range xsd:dateTime ;
    rdfs:label "transaction date" .

bank:description a owl:DatatypeProperty ;
    rdfs:domain bank:Transaction ;
    rdfs:range xsd:string ;
    rdfs:label "description" .

bank:transactionType a owl:DatatypeProperty ;
    rdfs:domain bank:Transaction ;
    rdfs:range xsd:string ;
    rdfs:label "transaction type" .

bank:routingNumber a owl:DatatypeProperty ;
    rdfs:domain bank:ACHTransfer ;
    rdfs:range xsd:string ;
    rdfs:label "routing number" .

bank:checkNumber a owl:DatatypeProperty ;
    rdfs:domain bank:CheckPayment ;
    rdfs:range xsd:string ;
    rdfs:label "check number" .

bank:entryId a owl:DatatypeProperty ;
    rdfs:domain bank:LedgerEntry ;
    rdfs:range xsd:string ;
    rdfs:label "entry ID" .

bank:debitAmount a owl:DatatypeProperty ;
    rdfs:domain bank:DebitEntry ;
    rdfs:range xsd:decimal ;
    rdfs:label "debit amount" .

bank:creditAmount a owl:DatatypeProperty ;
    rdfs:domain bank:CreditEntry ;
    rdfs:range xsd:decimal ;
    rdfs:label "credit amount" .

bank:ratePercentage a owl:DatatypeProperty ;
    rdfs:domain bank:InterestRate ;
    rdfs:range xsd:decimal ;
    rdfs:label "rate percentage" .

bank:compoundingFrequency a owl:DatatypeProperty ;
    rdfs:domain bank:CompoundInterest ;
    rdfs:range xsd:string ;
    rdfs:label "compounding frequency" .

bank:apyValue a owl:DatatypeProperty ;
    rdfs:domain bank:APY ;
    rdfs:range xsd:decimal ;
    rdfs:label "APY value" .

bank:accruedInterest a owl:DatatypeProperty ;
    rdfs:domain bank:InterestAccrual ;
    rdfs:range xsd:decimal ;
    rdfs:label "accrued interest" .

bank:limitAmount a owl:DatatypeProperty ;
    rdfs:domain bank:Limit ;
    rdfs:range xsd:decimal ;
    rdfs:label "limit amount" .

bank:limitType a owl:DatatypeProperty ;
    rdfs:domain bank:Limit ;
    rdfs:range xsd:string ;
    rdfs:label "limit type" .

bank:reportId a owl:DatatypeProperty ;
    rdfs:domain bank:RegulatoryReport ;
    rdfs:range xsd:string ;
    rdfs:label "report ID" .

bank:filingDate a owl:DatatypeProperty ;
    rdfs:domain bank:RegulatoryReport ;
    rdfs:range xsd:date ;
    rdfs:label "filing date" .

bank:screeningResult a owl:DatatypeProperty ;
    rdfs:domain bank:OFACScreening ;
    rdfs:range xsd:string ;
    rdfs:label "screening result" .

bank:riskLevel a owl:DatatypeProperty ;
    rdfs:domain bank:AMLCheck ;
    rdfs:range xsd:string ;
    rdfs:label "risk level" .

bank:verificationStatus a owl:DatatypeProperty ;
    rdfs:domain bank:KYCVerification ;
    rdfs:range xsd:string ;
    rdfs:label "verification status" .
