thesauri prep
type: R2RMLView
sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(thesauri_id) as thesauri_id_short, (SELECT item_name from thesauri as t2 where t2.thesauri_id = thesauri.parent ) as parent_item_name, (SELECT item_name from thesauri as t2 where t2.thesauri_id = thesauri.thesaurus ) as thesaurus_item_name, (CASE thesaurus WHEN 0 THEN 'https://pnm.uni-mainz.de/ontology#thesaurus' WHEN 1 THEN 'http://www.cidoc-crm.org/cidoc-crm/E55_Type' WHEN 2 THEN 'http://www.cidoc-crm.org/cidoc-crm/E55_Type' WHEN 3 THEN 'http://www.cidoc-crm.org/cidoc-crm/E57_Material' WHEN 4 THEN 'https://pnm.uni-mainz.de/ontology#text_content' WHEN 5 THEN 'http://www.cidoc-crm.org/cidoc-crm/E4_Period' WHEN 6 THEN 'http://www.cidoc-crm.org/cidoc-crm/E4_Period' WHEN 7 THEN 'http://www.cidoc-crm.org/cidoc-crm/E55_Type' WHEN 8 THEN 'http://www.cidoc-crm.org/cidoc-crm/E55_Type' WHEN 9 THEN 'https://pnm.uni-mainz.de/ontology#relative_location' WHEN 10 THEN 'http://www.cidoc-crm.org/cidoc-crm/E55_Type' WHEN 11 THEN 'https://pnm.uni-mainz.de/ontology#bond_type' WHEN 12 THEN 'https://pnm.uni-mainz.de/ontology#script' END) as class, CASE WHEN thesaurus=0 THEN 'http://www.w3.org/2004/02/skos/core#ConceptScheme' ELSE 'http://www.w3.org/2004/02/skos/core#Concept' END as skos, (CASE thesaurus WHEN 1 THEN 'http://www.cidoc-crm.org/cidoc-crm/P127_has_broader_term' WHEN 2 THEN 'http://www.cidoc-crm.org/cidoc-crm/P127_has_broader_term' WHEN 5 THEN 'http://www.cidoc-crm.org/cidoc-crm/P9i_forms_part_of' WHEN 6 THEN 'http://www.cidoc-crm.org/cidoc-crm/P9i_forms_part_of' END) as parent_class, CASE WHEN external_key LIKE 'thot%' THEN CONCAT('http://thot.philo.ulg.ac.be/concept/', external_key) ELSE external_key END as external_key_prep FROM thesauri

thesaurus map
type: TriplesMap
logical table: thesauri prep
subject map:
  template: https://pnm.uni-mainz.de/thesaurus/{item_name}
predicate object map:
  predicate: type
  object map:
    column: class
    term type: IRI
  object map:
    column: skos
    term type: IRI
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: inScheme
  object map:
    template: https://pnm.uni-mainz.de/thesaurus/{thesaurus_item_name}
predicate object map:
  predicate map:
    column: parent_class
    term type: IRI
  object map:
    template: https://pnm.uni-mainz.de/thesaurus/{parent_item_name}
predicate object map:
  predicate: broader
  object map:
    template: https://pnm.uni-mainz.de/thesaurus/{parent_item_name}
predicate object map:
  predicate: prefLabel
  object map:
    column: item_name
    language: en
predicate object map:
  predicate: closeMatch
  object map:
    column: external_key_prep
    term type: IRI
predicate object map:
  predicate: definition
  object map:
    column: explanation

coord map
type: TriplesMap
logical table:
  sql query: SELECT places_id, wgs84_latitude, wgs84_longitude, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(places_id) as places_id_short FROM places WHERE wgs84_latitude > 0 AND wgs84_longitude > 0
subject map:
  template: https://pnm.uni-mainz.de/place/{places_id_short}#coord
  class: SpatialThing
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: lat
  object map:
    column: wgs84_latitude
    datatype: decimal
predicate object map:
  predicate: long
  object map:
    column: wgs84_longitude
    datatype: decimal

place map
type: TriplesMap
logical table:
  sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(places_id) as places_id_short FROM places
subject map:
  template: https://pnm.uni-mainz.de/place/{places_id_short}
  class: Place
  class: E53 Place
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: prefLabel
  object map:
    column: place_name
    language: en
predicate object map:
  predicate: altLabel
  object map:
    column: long_place_name
predicate object map:
  predicate: exactMatch
  object map:
    column: artefacts_url
    term type: IRI
predicate object map:
  predicate: exactMatch
  object map:
    template: https://www.trismegistos.org/place/{tm_geoid}
    term type: IRI
predicate object map:
  predicate: exactMatch
  object map:
    template: http://topbib.griffith.ox.ac.uk//dtb.html
    term type: IRI
predicate object map:
  predicate: exactMatch
  object map:
    template: http://pleiades.stoa.org/places/{pleiades_id}
    term type: IRI
predicate object map:
  predicate: P89 falls within
  object map:
    parent triples map: place map
    join condition:
      child: macro_region
      parent: place_name
predicate object map:
  predicate: P89 falls within
  object map:
    parent triples map: thesaurus map
    join condition:
      child: relative_location
      parent: item_name
predicate object map:
  predicate: P168 place is defined by
  object map:
    parent triples map: coord map
    join condition:
      child: places_id
      parent: places_id

topbib map
type: TriplesMap
logical table:
  sql query: SELECT objects_id, record_id_from_id(objects_id) as objects_id_short, topbib_id FROM objects where NOT ISNULL(topbib_id)
subject map:
  template: https://pnm.uni-mainz.de/object/{objects_id_short}#topbib_id
  class: E42 Identifier
predicate object map:
  predicate: label
  object map:
    column: topbib_id
predicate object map:
  predicate: P2 has type
  object: topbib id

object production map
type: TriplesMap
logical table:
  sql query: SELECT record_id_from_id(objects_id) as objects_id_short, production_place, production_place_note FROM objects where NOT ISNULL(production_place) OR EXISTS(SELECT objects_id FROM inscriptions_workshops_xref where inscriptions_workshops_xref.objects_id = objects.objects_id)
subject map:
  template: https://pnm.uni-mainz.de/object/{objects_id_short}#production
  class: E12 Production
predicate object map:
  predicate: P108 has produced
  object map:
    template: https://pnm.uni-mainz.de/object/{objects_id_short}
predicate object map:
  predicate: P7 took place at
  object map:
    parent triples map: place map
    join condition:
      child: production_place
      parent: place_name
predicate object map:
  predicate: has production place note
  object map:
    column: production_place_note

inscription length map
type: TriplesMap
logical table:
  sql query: SELECT record_id_from_id(objects_id) as objects_id_short, length as dimension FROM objects where NOT ISNULL(length) AND length > 0
subject map:
  template: https://pnm.uni-mainz.de/object/{objects_id_short}#length
  class: E54 Dimension
predicate object map:
  predicate: P43i is dimension of
  object map:
    template: https://pnm.uni-mainz.de/object/{objects_id_short}
predicate object map:
  predicate: P91 has unit
  object: MilliM
predicate object map:
  predicate: P90 has value
  object map:
    column: dimension

inscription height map
type: TriplesMap
logical table:
  sql query: SELECT record_id_from_id(objects_id) as objects_id_short, height as dimension FROM objects where NOT ISNULL(height) AND height > 0
subject map:
  template: https://pnm.uni-mainz.de/object/{objects_id_short}#height
  class: E54 Dimension
