@prefix atlas: <http://world.eu.org/atlas_ontology#> .
@prefix atlas_data: <http://world.eu.org/atlas_data#> .
@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 skos:  <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix schema: <http://schema.org/> .
@prefix wd:    <http://www.wikidata.org/entity/> .

atlas:Ontology a owl:Ontology ;
  rdfs:label "Atlas Internal Ontology" ;
  rdfs:comment "Canonical ontology for entity resolution, type adjudication, and enrichment in Atlas." .

### Core classes

atlas:Entity a owl:Class ;
  rdfs:label "Entity" ;
  rdfs:comment "Canonical Atlas entity representing one real-world referent." .

atlas:EntityType a owl:Class ;
  rdfs:label "Entity Type" ;
  rdfs:comment "Canonical internal type class owned by Atlas." .

atlas:ExternalType a owl:Class ;
  rdfs:label "External Type" ;
  rdfs:comment "Type evidence from external sources such as Wikidata or LLM classification." .

atlas:IdentifierType a owl:Class ;
  rdfs:label "Identifier Type" ;
  rdfs:comment "A canonical class for identifier schemes like MID or QID." .

atlas:Mid a owl:Class ;
  rdfs:subClassOf atlas:IdentifierType ;
  rdfs:label "MID" .

atlas:WikidataQID a owl:Class ;
  rdfs:subClassOf atlas:IdentifierType ;
  rdfs:label "Wikidata QID" .

atlas:Alias a owl:Class ;
  rdfs:label "Alias" ;
  rdfs:comment "Surface form or alternative label that may resolve to an entity." .

atlas:Identifier a owl:Class ;
  rdfs:label "Identifier" ;
  rdfs:comment "External identifier such as MID, Wikidata QID, etc." .

atlas:Provenance a owl:Class ;
  rdfs:label "Provenance" ;
  rdfs:comment "Source and method metadata for a claim or mapping." .

atlas:TypeAssertion a owl:Class ;
  rdfs:label "Type Assertion" ;
  rdfs:comment "A recorded statement that a source suggested a type for an entity." .

atlas:Claim a owl:Class ;
  rdfs:label "Claim" ;
  rdfs:comment "Atomic statement object with claim-level provenance." .


atlas:DomainProjection a owl:Class ;
  rdfs:label "Domain Projection" ;
  rdfs:comment "Domain-facing conceptual bundle derived from resolution + enrichment, if we choose to persist it later." .

### Object properties

atlas:hasCanonicalType a owl:ObjectProperty ;
  rdfs:domain atlas:Entity ;
  rdfs:range atlas:EntityType ;
  rdfs:label "has canonical type" .

atlas:hasExternalType a owl:ObjectProperty ;
  rdfs:domain atlas:Entity ;
  rdfs:range atlas:ExternalType ;
  rdfs:label "has external type" .

atlas:hasAlias a owl:ObjectProperty ;
  rdfs:domain atlas:Entity ;
  rdfs:range atlas:Alias ;
  rdfs:label "has alias" .

atlas:hasIdentifier a owl:ObjectProperty ;
  rdfs:domain atlas:Entity ;
  rdfs:range atlas:Identifier ;
  rdfs:label "has identifier" .

atlas:hasProvenance a owl:ObjectProperty ;
  rdfs:domain atlas:Entity ;
  rdfs:range atlas:Provenance ;
  rdfs:label "has provenance" .

atlas:hasIdentifierProvenance a owl:ObjectProperty ;
  rdfs:domain atlas:Identifier ;
  rdfs:range atlas:Provenance ;
  rdfs:label "identifier provenance" .

atlas:derivedFromProvenance a owl:ObjectProperty ;
  rdfs:domain atlas:TypeAssertion ;
  rdfs:range atlas:Provenance ;
  rdfs:label "derived from provenance" .

atlas:hasAssertionProvenance a owl:ObjectProperty ;
  rdfs:domain atlas:TypeAssertion ;
  rdfs:range atlas:Provenance ;
  rdfs:label "assertion provenance" .

atlas:hasTypeAssertion a owl:ObjectProperty ;
  rdfs:domain atlas:Entity ;
  rdfs:range atlas:TypeAssertion ;
  rdfs:label "has type assertion" .

atlas:hasClaim a owl:ObjectProperty ;
  rdfs:domain atlas:Entity ;
  rdfs:range atlas:Claim ;
  rdfs:label "has claim" .