predicate object map:
  predicate: P43i is dimension of
  object map:
    template: https://pnm.uni-mainz.de/object/{objects_id_short}
predicate object map:
  predicate: P91 has unit
  object: MilliM
predicate object map:
  predicate: P90 has value
  object map:
    column: dimension

inscription width map
type: TriplesMap
logical table:
  sql query: SELECT record_id_from_id(objects_id) as objects_id_short, width as dimension FROM objects where NOT ISNULL(width) AND width > 0
subject map:
  template: https://pnm.uni-mainz.de/object/{objects_id_short}#width
  class: E54 Dimension
predicate object map:
  predicate: P43i is dimension of
  object map:
    template: https://pnm.uni-mainz.de/object/{objects_id_short}
predicate object map:
  predicate: P91 has unit
  object: MilliM
predicate object map:
  predicate: P90 has value
  object map:
    column: dimension

inscription thickness map
type: TriplesMap
logical table:
  sql query: SELECT record_id_from_id(objects_id) as objects_id_short, thickness as dimension FROM objects where NOT ISNULL(thickness) AND thickness > 0
subject map:
  template: https://pnm.uni-mainz.de/object/{objects_id_short}#thickness
  class: E54 Dimension
predicate object map:
  predicate: P43i is dimension of
  object map:
    template: https://pnm.uni-mainz.de/object/{objects_id_short}
predicate object map:
  predicate: P91 has unit
  object: MilliM
predicate object map:
  predicate: P90 has value
  object map:
    column: dimension

objects prep
type: R2RMLView
sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(objects_id) as objects_id_short, record_id_from_id(find_groups_id) as find_groups_id_short FROM objects

objects map
type: TriplesMap
logical table: objects prep
subject map:
  template: https://pnm.uni-mainz.de/object/{objects_id_short}
  class: E24 Physical Human-Made Thing
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: prefLabel
  object map:
    column: title
predicate object map:
  predicate: P1 is identified by
  object map:
    parent triples map: topbib map
    join condition:
      child: objects_id
      parent: objects_id
predicate object map:
  predicate: P45 consists of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: material
      parent: item_name
predicate object map:
  predicate: P2 has type
  object map:
    parent triples map: thesaurus map
    join condition:
      child: object_type
      parent: item_name
predicate object map:
  predicate: P2 has type
  object map:
    parent triples map: thesaurus map
    join condition:
      child: object_subtype
      parent: item_name
predicate object map:
  predicate: foundAt
  predicate: P53 has former or current location
  object map:
    parent triples map: place map
    join condition:
      child: provenance
      parent: place_name
predicate object map:
  predicate: has provenance note
  object map:
    column: provenance_note
predicate object map:
  predicate: installation place
  object map:
    parent triples map: place map
    join condition:
      child: installation_place
      parent: place_name
predicate object map:
  predicate: has installation place note
  object map:
    column: installation_place_note
predicate object map:
  predicate: P53 has former or current location
  object map:
    parent triples map: find group map
    join condition:
      child: find_groups_id
      parent: find_groups_id

objects inscriptions xref prep
type: R2RMLView
sql query: SELECT inscriptions_id, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(inscriptions_id) as inscriptions_id_short, record_id_from_id(objects_id) as objects_id_short FROM objects_inscriptions_xref

objects inscriptions xref masp
type: TriplesMap
logical table: objects inscriptions xref prep
subject map:
  template: https://pnm.uni-mainz.de/object/{objects_id_short}
predicate object map:
  predicate: P128 carries
  object map:
    parent triples map: inscriptions map
    join condition:
      child: inscriptions_id
      parent: inscriptions_id

inscription creation map
type: TriplesMap
logical table:
  sql query: SELECT inscriptions_id, record_id_from_id(inscriptions_id) as inscriptions_id_short, dating, dating_note FROM inscriptions where NOT ISNULL(dating)
subject map:
  template: https://pnm.uni-mainz.de/inscription/{inscriptions_id_short}#creation
  class: E65 Creation
predicate object map:
  predicate: P94 has created
  object map:
    parent triples map: inscriptions map
    join condition:
      child: inscriptions_id
      parent: inscriptions_id
predicate object map:
  predicate: P175i starts after or with the start of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: dating
      parent: item_name
predicate object map:
  predicate: P184 ends before or with the end of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: dating
      parent: item_name
predicate object map:
  predicate: has dating note
  object map:
    column: dating_note

inscriptions prep
type: R2RMLView
sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(inscriptions_id) as inscriptions_id_short FROM inscriptions

inscriptions map
type: TriplesMap
logical table: inscriptions prep
subject map:
  template: https://pnm.uni-mainz.de/inscription/{inscriptions_id_short}
  class: E34 Inscription
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: prefLabel
  object map:
    column: title
predicate object map:
  predicate: closeMatch
  object map:
    template: https://www.trismegistos.org/text/{tmtexts_id}
    term type: IRI
predicate object map:
  predicate: has text content
  object map:
    parent triples map: thesaurus map
    join condition:
      child: text_content
      parent: item_name
predicate object map:
  predicate: has script
  object map:
    parent triples map: thesaurus map
    join condition:
      child: script
      parent: item_name
predicate object map:
  predicate: origin
  object map:
    parent triples map: place map
    join condition:
      child: origin
      parent: place_name
predicate object map:
  predicate: has origin note
  object map:
    column: origin_note
predicate object map:
  predicate: last king mentioned
  object map:
    parent triples map: thesaurus map
    join condition:
      child: last_king_id
      parent: thesauri_id

find groups production map
type: TriplesMap
logical table:
  sql query: SELECT record_id_from_id(find_groups_id) as find_groups_id_short, dating, dating_note FROM find_groups where NOT ISNULL(dating)
subject map:
  template: https://pnm.uni-mainz.de/group/{find_groups_id_short}#production
  class: E12 Production
predicate object map:
  predicate: has deposited
  object map:
    template: https://pnm.uni-mainz.de/group/{find_groups_id_short}
predicate object map:
  predicate: P175i starts after or with the start of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: dating
      parent: item_name
predicate object map:
  predicate: P184 ends before or with the end of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: dating
      parent: item_name
predicate object map:
  predicate: has dating note
  object map:
    column: dating_note

find group map
type: TriplesMap
logical table:
  sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(find_groups_id) as find_groups_id_short FROM find_groups
subject map:
  template: https://pnm.uni-mainz.de/group/{find_groups_id_short}
  class: EHE0007 Context
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: P89 falls within
  object map:
    parent triples map: place map
    join condition:
      child: site
      parent: place_name
predicate object map:
  predicate: P89 falls within
  object map:
    column: site_area
predicate object map:
  predicate: has exact location
  object map:
    column: exact_location
predicate object map:
  predicate: prefLabel
  object map:
    column: title
predicate object map:
  predicate: P2 has type
  object map:
    parent triples map: thesaurus map
    join condition:
      child: find_group_type
      parent: item_name
predicate object map:
  predicate: architecture
  object map:
    column: architecture
predicate object map:
  predicate: human remains
  object map:
    column: human_remains
predicate object map:
  predicate: finds
  object map:
    column: finds
predicate object map:
  predicate: P2 has type
  object map:
    parent triples map: thesaurus map
    join condition:
      child: disturbance
      parent: item_name
predicate object map:
  predicate: P3 has note
  object map:
    column: note

inscription workshops production map
type: TriplesMap
logical table:
  sql query: SELECT *,record_id_from_id(objects_id) as objects_id_short, record_id_from_id(workshops_id) as workshops_id_short, IF (note>'', CONCAT('. Note: ', note), note) as note_prep from inscriptions_workshops_xref
subject map:
  template: https://pnm.uni-mainz.de/object/{objects_id_short}#production
predicate object map:
  predicate: P14 carried out by
  object map:
    parent triples map: workshop map
    join condition:
      child: workshops_id
      parent: workshops_id
predicate object map:
  predicate: P3 has note
  object map:
    template: Production by <https://pnm.uni-mainz.de/workshop/{workshops_id_short}>. Status: {status}{note_prep}
    term type: Literal

workshop dissolution map
type: TriplesMap
logical table:
  sql query: SELECT dating, dating_note, record_id_from_id(workshops_id) as workshops_id_short FROM workshops where not isnull(dating)
subject map:
  template: https://pnm.uni-mainz.de/workshop/{workshops_id_short}#Dissolution
  class: E68 Dissolution
predicate object map:
  predicate: P99 dissolved
  object map:
    template: https://pnm.uni-mainz.de/workshop/{workshops_id_short}
predicate object map:
  predicate: P184 ends before or with the end of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: dating
      parent: item_name
predicate object map:
  predicate: P175i starts after or with the start of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: dating
      parent: item_name

workshop formation map
type: TriplesMap
logical table:
  sql query: SELECT dating, dating_note, record_id_from_id(workshops_id) as workshops_id_short FROM workshops where not isnull(dating)
subject map:
  template: https://pnm.uni-mainz.de/workshop/{workshops_id_short}#Formation
  class: E66 Formation
predicate object map:
  predicate: P95 has formed
  object map:
    template: https://pnm.uni-mainz.de/workshop/{workshops_id_short}
predicate object map:
  predicate: P175i starts after or with the start of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: dating
      parent: item_name
predicate object map:
  predicate: P184 ends before or with the end of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: dating
      parent: item_name
predicate object map:
  predicate: has dating note
  object map:
    column: dating_note

workshop map
type: TriplesMap
logical table:
  sql query: SELECT title, workshops_id, production_place, production_place_note, note, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(workshops_id) as workshops_id_short FROM workshops
subject map:
  template: https://pnm.uni-mainz.de/workshop/{workshops_id_short}
  class: E74 Group
predicate object map:
  predicate: prefLabel
  object map:
    column: title
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: P74 has current or former residence
  object map:
    parent triples map: place map
    join condition:
      child: production_place
      parent: place_name
predicate object map:
  predicate: has location note
  object map:
    column: production_place_note
predicate object map:
  predicate: P3 has note
  object map:
    column: note

publications map
type: TriplesMap
logical table:
  sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(publications_id) as publications_id_short FROM publications
subject map:
  template: https://pnm.uni-mainz.de/publication/{publications_id_short}
  class: E31 document
  class: BibliographicResource
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: csl json
  object map:
    column: csl_json
predicate object map:
  predicate: bibliographicCitation
  object map:
    column: html_entry
predicate object map:
  predicate: closeMatch
  object map:
    template: http://oeb.griffith.ox.ac.uk/oeb_entry.aspx
    term type: IRI
predicate object map:
  predicate: prefLabel
  object map:
    column: author_year

inv no assignment map
type: TriplesMap
logical table:
  sql query: SELECT *, record_id_from_id(inv_nos_id) as inv_nos_id_short, record_id_from_id(collections_id) as collections_id_short, record_id_from_id(objects_id) as objects_id_short FROM inv_nos
subject map:
  template: https://pnm.uni-mainz.de/object/{objects_id_short}#inv_no_{inv_nos_id_short}_assignment
  class: E15 Identifier Assignment
predicate object map:
  predicate: P37 assigned
  object map:
    parent triples map: inv no map
    join condition:
      child: inv_nos_id
      parent: inv_nos_id
predicate object map:
  predicate: P14 carried out by
  object map:
    parent triples map: collection map
    join condition:
      child: collections_id
      parent: collections_id

inv no owner map
type: TriplesMap
logical table:
  sql query: SELECT distinct collections_id , record_id_from_id(objects_id) as objects_id_short, (CASE status WHEN 'main' THEN 'http://www.cidoc-crm.org/cidoc-crm/P52_has_current_owner' WHEN 'alternative' THEN 'http://www.cidoc-crm.org/cidoc-crm/P52_has_current_owner' WHEN 'obsolete' THEN 'http://www.cidoc-crm.org/cidoc-crm/P51_has_former_or_current_owner' WHEN 'erroneous' THEN 'http://www.cidoc-crm.org/cidoc-crm/P51_has_former_or_current_owner' END) as status_class FROM inv_nos
subject map:
  template: https://pnm.uni-mainz.de/object/{objects_id_short}
predicate object map:
  predicate map:
    column: status_class
    term type: IRI
  object map:
    parent triples map: collection map
    join condition:
      child: collections_id
      parent: collections_id

inv no map
type: TriplesMap
logical table:
  sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(inv_nos_id) as inv_nos_id_short, record_id_from_id(objects_id) as objects_id_short, (CASE status WHEN 'main' THEN 'http://www.cidoc-crm.org/cidoc-crm/P48i_is_preferred_identifier_of' WHEN 'alternative' THEN 'http://www.cidoc-crm.org/cidoc-crm/P1i_identifies' WHEN 'obsolete' THEN 'http://www.cidoc-crm.org/cidoc-crm/P1i_identifies' WHEN 'erroneous' THEN 'http://www.cidoc-crm.org/cidoc-crm/P1i_identifies' END) as status_class, (CASE status WHEN 'main' THEN 'https://pnm.uni-mainz.de/ontology#main_inv_no' WHEN 'alternative' THEN 'https://pnm.uni-mainz.de/ontology#alternative_inv_no' WHEN 'obsolete' THEN 'https://pnm.uni-mainz.de/ontology#obsolete_inv_no' WHEN 'erroneous' THEN 'https://pnm.uni-mainz.de/ontology#erroneous_inv_no' END) as status_iri FROM inv_nos
subject map:
  template: https://pnm.uni-mainz.de/object/{objects_id_short}#inv_no_{inv_nos_id_short}
  class: E42 Identifier
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate map:
    column: status_class
    term type: IRI
  object map:
    parent triples map: objects map
    join condition:
      child: objects_id
      parent: objects_id
predicate object map:
  predicate: P2 has type
  object map:
    column: status_iri
    term type: IRI
predicate object map:
  predicate: label
  object map:
    column: inv_no
predicate object map:
  predicate: P3 has note
  object map:
    column: note

collection url map
type: TriplesMap
logical table:
  sql query: SELECT url, record_id_from_id(collections_id) as collections_id_short FROM collections WHERE NOT ISNULL (url)
subject map:
  template: https://pnm.uni-mainz.de/collection/{collections_id_short}#url
  class: E42 Identifier
predicate object map:
  predicate: label
  predicate: P1 is identified by
  object map:
    column: url

collection online collection url map
type: TriplesMap
logical table:
  sql query: SELECT online_collection, record_id_from_id(collections_id) as collections_id_short FROM collections WHERE NOT ISNULL (url)
subject map:
  template: https://pnm.uni-mainz.de/collection/{collections_id_short}#online_collection
  class: E42 Identifier
predicate object map:
  predicate: label
  predicate: P1 is identified by
  object map:
    column: online_collection
predicate object map:
  predicate: P2 has type
  object: online collection

collection map
type: TriplesMap
logical table:
  sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(collections_id) as collections_id_short FROM collections