atlas:claimSubjectIri a owl:ObjectProperty ;
  rdfs:domain atlas:Claim ;
  rdfs:range atlas:Entity ;
  rdfs:label "claim subject iri" .

atlas:assertedType a owl:ObjectProperty ;
  rdfs:domain atlas:TypeAssertion ;
  rdfs:range atlas:ExternalType ;
  rdfs:label "asserted type" .

atlas:needsCuration a owl:DatatypeProperty ;
  rdfs:domain atlas:Entity ;
  rdfs:range xsd:boolean ;
  rdfs:label "needs curation" .

atlas:projectionFor a owl:ObjectProperty ;
  rdfs:domain atlas:DomainProjection ;
  rdfs:range atlas:Entity ;
  rdfs:label "projection for" .

atlas:resolvedTo a owl:ObjectProperty ;
  rdfs:domain atlas:Alias ;
  rdfs:range atlas:Entity ;
  rdfs:label "resolved to" .

atlas:sameAsExternalType a owl:ObjectProperty ;
  rdfs:domain atlas:EntityType ;
  rdfs:range owl:Class ;
  rdfs:label "same as external type" .

### Datatype properties

atlas:canonicalLabel a owl:DatatypeProperty ;
  rdfs:domain atlas:Entity ;
  rdfs:range xsd:string ;
  rdfs:label "canonical label" .

atlas:canonicalDescription a owl:DatatypeProperty ;
  rdfs:domain atlas:Entity ;
  rdfs:range xsd:string ;
  rdfs:label "canonical description" .

atlas:entityTypeLabel a owl:DatatypeProperty ;
  rdfs:domain atlas:EntityType ;
  rdfs:range xsd:string ;
  rdfs:label "entity type label" .

atlas:externalTypeLabel a owl:DatatypeProperty ;
  rdfs:domain atlas:ExternalType ;
  rdfs:range xsd:string ;
  rdfs:label "external type label" .

atlas:aliasLabel a owl:DatatypeProperty ;
  rdfs:domain atlas:Alias ;
  rdfs:range xsd:string ;
  rdfs:label "alias label" .

atlas:identifierValue a owl:DatatypeProperty ;
  rdfs:domain atlas:Identifier ;
  rdfs:range xsd:string ;
  rdfs:label "identifier value" .

atlas:identifierSource a owl:DatatypeProperty ;
  rdfs:domain atlas:Identifier ;
  rdfs:range xsd:string ;
  rdfs:label "identifier source" .

atlas:identifierType a owl:ObjectProperty ;
  rdfs:domain atlas:Identifier ;
  rdfs:range atlas:IdentifierType ;
  rdfs:label "identifier type" .

atlas:provenanceSource a owl:DatatypeProperty ;
  rdfs:domain atlas:Provenance ;
  rdfs:range xsd:string ;
  rdfs:label "provenance source" .

atlas:retrievalMethod a owl:DatatypeProperty ;
  rdfs:domain atlas:Provenance ;
  rdfs:range xsd:string ;
  rdfs:label "retrieval method" .

atlas:retrievedAt a owl:DatatypeProperty ;
  rdfs:domain atlas:Provenance ;
  rdfs:range xsd:dateTime ;
  rdfs:label "retrieved at" .

atlas:confidence a owl:DatatypeProperty ;
  rdfs:domain atlas:Provenance ;
  rdfs:range xsd:decimal ;
  rdfs:label "confidence" .

atlas:claimPredicate a owl:DatatypeProperty ;
  rdfs:domain atlas:Claim ;
  rdfs:range xsd:string ;
  rdfs:label "claim predicate" .

atlas:claimObjectIri a owl:ObjectProperty ;
  rdfs:domain atlas:Claim ;
  rdfs:range owl:Thing ;
  rdfs:label "claim object iri" .

atlas:claimObjectLiteral a owl:DatatypeProperty ;
  rdfs:domain atlas:Claim ;
  rdfs:range xsd:string ;
  rdfs:label "claim object literal" .

atlas:claimLayer a owl:DatatypeProperty ;
  rdfs:domain atlas:Claim ;
  rdfs:range xsd:string ;
  rdfs:label "claim layer" .

atlas:claimStatus a owl:DatatypeProperty ;
  rdfs:domain atlas:Claim ;
  rdfs:range xsd:string ;
  rdfs:label "claim status" .

atlas:supersedes a owl:ObjectProperty ;
  rdfs:domain atlas:Claim ;
  rdfs:range atlas:Claim ;
  rdfs:label "supersedes" .