subject map:
  template: https://pnm.uni-mainz.de/collection/{collections_id_short}
  class: E74 Group
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: altLabel
  object map:
    column: full_name_en
    language: en
predicate object map:
  predicate: altLabel
  object map:
    column: full_name_national_language
predicate object map:
  predicate: prefLabel
  object map:
    column: title
predicate object map:
  predicate: P74 has current or former residence
  object map:
    column: location
predicate object map:
  predicate: closeMatch
  object map:
    template: http://thot.philo.ulg.ac.be/concept/{thot_concept_id}
    term type: IRI
predicate object map:
  predicate: closeMatch
  object map:
    template: https://www.trismegistos.org/collection/{tm_coll_id}
    term type: IRI
predicate object map:
  predicate: closeMatch
  object map:
    column: artefacts_url
    term type: IRI

attestation map
type: TriplesMap
logical table:
  sql query: SELECT *, (CASE WHEN (representation = 'human figure') THEN 'https://pnm.uni-mainz.de/ontology#human_figure' WHEN (representation = 'not represented') THEN 'https://pnm.uni-mainz.de/ontology#not_represented' ELSE NULL END) as visual_representation, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(attestations_id) as attestations_id_short, record_id_from_id(inscriptions_id) as inscriptions_id_short FROM attestations
subject map:
  template: https://pnm.uni-mainz.de/inscription/{inscriptions_id_short}#{attestations_id_short}
  class: person attestation
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: P67i is referred to by
  object map:
    parent triples map: inscriptions map
    join condition:
      child: inscriptions_id
      parent: inscriptions_id
predicate object map:
  predicate: attested gender
  object map:
    column: gender
predicate object map:
  predicate: has visual representation
  object map:
    column: visual_representation
    term type: IRI
predicate object map:
  predicate: epithet
  object map:
    column: epithet
predicate object map:
  predicate: attested title string
  object map:
    column: title_string
predicate object map:
  predicate: attested personal names
  object map:
    column: personal_name
predicate object map:
  predicate: status in the inscription
  object map:
    column: status
predicate object map:
  predicate: location in the inscription
  object map:
    column: location
predicate object map:
  predicate: has identity statement
  object map:
    parent triples map: identity statements map
    join condition:
      child: attestations_id
      parent: attestations_id
predicate object map:
  predicate: P3 has note
  object map:
    column: note

identity statements map
type: TriplesMap
logical table:
  sql query: SELECT attestations.attestations_id as attestations_id, persons_id, record_id_from_id(persons_attestations_xref.persons_id) as persons_id_short, persons_attestations_xref.reasoning as reasoning, persons_attestations_xref.note as note, CAST(persons_attestations_xref.date_created AS DATETIME) AS date_created_dt, CAST(persons_attestations_xref.date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(persons_attestations_xref.attestations_id) as attestations_id_short, record_id_from_id(attestations.inscriptions_id) as inscriptions_id_short, record_id_from_id(persons_attestations_xref_id) as persons_attestations_xref_id_id_short, (CASE persons_attestations_xref.status WHEN 'accepted' THEN 'https://pnm.uni-mainz.de/ontology#identification_accepted' WHEN 'weak' THEN 'https://pnm.uni-mainz.de/ontology#identification_is_weak' WHEN 'rejected' THEN 'https://pnm.uni-mainz.de/ontology#identification_rejected' END) as status_iri FROM persons_attestations_xref LEFT JOIN attestations on persons_attestations_xref.attestations_id = attestations.attestations_id
subject map:
  template: https://pnm.uni-mainz.de/inscription/{inscriptions_id_short}#{attestations_id_short}_identity_statement_{persons_attestations_xref_id_id_short}
  class: identity statement
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: refers to
  object map:
    parent triples map: person map
    join condition:
      child: persons_id
      parent: persons_id
predicate object map:
  predicate: has reasoning
  object map:
    column: reasoning
predicate object map:
  predicate: P2 has type
  object map:
    column: status_iri
    term type: IRI
predicate object map:
  predicate: P3 has note
  object map:
    column: note

spellings attestations xref map
type: TriplesMap
logical table:
  sql query: SELECT spellings_attestations_xref.spellings_id as spellings_id, record_id_from_id(spellings_attestations_xref.spellings_id) as spellings_id_short, record_id_from_id(spellings_attestations_xref.attestations_id) as attestations_id_short, record_id_from_id(attestations.inscriptions_id) as inscriptions_id_short FROM spellings_attestations_xref left join attestations on (spellings_attestations_xref.attestations_id = attestations.attestations_id)
subject map:
  template: https://pnm.uni-mainz.de/inscription/{inscriptions_id_short}#{attestations_id_short}
predicate object map:
  predicate: has spelled personal name
  object map:
    parent triples map: spelling map
    join condition:
      child: spellings_id
      parent: spellings_id

titles att map
type: TriplesMap
logical table:
  sql query: SELECT titles_att.titles_id as titles_id, record_id_from_id(titles_att.titles_id) as titles_id_short, record_id_from_id(titles_att.attestations_id) as attestations_id_short, record_id_from_id(attestations.inscriptions_id) as inscriptions_id_short FROM titles_att left join attestations on (titles_att.attestations_id = attestations.attestations_id)
subject map:
  template: https://pnm.uni-mainz.de/inscription/{inscriptions_id_short}#{attestations_id_short}
predicate object map:
  predicate: has title
  object map:
    parent triples map: title map
    join condition:
      child: titles_id
      parent: titles_id

titles relations map
type: TriplesMap
logical table:
  sql query: SELECT subject_id, predicate, object_id, record_id_from_id(subject_id) as subject_id_short, (CASE predicate WHEN 'specificates' THEN 'https://pnm.uni-mainz.de/ontology#specificates' WHEN 'refers to' THEN 'https://pnm.uni-mainz.de/ontology#refers_to_title' WHEN 'is a variant of' THEN 'https://pnm.uni-mainz.de/ontology#is_a_variant_of' WHEN 'is the opposite gender form of' THEN 'https://pnm.uni-mainz.de/ontology#is_the_opposite_gender_form_of' END) as predicate_iri FROM title_relations
subject map:
  template: https://pnm.uni-mainz.de/title/{subject_id_short}
predicate object map:
  predicate map:
    column: predicate_iri
    term type: IRI
  object map:
    parent triples map: title map
    join condition:
      child: object_id
      parent: titles_id

ranke spelling map
type: TriplesMap
logical table:
  sql query: SELECT spellings_id, ranke, record_id_from_id(spellings_id) as spellings_id_short, record_id_from_id(personal_names_id) as personal_names_id_short FROM spellings WHERE NOT ISNULL(ranke)
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}#{spellings_id_short}_ranke
  class: E42 Identifier
predicate object map:
  predicate: label
  object map:
    column: ranke
predicate object map:
  predicate: P2 has type
  object: ranke

spelling usage map
type: TriplesMap
logical table:
  sql query: SELECT spellings_id, usage_area, usage_area_note, usage_period, usage_period_note, record_id_from_id(spellings_id) as spellings_id_short, record_id_from_id(personal_names_id) as personal_names_id_short FROM spellings WHERE NOT ISNULL(usage_area) OR NOT ISNULL(usage_period)
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}#{spellings_id_short}_usage
  class: usage
predicate object map:
  predicate: P175i starts after or with the start of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: usage_period
      parent: item_name
predicate object map:
  predicate: P184 ends before or with the end of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: usage_period
      parent: item_name
predicate object map:
  predicate: P7 took place at
  object map:
    parent triples map: place map
    join condition:
      child: usage_area
      parent: place_name
predicate object map:
  predicate: has usage period note
  object map:
    column: usage_period_note
predicate object map:
  predicate: has usage area note
  object map:
    column: usage_area_note

personal name form spelling map
type: TriplesMap
logical table:
  sql query: SELECT ranke, record_id_from_id(spellings_id) as spellings_id_short, record_id_from_id(personal_names_id) as personal_names_id_short FROM spellings
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}#form
predicate object map:
  predicate: has spelling
  object map:
    template: https://pnm.uni-mainz.de/name/{personal_names_id_short}#{spellings_id_short}
    term type: IRI

spelling map
type: TriplesMap
logical table:
  sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(spellings_id) as spellings_id_short, record_id_from_id(personal_names_id) as personal_names_id_short FROM spellings
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}#{spellings_id_short}
  class: spelling
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: label
  object map:
    column: spelling
predicate object map:
  predicate: P1 is identified by
  object map:
    parent triples map: ranke spelling map
    join condition:
      child: spellings_id
      parent: spellings_id
predicate object map:
  predicate: has spelling usage
  object map:
    parent triples map: spelling usage map
    join condition:
      child: spellings_id
      parent: spellings_id

personal name tla map
type: TriplesMap
logical table:
  sql query: SELECT personal_names_id, tla, record_id_from_id(personal_names_id) as personal_names_id_short FROM names_tla_temp
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}
predicate object map:
  predicate: closeMatch
  object map:
    template: http://aaew.bbaw.de/tla/servlet/GetWcnDetails
    term type: IRI

personal name agea map
type: TriplesMap
logical table:
  sql query: SELECT personal_names_id, agea, record_id_from_id(personal_names_id) as personal_names_id_short FROM names_agea_temp
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}
predicate object map:
  predicate: closeMatch
  object map:
    template: https://www.ifao.egnet.net/bases/agea/noms/
    term type: IRI

personal name usage map
type: TriplesMap
logical table:
  sql query: SELECT personal_names_id, usage_area, usage_area_note, usage_period, usage_period_note, record_id_from_id(personal_names_id) as personal_names_id_short, gender FROM personal_names WHERE NOT ISNULL(usage_area) OR NOT ISNULL(usage_period) OR NOT ISNULL (gender)
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}#usage
  class: usage
predicate object map:
  predicate: P175i starts after or with the start of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: usage_period
      parent: item_name
predicate object map:
  predicate: P184 ends before or with the end of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: usage_period
      parent: item_name
predicate object map:
  predicate: P7 took place at
  object map:
    parent triples map: place map
    join condition:
      child: usage_area
      parent: place_name
predicate object map:
  predicate: has usage period note
  object map:
    column: usage_period_note
predicate object map:
  predicate: has usage area note
  object map:
    column: usage_area_note
predicate object map:
  predicate: has usage gender
  object map:
    column: gender

ranke name map
type: TriplesMap
logical table:
  sql query: select personal_names.personal_names_id personal_names_id, record_id_from_id(personal_names.personal_names_id) personal_names_id_short, TRIM(SUBSTRING_INDEX(SUBSTRING_INDEX(personal_names.ranke, ';', numbers.n), ';', -1)) ranke from (select 1 n union select 2 union all select 3 union all select 4 union all SELECT 5 union all SELECT 6 union all SELECT 7 union all SELECT 8 union all SELECT 9 union all SELECT 10 union all SELECT 11 union all SELECT 12 union all SELECT 13 union all SELECT 14 union all SELECT 15 union all SELECT 16 union all SELECT 17 union all SELECT 18 union all SELECT 19 union all SELECT 20 union all SELECT 21 union all SELECT 22) numbers INNER JOIN personal_names on CHAR_LENGTH(personal_names.ranke) - CHAR_LENGTH(REPLACE(personal_names.ranke, ';', ''))>=numbers.n-1 order by personal_names_id, n
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}#ranke
  class: E42 Identifier
predicate object map:
  predicate: label
  object map:
    column: ranke
predicate object map:
  predicate: P2 has type
  object: ranke

scheele-schweitzer name map
type: TriplesMap
logical table:
  sql query: select personal_names.personal_names_id personal_names_id, record_id_from_id(personal_names.personal_names_id) personal_names_id_short, TRIM(SUBSTRING_INDEX(SUBSTRING_INDEX(personal_names.`scheele-schweitzer`, ';', numbers.n), ';', -1)) `scheele-schweitzer` from (select 1 n union select 2 union all select 3 union all select 4 union all SELECT 5 union all SELECT 6 union all SELECT 7 union all SELECT 8 union all SELECT 9 union all SELECT 10 union all SELECT 11 union all SELECT 12 union all SELECT 13 union all SELECT 14 union all SELECT 15 union all SELECT 16 union all SELECT 17 union all SELECT 18 union all SELECT 19 union all SELECT 20 union all SELECT 21 union all SELECT 22) numbers INNER JOIN personal_names on CHAR_LENGTH(personal_names.`scheele-schweitzer`) - CHAR_LENGTH(REPLACE(personal_names.`scheele-schweitzer`, ';', ''))>=numbers.n-1 order by personal_names_id, n
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}#scheele-schweitzer
  class: E42 Identifier
predicate object map:
  predicate: label
  object map:
    column: scheele-schweitzer
predicate object map:
  predicate: P2 has type
  object: scheele-schweitzer

personal name form map
type: TriplesMap
logical table:
  sql query: SELECT *, record_id_from_id(personal_names_id) as personal_names_id_short FROM personal_names
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}#form
  class: Form
predicate object map:
  predicate: Egyptological transliteration
  object map:
    column: personal_name

personal name concept
logical table:
  sql query: SELECT *, record_id_from_id(personal_names_id) as personal_names_id_short FROM personal_names where not isnull(translation_en) or not isnull(translation_de)
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}#concept
  class: Concept
predicate object map:
  predicate: definition
  object map:
    column: translation_de
    language: de
predicate object map:
  predicate: definition
  object map:
    column: translation_en
    language: en

personal name map
type: TriplesMap
logical table:
  sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(personal_names_id) as personal_names_id_short FROM personal_names
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}
  class: personal name
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: canonicalForm
  object map:
    parent triples map: personal name form map
    join condition:
      child: personal_names_id
      parent: personal_names_id
predicate object map:
  predicate: denotes
  object map:
    parent triples map: personal name concept
    join condition:
      child: personal_names_id
      parent: personal_names_id
predicate object map:
  predicate: P1 is identified by
  object map:
    parent triples map: ranke name map
    join condition:
      child: personal_names_id
      parent: personal_names_id
predicate object map:
  predicate: P1 is identified by
  object map:
    parent triples map: scheele-schweitzer name map
    join condition:
      child: personal_names_id
      parent: personal_names_id
predicate object map:
  predicate: has lexical entry usage
  object map:
    parent triples map: personal name usage map
    join condition:
      child: personal_names_id
      parent: personal_names_id
predicate object map:
  predicate: P3 has note
  object map:
    column: note