atlas:assertionReason a owl:DatatypeProperty ;
  rdfs:domain atlas:TypeAssertion ;
  rdfs:range xsd:string ;
  rdfs:label "assertion reason" .

atlas:assertionConfidence a owl:DatatypeProperty ;
  rdfs:domain atlas:TypeAssertion ;
  rdfs:range xsd:decimal ;
  rdfs:label "assertion confidence" .

atlas:needsCurationFlag a owl:DatatypeProperty ;
  rdfs:domain atlas:CurateFlag ;
  rdfs:range xsd:boolean ;
  rdfs:label "needs curation flag" .

atlas:curationReason a owl:DatatypeProperty ;
  rdfs:domain atlas:CurateFlag ;
  rdfs:range xsd:string ;
  rdfs:label "curation reason" .

atlas:generatedAt a owl:DatatypeProperty ;
  rdfs:domain atlas:DomainProjection ;
  rdfs:range xsd:dateTime ;
  rdfs:label "generated at" .

atlas:projectionPayload a owl:DatatypeProperty ;
  rdfs:domain atlas:DomainProjection ;
  rdfs:range xsd:string ;
  rdfs:label "projection payload" .

atlas:projectionContext a owl:DatatypeProperty ;
  rdfs:domain atlas:DomainProjection ;
  rdfs:range xsd:string ;
  rdfs:label "projection context" .

# Optional raw payload persistence (lean but consistent)
atlas:rawWikidataJson a owl:DatatypeProperty ;
  rdfs:domain atlas:Entity ;
  rdfs:range xsd:string ;
  rdfs:label "raw wikidata json" .

atlas:rawTrendsJson a owl:DatatypeProperty ;
  rdfs:domain atlas:Entity ;
  rdfs:range xsd:string ;
  rdfs:label "raw trends json" .

### Initial canonical type catalog

atlas:Person a owl:Class ;
  rdfs:subClassOf atlas:EntityType ;
  rdfs:label "Person" ;
  owl:sameAs schema:Person ;
  owl:sameAs wd:Q5 .

atlas:Organization a owl:Class ;
  rdfs:subClassOf atlas:EntityType ;
  rdfs:label "Organization" ;
  owl:sameAs schema:Organization ;
  owl:sameAs wd:Q43229 .

atlas:Location a owl:Class ;
  rdfs:subClassOf atlas:EntityType ;
  rdfs:label "Location" ;
  owl:sameAs schema:Place ;
  owl:sameAs wd:Q17334923 .

atlas:CreativeWork a owl:Class ;
  rdfs:subClassOf atlas:EntityType ;
  rdfs:label "Creative Work" ;
  owl:sameAs schema:CreativeWork ;
  owl:sameAs wd:Q17537576 .

atlas:Event a owl:Class ;
  rdfs:subClassOf atlas:EntityType ;
  rdfs:label "Event" ;
  owl:sameAs schema:Event ;
  owl:sameAs wd:Q1656682 .

atlas:Product a owl:Class ;
  rdfs:subClassOf atlas:EntityType ;
  rdfs:label "Product" ;
  owl:sameAs schema:Product ;
  owl:sameAs wd:Q2424752 .

atlas:Other a owl:Class ;
  rdfs:subClassOf atlas:EntityType ;
  rdfs:label "Other" .

### Initial known external type nodes

atlas:WikidataType_Q5 a atlas:ExternalType ;
  atlas:externalTypeLabel "human" ;
  atlas:provenanceSource "wikidata" .

atlas:WikidataType_Q43229 a atlas:ExternalType ;
  atlas:externalTypeLabel "organization" ;
  atlas:provenanceSource "wikidata" .

atlas:WikidataType_Q17334923 a atlas:ExternalType ;
  atlas:externalTypeLabel "human settlement" ;
  atlas:provenanceSource "wikidata" .

atlas:WikidataType_Q17537576 a atlas:ExternalType ;
  atlas:externalTypeLabel "creative work" ;
  atlas:provenanceSource "wikidata" .

atlas:WikidataType_Q1656682 a atlas:ExternalType ;
  atlas:externalTypeLabel "event" ;
  atlas:provenanceSource "wikidata" .

atlas:WikidataType_Q2424752 a atlas:ExternalType ;
  atlas:externalTypeLabel "product" ;
  atlas:provenanceSource "wikidata" .