alternative reading map
type: TriplesMap
logical table:
  sql query: SELECT spellings.personal_names_id as personal_names_id, alternative_readings.personal_names_id as alt_reading, CAST(alternative_readings.date_created AS DATETIME) AS date_created_dt, CAST(alternative_readings.date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(alternative_readings.alternative_readings_id) as alternative_readings_id_short, record_id_from_id(spellings.personal_names_id) as personal_names_id_short, record_id_from_id(spellings.spellings_id) as spellings_id_short FROM alternative_readings LEFT JOIN spellings ON (alternative_readings.spellings_id = spellings.spellings_id)
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}#{spellings_id_short}_alternative_reading{alternative_readings_id_short}
  class: alternative reading
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: reads as
  object map:
    parent triples map: personal name form map
    join condition:
      child: alt_reading
      parent: personal_names_id

alternative reading map subj
type: TriplesMap
logical table:
  sql query: SELECT spellings.personal_names_id as personal_names_id, alternative_readings.personal_names_id as alt_reading, CAST(alternative_readings.date_created AS DATETIME) AS date_created_dt, CAST(alternative_readings.date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(alternative_readings.alternative_readings_id) as alternative_readings_id_short, record_id_from_id(spellings.personal_names_id) as personal_names_id_short, record_id_from_id(spellings.spellings_id) as spellings_id_short FROM alternative_readings LEFT JOIN spellings ON (alternative_readings.spellings_id = spellings.spellings_id)
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}#{spellings_id_short}
predicate object map:
  predicate: has alternative reading
  object map:
    template: https://pnm.uni-mainz.de/name/{personal_names_id_short}#{spellings_id_short}_alternative_reading{alternative_readings_id_short}

name type usage map
type: TriplesMap
logical table:
  sql query: SELECT name_types_id, usage_area, usage_area_note, usage_period, usage_period_note, record_id_from_id(name_types_id) as name_types_id_short FROM name_types WHERE NOT ISNULL(usage_area) OR NOT ISNULL(usage_period)
subject map:
  template: https://pnm.uni-mainz.de/type/{name_types_id_short}#usage
  class: usage
predicate object map:
  predicate: P184 ends before or with the end of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: usage_period
      parent: item_name
predicate object map:
  predicate: P175i starts after or with the start of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: usage_period
      parent: item_name
predicate object map:
  predicate: P7 took place at
  object map:
    parent triples map: place map
    join condition:
      child: usage_area
      parent: place_name
predicate object map:
  predicate: has usage period note
  object map:
    column: usage_period_note
predicate object map:
  predicate: has usage area note
  object map:
    column: usage_area_note

name type map
type: TriplesMap
logical table:
  sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(name_types_id) as name_types_id_short, (CASE category WHEN 'semantic' THEN 'https://pnm.uni-mainz.de/ontology#semantic_name_type' WHEN 'alternative' THEN 'https://pnm.uni-mainz.de/ontology#formal_name_type' END) as category_iri FROM name_types
subject map:
  template: https://pnm.uni-mainz.de/type/{name_types_id_short}
  class: name type
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: broader
  object map:
    parent triples map: name type map
    join condition:
      child: parent_id
      parent: name_types_id
predicate object map:
  predicate: label
  object map:
    column: title
predicate object map:
  predicate: P2 has type
  object map:
    column: category_iri
    term type: IRI
predicate object map:
  predicate: P3 has note
  object map:
    column: note
predicate object map:
  predicate: has name type usage
  object map:
    parent triples map: name type usage map
    join condition:
      child: name_types_id
      parent: name_types_id

criterion map
type: TriplesMap
logical table:
  sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(criteria_id) as criteria_id_short FROM criteria
subject map:
  template: https://pnm.uni-mainz.de/criterion/{criteria_id_short}
  class: criterion
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: prefLabel
  object map:
    column: title
predicate object map:
  predicate: comment
  object map:
    column: criterion
predicate object map:
  predicate: refers to place
  object map:
    parent triples map: place map
    join condition:
      child: production_place
      parent: place_name
predicate object map:
  predicate: refers to period
  object map:
    parent triples map: thesaurus map
    join condition:
      child: dating
      parent: item_name

name type xref map
type: TriplesMap
logical table:
  sql query: SELECT *, record_id_from_id(names_types_xref_id) names_types_xref_id_short, record_id_from_id(personal_names_id) personal_names_id_short, record_id_from_id(name_types_id) name_types_id_short FROM names_types_xref
subject map:
  template: https://pnm.uni-mainz.de/name/{personal_names_id_short}
predicate object map:
  predicate: has name type
  object map:
    parent triples map: name type map
    join condition:
      child: name_types_id
      parent: name_types_id

title tla map
type: TriplesMap
logical table:
  sql query: SELECT tla, record_id_from_id(titles_id) as titles_id_short FROM titles_tla_temp
subject map:
  template: https://pnm.uni-mainz.de/title/{titles_id_short}
predicate object map:
  predicate: closeMatch
  object map:
    template: http://aaew.bbaw.de/tla/servlet/GetWcnDetails
    term type: IRI

title usage map
type: TriplesMap
logical table:
  sql query: SELECT titles_id, usage_area, usage_area_note, usage_period, usage_period_note, record_id_from_id(titles_id) as titles_id_short, gender FROM titles WHERE NOT ISNULL(usage_area) OR NOT ISNULL(usage_period) OR NOT ISNULL (gender)
subject map:
  template: https://pnm.uni-mainz.de/title/{titles_id_short}#usage
  class: usage
predicate object map:
  predicate: P184 ends before or with the end of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: usage_period
      parent: item_name
predicate object map:
  predicate: P175i starts after or with the start of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: usage_period
      parent: item_name
predicate object map:
  predicate: P7 took place at
  object map:
    parent triples map: place map
    join condition:
      child: usage_area
      parent: place_name
predicate object map:
  predicate: has usage period note
  object map:
    column: usage_period_note
predicate object map:
  predicate: has usage area note
  object map:
    column: usage_area_note
predicate object map:
  predicate: has usage gender
  object map:
    column: gender

ayedi title map
type: TriplesMap
logical table:
  sql query: select titles.titles_id titles_id, record_id_from_id(titles.titles_id) titles_id_short, TRIM(SUBSTRING_INDEX(SUBSTRING_INDEX(titles.ayedi, ';', numbers.n), ';', -1)) ayedi from (select 1 n union select 2 union all select 3 union all select 4 union all SELECT 5 union all SELECT 6 union all SELECT 7 union all SELECT 8 union all SELECT 9 union all SELECT 10 union all SELECT 11 union all SELECT 12 union all SELECT 13 union all SELECT 14 union all SELECT 15 union all SELECT 16 union all SELECT 17 union all SELECT 18 union all SELECT 19 union all SELECT 20 union all SELECT 21 union all SELECT 22) numbers INNER JOIN titles on CHAR_LENGTH(titles.ayedi) - CHAR_LENGTH(REPLACE(titles.ayedi, ';', ''))>=numbers.n-1 order by titles_id, n
subject map:
  template: https://pnm.uni-mainz.de/title/{titles_id_short}#ayedi
  class: E42 Identifier
predicate object map:
  predicate: label
  object map:
    column: ayedi
predicate object map:
  predicate: P2 has type
  object: ayedi

taylor title map
type: TriplesMap
logical table:
  sql query: select titles.titles_id titles_id, record_id_from_id(titles.titles_id) titles_id_short, TRIM(SUBSTRING_INDEX(SUBSTRING_INDEX(titles.taylor, ';', numbers.n), ';', -1)) taylor from (select 1 n union select 2 union all select 3 union all select 4 union all SELECT 5 union all SELECT 6 union all SELECT 7 union all SELECT 8 union all SELECT 9 union all SELECT 10 union all SELECT 11 union all SELECT 12 union all SELECT 13 union all SELECT 14 union all SELECT 15 union all SELECT 16 union all SELECT 17 union all SELECT 18 union all SELECT 19 union all SELECT 20 union all SELECT 21 union all SELECT 22) numbers INNER JOIN titles on CHAR_LENGTH(titles.taylor) - CHAR_LENGTH(REPLACE(titles.taylor, ';', ''))>=numbers.n-1 order by titles_id, n
subject map:
  template: https://pnm.uni-mainz.de/title/{titles_id_short}#taylor
  class: E42 Identifier
predicate object map:
  predicate: label
  object map:
    column: taylor
predicate object map:
  predicate: P2 has type
  object: taylor

hannig title map
type: TriplesMap
logical table:
  sql query: select titles.titles_id titles_id, record_id_from_id(titles.titles_id) titles_id_short, TRIM(SUBSTRING_INDEX(SUBSTRING_INDEX(titles.hannig, ';', numbers.n), ';', -1)) hannig from (select 1 n union select 2 union all select 3 union all select 4 union all SELECT 5 union all SELECT 6 union all SELECT 7 union all SELECT 8 union all SELECT 9 union all SELECT 10 union all SELECT 11 union all SELECT 12 union all SELECT 13 union all SELECT 14 union all SELECT 15 union all SELECT 16 union all SELECT 17 union all SELECT 18 union all SELECT 19 union all SELECT 20 union all SELECT 21 union all SELECT 22) numbers INNER JOIN titles on CHAR_LENGTH(titles.hannig) - CHAR_LENGTH(REPLACE(titles.hannig, ';', ''))>=numbers.n-1 order by titles_id, n
subject map:
  template: https://pnm.uni-mainz.de/title/{titles_id_short}#hannig
  class: E42 Identifier
predicate object map:
  predicate: label
  object map:
    column: hannig
predicate object map:
  predicate: P2 has type
  object: hannig2

ward fischer map
type: TriplesMap
logical table:
  sql query: select titles.titles_id titles_id, record_id_from_id(titles.titles_id) titles_id_short, TRIM(SUBSTRING_INDEX(SUBSTRING_INDEX(titles.ward_fischer, ';', numbers.n), ';', -1)) ward_fischer from (select 1 n union select 2 union all select 3 union all select 4 union all SELECT 5 union all SELECT 6 union all SELECT 7 union all SELECT 8 union all SELECT 9 union all SELECT 10 union all SELECT 11 union all SELECT 12 union all SELECT 13 union all SELECT 14 union all SELECT 15 union all SELECT 16 union all SELECT 17 union all SELECT 18 union all SELECT 19 union all SELECT 20 union all SELECT 21 union all SELECT 22) numbers INNER JOIN titles on CHAR_LENGTH(titles.ward_fischer) - CHAR_LENGTH(REPLACE(titles.ward_fischer, ';', ''))>=numbers.n-1 order by titles_id, n
subject map:
  template: https://pnm.uni-mainz.de/title/{titles_id_short}#ward_fischer
  class: E42 Identifier
predicate object map:
  predicate: label
  object map:
    column: ward_fischer
predicate object map:
  predicate: P2 has type
  object: ward fischer

title form map
type: TriplesMap
logical table:
  sql query: SELECT titles_id, title, record_id_from_id(titles_id) as titles_id_short FROM titles
subject map:
  template: https://pnm.uni-mainz.de/title/{titles_id_short}#form
  class: Form
predicate object map:
  predicate: Egyptological transliteration
  object map:
    column: title

title concept
type: TriplesMap
logical table:
  sql query: SELECT *, record_id_from_id(titles_id) as titles_id_short FROM titles where not isnull(translation_en) or not isnull(translation_de)
subject map:
  template: https://pnm.uni-mainz.de/title/{titles_id_short}#concept
  class: Concept
predicate object map:
  predicate: definition
  object map:
    column: translation_de
    language: de
predicate object map:
  predicate: definition
  object map:
    column: translation_en
    language: en

title map
type: TriplesMap
logical table:
  sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(titles_id) as titles_id_short FROM titles
subject map:
  template: https://pnm.uni-mainz.de/title/{titles_id_short}
  class: title
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: canonicalForm
  object map:
    parent triples map: title form map
    join condition:
      child: titles_id
      parent: titles_id
predicate object map:
  predicate: denotes
  object map:
    parent triples map: title concept
    join condition:
      child: titles_id
      parent: titles_id
predicate object map:
  predicate: P1 is identified by
  object map:
    parent triples map: hannig title map
    join condition:
      child: titles_id
      parent: titles_id
predicate object map:
  predicate: P1 is identified by
  object map:
    parent triples map: ayedi title map
    join condition:
      child: titles_id
      parent: titles_id
predicate object map:
  predicate: P1 is identified by
  object map:
    parent triples map: taylor title map
    join condition:
      child: titles_id
      parent: titles_id
predicate object map:
  predicate: P1 is identified by
  object map:
    parent triples map: ward fischer map
    join condition:
      child: titles_id
      parent: titles_id
predicate object map:
  predicate: has lexical entry usage
  object map:
    parent triples map: title usage map
    join condition:
      child: titles_id
      parent: titles_id
predicate object map:
  predicate: P3 has note
  object map:
    column: note

bond map
type: TriplesMap
logical table:
  sql query: SELECT bonds_id, bonds.subject_id as subject_id,bonds.object_id as object_id,bonds.predicate as predicate, bonds.wording as wording, CAST(bonds.date_created AS DATETIME) AS date_created_dt, CAST(bonds.date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(bonds_id) as bonds_id_short, record_id_from_id(attestations.inscriptions_id) as inscriptions_id_short FROM bonds left join attestations ON (attestations.attestations_id = bonds.subject_id)
subject map:
  template: https://pnm.uni-mainz.de/inscription/{inscriptions_id_short}#bond_{bonds_id_short}
  class: attested bond
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: attested bond statement subject
  object map:
    parent triples map: attestation map
    join condition:
      child: subject_id
      parent: attestations_id
predicate object map:
  predicate: attested bond statement object
  object map:
    parent triples map: attestation map
    join condition:
      child: object_id
      parent: attestations_id
predicate object map:
  predicate: bond statement predicate
  object map:
    parent triples map: thesaurus map
    join condition:
      child: predicate
      parent: item_name
predicate object map:
  predicate: has wording
  object map:
    column: wording

person life map
type: TriplesMap
logical table:
  sql query: SELECT persons_id, dating, dating_note, region, region_note, record_id_from_id(persons_id) as persons_id_short FROM persons WHERE NOT ISNULL(dating) OR NOT ISNULL(region)
subject map:
  template: https://pnm.uni-mainz.de/person/{persons_id_short}#life
  class: life
predicate object map:
  predicate: P175i starts after or with the start of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: dating
      parent: item_name
predicate object map:
  predicate: P184 ends before or with the end of
  object map:
    parent triples map: thesaurus map
    join condition:
      child: dating
      parent: item_name
predicate object map:
  predicate: P7 took place at
  object map:
    parent triples map: place map
    join condition:
      child: region
      parent: place_name
predicate object map:
  predicate: has dating note
  object map:
    column: dating_note
predicate object map:
  predicate: has origin note
  object map:
    column: region_note

person map
type: TriplesMap
logical table:
  sql query: SELECT *, record_id_from_id(persons_id) as persons_id_short, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt FROM persons
subject map:
  template: https://pnm.uni-mainz.de/person/{persons_id_short}
  class: E21 Person
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: person gender
  object map:
    column: gender
predicate object map:
  predicate: person title string
  object map:
    column: title_string
predicate object map:
  predicate: person personal names
  object map:
    column: personal_name
predicate object map:
  predicate: lived
  object map:
    parent triples map: person life map
    join condition:
      child: persons_id
      parent: persons_id
predicate object map:
  predicate: P3 has note
  object map:
    column: note

persons bond map
type: TriplesMap
logical table:
  sql query: SELECT persons_bonds.subject_id as subject_id,persons_bonds.object_id as object_id,persons_bonds.predicate as predicate, CAST(persons_bonds.date_created AS DATETIME) AS date_created_dt, CAST(persons_bonds.date_changed AS DATETIME) AS date_changed_dt, record_id_from_id(persons_bonds_id) as persons_bonds_id_short, record_id_from_id(subject_id) as persons_id_short FROM persons_bonds
subject map:
  template: https://pnm.uni-mainz.de/person/{persons_id_short}#bond_{persons_bonds_id_short}
  class: persons bond
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: persons bond statement subject
  object map:
    parent triples map: person map
    join condition:
      child: subject_id
      parent: persons_id
predicate object map:
  predicate: persons bond statement object
  object map:
    parent triples map: person map
    join condition:
      child: object_id
      parent: persons_id
predicate object map:
  predicate: bond statement predicate
  object map:
    parent triples map: thesaurus map
    join condition:
      child: predicate
      parent: item_name

biblio refs prep
type: R2RMLView
sql query: SELECT *, CAST(date_created AS DATETIME) AS date_created_dt, CAST(date_changed AS DATETIME) AS date_changed_dt, (CASE table_id_from_id(object_id) WHEN 0 THEN 'thesaurus' WHEN 14 THEN 'criterion' WHEN 2 THEN 'publication' WHEN 4 THEN 'inscription' WHEN 23 THEN 'group' WHEN 20 THEN 'workshop' WHEN 21 THEN 'inscriptions_workshops_xref' WHEN 22 THEN 'place' WHEN 25 THEN 'inv_no' WHEN 26 THEN 'collection' WHEN 8 THEN 'attestation' WHEN 15 THEN 'spellings_attestations_xref' WHEN 1 THEN 'persons_attestations_xref' WHEN 27 THEN 'person' WHEN 28 THEN 'title_att' WHEN 5 THEN 'title' WHEN 29 THEN 'spelling' WHEN 9 THEN 'alternative_reading' WHEN 17 THEN 'name' WHEN 30 THEN 'type' WHEN 31 THEN 'names_types_xref' WHEN 24 THEN 'bond' WHEN 11 THEN 'persons_bond' WHEN 3 THEN 'title_relation' END) as object, IF ((reference_type LIKE 'cp%' OR reference_type LIKE '% cp,%' OR reference_type LIKE '% cp'), IF(NOT reference_type LIKE '%cp (i)%' AND NOT reference_type LIKE '%illegible%', 'https://pnm.uni-mainz.de/ontology#colour_photo','https://pnm.uni-mainz.de/ontology#poor_or_partial_colour_photo'),NULL) as colour_photo, IF ((reference_type LIKE 'bp%' OR reference_type LIKE '% bp,%' OR reference_type LIKE '% bp'), IF(NOT reference_type LIKE '%bp (i)%' AND NOT reference_type LIKE '%illegible%', 'https://pnm.uni-mainz.de/ontology#bw_photo','https://pnm.uni-mainz.de/ontology#poor_or_partial_bw_photo'),NULL) as bw_photo, IF ((reference_type LIKE 's%' OR reference_type LIKE '% s,%' OR reference_type LIKE '% s'), IF(NOT reference_type LIKE '%s (i)%', 'https://pnm.uni-mainz.de/ontology#sketch','https://pnm.uni-mainz.de/ontology#partial_sketch'),NULL) as sketch, IF ((reference_type LIKE 'h%' OR reference_type LIKE '% h,%' OR reference_type LIKE '% h'), IF(NOT reference_type LIKE '%h (i)%', 'https://pnm.uni-mainz.de/ontology#hieroglyphic_transcription','https://pnm.uni-mainz.de/ontology#partial_hieroglyphic_transcription'),NULL) as hieroglyphic_transcription, IF (reference_type LIKE 't%' OR refer…

biblio refs map
type: TriplesMap
logical table: biblio refs prep
subject map:
  template: https://pnm.uni-mainz.de/{object}/{object_id_short}#biblio_ref_{biblio_refs_id_short}
  class: biblio ref
predicate object map:
  predicate: created
  object map:
    column: date_created_dt
    datatype: dateTime
predicate object map:
  predicate: modified
  object map:
    column: date_changed_dt
    datatype: dateTime
predicate object map:
  predicate: document refers to
  object map:
    template: https://pnm.uni-mainz.de/{object}/{object_id_short}
predicate object map:
  predicate: has reference type
  object map:
    column: colour_photo
    term type: IRI
  object map:
    column: bw_photo
    term type: IRI
  object map:
    column: sketch
    term type: IRI
  object map:
    column: hieroglyphic_transcription
    term type: IRI
  object map:
    column: translation
    term type: IRI
  object map:
    column: description
    term type: IRI
  object map:
    column: mention
    term type: IRI
predicate object map:
  predicate: source
  object map:
    parent triples map: publications map
    join condition:
      child: source_id
      parent: publications_id
predicate object map:
  predicate: source
  object map:
    parent triples map: biblio refs source map
    join condition:
      child: biblio_refs_id
      parent: biblio_refs_id
predicate object map:
  predicate: reference location
  object map:
    column: pages
predicate object map:
  predicate: P3 has note
  object map:
    column: note

biblio refs source map
type: TriplesMap
logical table:
  sql query: SELECT *, record_id_from_id(biblio_refs_id) as biblio_refs_id_short, record_id_from_id(object_id) as object_id_short, (CASE table_id_from_id(object_id) WHEN 0 THEN 'thesaurus' WHEN 14 THEN 'criterion' WHEN 2 THEN 'publication' WHEN 4 THEN 'inscription' WHEN 23 THEN 'group' WHEN 20 THEN 'workshop' WHEN 21 THEN 'inscriptions_workshops_xref' WHEN 22 THEN 'place' WHEN 25 THEN 'inv_no' WHEN 26 THEN 'collection' WHEN 8 THEN 'attestation' WHEN 15 THEN 'spellings_attestations_xref' WHEN 1 THEN 'persons_attestations_xref' WHEN 27 THEN 'person' WHEN 28 THEN 'title_att' WHEN 5 THEN 'title' WHEN 29 THEN 'spelling' WHEN 9 THEN 'alternative_reading' WHEN 17 THEN 'name' WHEN 30 THEN 'type' WHEN 31 THEN 'names_types_xref' WHEN 24 THEN 'bond' WHEN 11 THEN 'persons_bond' WHEN 3 THEN 'title_relation' END) as object FROM biblio_refs WHERE not isnull(source_url) or not isnull(source_title)
subject map:
  template: https://pnm.uni-mainz.de/{object}/{object_id_short}#biblio_ref_{biblio_refs_id_short}_source
  class: E31 document
  class: BibliographicResource
predicate object map:
  predicate: sourceAccessedAt
  object map:
    column: source_url
predicate object map:
  predicate: title
  object map:
    column: source_title
predicate object map:
  predicate: sourceLastAccessedOn
  object map:
    column: accessed_on