Compare commits

...

2 commits

Author SHA1 Message Date
kempersc
38db05656a fix(ci): use Python virtual environment for PEP 668 compliance
Some checks failed
Deploy Frontend / build-and-deploy (push) Successful in 4m2s
DSPy RAG Evaluation / Layer 1 - Unit Tests (push) Failing after 9m53s
DSPy RAG Evaluation / Layer 3 - Integration Tests (push) Has been skipped
DSPy RAG Evaluation / Layer 2 - DSPy Module Tests (push) Has been skipped
DSPy RAG Evaluation / Layer 4 - Comprehensive Evaluation (push) Has been skipped
DSPy RAG Evaluation / Quality Gate (push) Failing after 1s
- Create venv at /opt/venv in each job
- Source venv/bin/activate before pip install and pytest commands
- Add python3-full package for complete venv support
- Fixes 'externally-managed-environment' error on Debian Bookworm
2026-01-13 12:54:41 +01:00
kempersc
c5fb9ec88e feat: add route for Entity Review page with lazy loading 2026-01-13 01:49:43 +01:00
197 changed files with 4821 additions and 269 deletions

View file

@ -41,6 +41,7 @@ on:
env:
SERVER_IP: '91.98.224.44'
SERVER_USER: 'root'
VENV_PATH: '/opt/venv'
jobs:
# ==========================================================================
@ -49,27 +50,30 @@ jobs:
unit-tests:
name: Layer 1 - Unit Tests
runs-on: ubuntu-latest
# Note: No container block - use default node:20-bookworm with Python installed via apt
timeout-minutes: 10
steps:
- uses: https://github.com/actions/checkout@v4
- name: Install Python
- name: Setup Python with virtual environment
run: |
apt-get update
apt-get install -y python3 python3-pip python3-venv
python3 --version
apt-get install -y python3 python3-pip python3-venv python3-full
python3 -m venv ${{ env.VENV_PATH }}
echo "Python version: $(python3 --version)"
echo "Venv created at ${{ env.VENV_PATH }}"
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -e ".[dev]"
python3 -m pip install rapidfuzz
source ${{ env.VENV_PATH }}/bin/activate
pip install --upgrade pip
pip install -e ".[dev]"
pip install rapidfuzz
- name: Run Layer 1 unit tests
run: |
python3 -m pytest tests/dspy_gitops/test_layer1_unit.py \
source ${{ env.VENV_PATH }}/bin/activate
python -m pytest tests/dspy_gitops/test_layer1_unit.py \
-v --tb=short \
--junit-xml=layer1-results.xml
@ -86,7 +90,6 @@ jobs:
dspy-module-tests:
name: Layer 2 - DSPy Module Tests
runs-on: ubuntu-latest
# Note: No container block - use default node:20-bookworm with Python installed via apt
timeout-minutes: 20
needs: unit-tests
@ -96,22 +99,25 @@ jobs:
steps:
- uses: https://github.com/actions/checkout@v4
- name: Install Python
- name: Setup Python with virtual environment
run: |
apt-get update
apt-get install -y python3 python3-pip python3-venv
apt-get install -y python3 python3-pip python3-venv python3-full
python3 -m venv ${{ env.VENV_PATH }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -e ".[dev]"
python3 -m pip install dspy-ai httpx rapidfuzz litellm
source ${{ env.VENV_PATH }}/bin/activate
pip install --upgrade pip
pip install -e ".[dev]"
pip install dspy-ai httpx rapidfuzz litellm
- name: Run Layer 2 DSPy tests
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
python3 -m pytest tests/dspy_gitops/test_layer2_dspy.py \
source ${{ env.VENV_PATH }}/bin/activate
python -m pytest tests/dspy_gitops/test_layer2_dspy.py \
-v --tb=short \
--junit-xml=layer2-results.xml
@ -128,23 +134,24 @@ jobs:
integration-tests:
name: Layer 3 - Integration Tests
runs-on: ubuntu-latest
# Note: No container block - use default node:20-bookworm with Python installed via apt
timeout-minutes: 15
needs: unit-tests
steps:
- uses: https://github.com/actions/checkout@v4
- name: Install system dependencies
- name: Setup Python with virtual environment
run: |
apt-get update
apt-get install -y openssh-client curl python3 python3-pip python3-venv
apt-get install -y openssh-client curl python3 python3-pip python3-venv python3-full
python3 -m venv ${{ env.VENV_PATH }}
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -e ".[dev]"
python3 -m pip install httpx pytest-asyncio
source ${{ env.VENV_PATH }}/bin/activate
pip install --upgrade pip
pip install -e ".[dev]"
pip install httpx pytest-asyncio
- name: Setup SSH for tunnel
run: |
@ -177,7 +184,8 @@ jobs:
OXIGRAPH_ENDPOINT: "http://127.0.0.1:7878"
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
python3 -m pytest tests/dspy_gitops/test_layer3_integration.py \
source ${{ env.VENV_PATH }}/bin/activate
python -m pytest tests/dspy_gitops/test_layer3_integration.py \
-v --tb=short \
--junit-xml=layer3-results.xml
@ -194,7 +202,6 @@ jobs:
comprehensive-eval:
name: Layer 4 - Comprehensive Evaluation
runs-on: ubuntu-latest
# Note: No container block - use default node:20-bookworm with Python installed via apt
timeout-minutes: 60
needs: [unit-tests, dspy-module-tests, integration-tests]
@ -204,16 +211,18 @@ jobs:
steps:
- uses: https://github.com/actions/checkout@v4
- name: Install system dependencies
- name: Setup Python with virtual environment
run: |
apt-get update
apt-get install -y openssh-client curl python3 python3-pip python3-venv
apt-get install -y openssh-client curl python3 python3-pip python3-venv python3-full
python3 -m venv ${{ env.VENV_PATH }}
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -e ".[dev]"
python3 -m pip install dspy-ai httpx rapidfuzz pandas pytest-json-report litellm
source ${{ env.VENV_PATH }}/bin/activate
pip install --upgrade pip
pip install -e ".[dev]"
pip install dspy-ai httpx rapidfuzz pandas pytest-json-report litellm
- name: Setup SSH for tunnel
run: |
@ -235,7 +244,8 @@ jobs:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
OXIGRAPH_ENDPOINT: "http://127.0.0.1:7878"
run: |
python3 -m pytest tests/dspy_gitops/test_layer4_comprehensive.py \
source ${{ env.VENV_PATH }}/bin/activate
python -m pytest tests/dspy_gitops/test_layer4_comprehensive.py \
-v --tb=short \
--junit-xml=layer4-results.xml \
--json-report \
@ -243,7 +253,8 @@ jobs:
- name: Generate metrics summary
run: |
python3 -c "
source ${{ env.VENV_PATH }}/bin/activate
python -c "
import json
from datetime import datetime
@ -319,4 +330,3 @@ jobs:
echo "============================================"
echo " All required quality gates passed!"
echo "============================================"

View file

@ -34,12 +34,44 @@ These properties express **semantic relationships** to external ontology terms:
| Property | SKOS Predicate | Meaning | Use When |
|----------|---------------|---------|----------|
| `exact_mappings` | `skos:exactMatch` | Identical meaning | Different ontology, same semantics |
| `close_mappings` | `skos:closeMatch` | Very similar meaning | Similar but not interchangeable |
| `exact_mappings` | `skos:exactMatch` | **IDENTICAL meaning** | Different ontology, **SAME semantics** (interchangeable) |
| `close_mappings` | `skos:closeMatch` | Very similar meaning | Similar but **NOT interchangeable** |
| `related_mappings` | `skos:relatedMatch` | Semantically related | Broader conceptual relationship |
| `narrow_mappings` | `skos:narrowMatch` | This is more specific | External term is broader |
| `broad_mappings` | `skos:broadMatch` | This is more general | External term is narrower |
### ⚠️ CRITICAL: `exact_mappings` Requires PRECISE Semantic Equivalence
**`exact_mappings` means the terms are INTERCHANGEABLE** - you could substitute one for the other in any context without changing meaning.
**Requirements for `exact_mappings`**:
1. **Same definition**: Both terms must have equivalent definitions
2. **Same scope**: Both terms cover the same set of instances
3. **Same constraints**: Same domain/range restrictions apply
4. **Bidirectional**: If A exactMatch B, then B exactMatch A
**DO NOT use `exact_mappings` when**:
- One term is a subset of the other (use `narrow_mappings`/`broad_mappings`)
- Terms are similar but have different scopes (use `close_mappings`)
- Terms are related but not equivalent (use `related_mappings`)
- You're uncertain about equivalence (default to `close_mappings`)
**Example - WRONG**:
```yaml
# PersonProfile is NOT equivalent to foaf:Person
# PersonProfile is a structured document ABOUT a person, not the person themselves
exact_mappings:
- foaf:Person # ❌ WRONG - different semantics!
```
**Example - CORRECT**:
```yaml
# foaf:Person and schema:Person ARE equivalent
# Both define "a person" with the same scope
exact_mappings:
- schema:Person # ✅ CORRECT - truly equivalent
```
---
## 3. Mapping Workflow: Ontology → LinkML

View file

@ -1,5 +1,5 @@
{
"generated": "2026-01-12T17:31:31.920Z",
"generated": "2026-01-13T00:48:37.685Z",
"schemaRoot": "/schemas/20251121/linkml",
"totalFiles": 2886,
"categoryCounts": {

View file

@ -21,7 +21,20 @@ default_range: string
classes:
AdmissionInfo:
description: Structured admission price information from Google Maps
description: >-
Structured admission price information from Google Maps including
price value and notes about additional fees or conditions.
Ontology mapping rationale:
- class_uri is schema:PriceSpecification because this represents
structured price information for museum/institution admission
- close_mappings includes schema:Offer for commercial offering context
- related_mappings includes schema:MonetaryAmount for price values
class_uri: schema:PriceSpecification
close_mappings:
- schema:Offer
related_mappings:
- schema:MonetaryAmount
attributes:
price:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
skos: http://www.w3.org/2004/02/skos/core#
imports:
- linkml:types
@ -21,7 +22,20 @@ default_range: string
classes:
AlternativeName:
description: Alternative name with language and source information
description: >-
Alternative name with language and source information, representing
a variant or translated form of an institution's name.
Ontology mapping rationale:
- class_uri is skos:altLabel because this represents an alternative
lexical label for a concept (the institution)
- exact_mappings includes schema:alternateName as both represent variant names
- related_mappings includes rdfs:label for general labeling context
class_uri: skos:altLabel
exact_mappings:
- schema:alternateName
related_mappings:
- rdfs:label
attributes:
name:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
rico: https://www.ica.org/standards/RiC/ontology#
imports:
- linkml:types
@ -21,7 +22,20 @@ default_range: string
classes:
ArchiveInfo:
description: Archive reference
description: >-
Archive reference containing basic information about an archival
institution including name, website, and ISIL identifier.
Ontology mapping rationale:
- class_uri is rico:Agent because archives are agents that create,
maintain, and provide access to records (RiC-O archival ontology)
- close_mappings includes schema:ArchiveOrganization for Schema.org alignment
- related_mappings includes prov:Agent for provenance agent role
class_uri: rico:Agent
close_mappings:
- schema:ArchiveOrganization
related_mappings:
- prov:Agent
attributes:
name:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
org: http://www.w3.org/ns/org#
imports:
- linkml:types
@ -21,7 +22,24 @@ default_range: string
classes:
CareerEntry:
description: Career history entry
description: >-
Career history entry representing a single job position in a person's employment history.
Contains job title, company, location, dates, duration, and description of the role.
This represents observed employment data extracted from a profile source.
Ontology mapping rationale:
- class_uri is org:Membership because this represents a relationship between a person
and an organization with a specific role, which is precisely what org:Membership models
- close_mappings includes schema:OrganizationRole as Schema.org's approach to
representing a person's role in an organization
- related_mappings includes org:Role (the abstract role) and prov:Entity (participates
in provenance chains as extracted data)
class_uri: org:Membership
close_mappings:
- schema:OrganizationRole
related_mappings:
- org:Role
- prov:Entity
attributes:
title:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
oa: http://www.w3.org/ns/oa#
dqv: http://www.w3.org/ns/dqv#
imports:
- linkml:types
@ -21,7 +23,23 @@ default_range: string
classes:
ChAnnotatorAnnotationMetadata:
description: Metadata about the annotation
description: >-
Metadata about the CH-Annotator annotation including confidence scores,
verification status, and quality metrics.
Ontology mapping rationale:
- class_uri is oa:Annotation because this represents metadata about an
annotation following the W3C Web Annotation Data Model.
- close_mappings includes dqv:QualityAnnotation because it captures
quality-related metadata (confidence, verification).
- related_mappings includes prov:Entity as the annotation metadata itself
is a provenance-tracked entity.
class_uri: oa:Annotation
close_mappings:
- dqv:QualityAnnotation
related_mappings:
- prov:Entity
- schema:Rating
attributes:
confidence_score:
range: float

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
oa: http://www.w3.org/ns/oa#
pav: http://purl.org/pav/
imports:
- linkml:types
@ -21,7 +23,22 @@ default_range: string
classes:
ChAnnotatorAnnotationProvenance:
description: Provenance for the annotation process
description: >-
Provenance information for the CH-Annotator annotation process,
tracking who/what created the annotation, when, and how.
Ontology mapping rationale:
- class_uri is prov:Activity because annotation is an activity that
generates annotations from source data.
- close_mappings includes pav:Authoring to capture the creative aspect
of annotation as an authoring process.
- related_mappings includes oa:Annotation as the target of this provenance.
class_uri: prov:Activity
close_mappings:
- pav:Authoring
related_mappings:
- oa:Annotation
- prov:Agent
attributes:
annotation_agent:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
oa: http://www.w3.org/ns/oa#
imports:
- linkml:types
@ -27,7 +28,24 @@ default_range: string
classes:
ChAnnotatorBlock:
description: CH-Annotator convention metadata and entity claims
description: >-
Container for CH-Annotator convention metadata and entity claims,
representing a complete annotation block following the CH-Annotator
convention (e.g., ch_annotator-v1_7_0).
Ontology mapping rationale:
- class_uri is prov:Collection because this aggregates multiple
annotation-related entities (claims, provenance, metadata).
- close_mappings includes oa:Annotation as it represents annotation
content following the Web Annotation model.
- related_mappings includes prov:Bundle as a related concept for
packaging provenance information.
class_uri: prov:Collection
close_mappings:
- oa:Annotation
related_mappings:
- prov:Bundle
- schema:Dataset
attributes:
convention_id:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
oa: http://www.w3.org/ns/oa#
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
imports:
- linkml:types
@ -23,7 +25,24 @@ default_range: string
classes:
ChAnnotatorEntityClaim:
description: Individual claim about an entity
description: >-
Individual claim about an entity extracted using CH-Annotator convention.
Each claim represents an assertion about an entity attribute with
associated provenance and confidence information.
Ontology mapping rationale:
- class_uri is rdf:Statement because a claim is fundamentally an
RDF-like statement (subject-predicate-object assertion).
- close_mappings includes oa:Annotation as claims are a form of
annotation body content.
- related_mappings includes prov:Entity as claims are provenance-tracked
entities themselves.
class_uri: rdf:Statement
close_mappings:
- oa:Annotation
related_mappings:
- prov:Entity
- schema:PropertyValue
attributes:
claim_type:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
skos: http://www.w3.org/2004/02/skos/core#
oa: http://www.w3.org/ns/oa#
imports:
- linkml:types
@ -23,7 +25,24 @@ default_range: string
classes:
ChAnnotatorEntityClassification:
description: Entity classification in CH-Annotator taxonomy
description: >-
Entity classification in the CH-Annotator taxonomy, capturing hypernym
types (GRP, AGT, TOP, etc.) and subtypes (GRP.HER.ARC, GRP.HER.MUS).
Maps entities to the GLAMORCUBESFIXPHDNT heritage custodian taxonomy.
Ontology mapping rationale:
- class_uri is skos:Concept because entity classification represents
a conceptual categorization within the CH-Annotator taxonomy.
- close_mappings includes oa:classifying as the annotation motivation
for classification activities.
- related_mappings includes prov:Entity and schema:CategoryCode as
related concepts for typed categorization.
class_uri: skos:Concept
close_mappings:
- oa:classifying
related_mappings:
- prov:Entity
- schema:CategoryCode
attributes:
hypernym:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
pav: http://purl.org/pav/
imports:
- linkml:types
@ -21,7 +22,22 @@ default_range: string
classes:
ChAnnotatorIntegrationNote:
description: Note about how the file was created/integrated
description: >-
Note about how a file was created or integrated into the dataset,
documenting the source file, creation method, and integration process.
Ontology mapping rationale:
- class_uri is prov:Derivation because integration notes describe how
data was derived from source files through transformation.
- close_mappings includes pav:importedFrom to capture the source-to-target
relationship in data integration.
- related_mappings includes prov:Activity as integration is an activity.
class_uri: prov:Derivation
close_mappings:
- pav:importedFrom
related_mappings:
- prov:Activity
- prov:Entity
attributes:
created_from:
range: string

View file

@ -21,7 +21,23 @@ default_range: string
classes:
ChAnnotatorModel:
description: Annotator model information
description: >-
Information about the annotator model used for CH-Annotator extraction,
including the model name (e.g., glm-4.5-flash), convention identifier,
and annotation timestamp.
Ontology mapping rationale:
- class_uri is prov:SoftwareAgent because the annotator model is a
software agent that performs annotation activities.
- close_mappings includes schema:SoftwareApplication as the model
is a software application.
- related_mappings includes prov:Agent as the broader agent concept.
class_uri: prov:SoftwareAgent
close_mappings:
- schema:SoftwareApplication
related_mappings:
- prov:Agent
- prov:Entity
attributes:
model:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
pav: http://purl.org/pav/
imports:
- linkml:types
@ -21,7 +22,24 @@ default_range: string
classes:
ChAnnotatorProvenance:
description: Provenance information for CH-Annotator extraction
description: >-
Provenance information for CH-Annotator extraction, tracking the
namespace, path/XPath to source data, timestamp, agent, and convention
used for extraction.
Ontology mapping rationale:
- class_uri is prov:Entity because provenance information is itself
an entity that can be referenced and tracked.
- close_mappings includes pav:SourceAccessedAt as it captures access
to source data during extraction.
- related_mappings includes prov:Generation as extraction generates
new data from sources.
class_uri: prov:Entity
close_mappings:
- pav:SourceAccessedAt
related_mappings:
- prov:Generation
- prov:Activity
attributes:
namespace:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
geo: http://www.w3.org/2003/01/geo/wgs84_pos#
imports:
- linkml:types
@ -21,7 +22,20 @@ default_range: string
classes:
CoordinateProvenance:
description: Provenance of coordinates
description: >-
Provenance of coordinates tracking the source, method, and metadata
for how geographic coordinates were obtained or resolved.
Ontology mapping rationale:
- class_uri is prov:Entity because this represents provenance metadata
about a coordinate value (the coordinate source as an entity)
- close_mappings includes geo:Point for the coordinate data aspect
- related_mappings includes prov:Activity for the resolution activity
class_uri: prov:Entity
close_mappings:
- geo:Point
related_mappings:
- prov:Activity
attributes:
source_type:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
geo: http://www.w3.org/2003/01/geo/wgs84_pos#
sf: http://www.opengis.net/ont/sf#
imports:
- linkml:types
@ -21,7 +23,24 @@ default_range: string
classes:
Coordinates:
description: Geographic coordinates
description: >-
Geographic coordinates representing a point location with latitude and longitude
(and optional precision). Used to locate heritage custodians, events, and other
geographically situated entities.
Ontology mapping rationale:
- class_uri is geo:Point from WGS84 vocabulary, the standard for representing
points on Earth with lat/long coordinates
- close_mappings includes sf:Point from OGC Simple Features as an alternative
geometry representation
- related_mappings includes geo:SpatialThing (superclass) and schema:GeoCoordinates
as Schema.org's coordinate representation
class_uri: geo:Point
close_mappings:
- sf:Point
related_mappings:
- geo:SpatialThing
- schema:GeoCoordinates
attributes:
latitude:
range: float

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
imports:
- linkml:types
@ -21,7 +22,20 @@ default_range: string
classes:
CustodianLegalNameClaim:
description: Legal name claim with provenance
description: >-
Legal name claim with provenance, representing an assertion about
an institution's official registered legal name with extraction metadata.
Ontology mapping rationale:
- class_uri is rdf:Statement because this represents a reified claim
(statement about a statement) with provenance metadata
- close_mappings includes prov:Entity as the claim itself is an entity
- related_mappings includes schema:legalName for the semantic content
class_uri: rdf:Statement
close_mappings:
- prov:Entity
related_mappings:
- schema:legalName
attributes:
claim_type:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
skos: http://www.w3.org/2004/02/skos/core#
imports:
- linkml:types
@ -25,7 +26,21 @@ default_range: string
classes:
CustodianNameConsensus:
description: Consensus determination of custodian name
description: >-
Consensus determination of custodian name aggregating evidence from multiple
sources with confidence scoring, including emic/standardized forms, alternative
names, and former names.
Ontology mapping rationale:
- class_uri is prov:Entity because this represents a derived data entity
resulting from consensus analysis across multiple sources
- close_mappings includes skos:Concept as it establishes a canonical naming
- related_mappings includes schema:name for the resulting name value
class_uri: prov:Entity
close_mappings:
- skos:Concept
related_mappings:
- schema:name
attributes:
claim_type:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
dqv: http://www.w3.org/ns/dqv#
imports:
- linkml:types
@ -21,7 +22,25 @@ default_range: string
classes:
DataTierSummary:
description: Summary of data tiers present in entry
description: >-
Summary of data quality tiers present in an entry. Lists fields
by tier: TIER_1_AUTHORITATIVE (registries), TIER_2_VERIFIED
(institutional sources), TIER_3_CROWD_SOURCED (Wikidata, OSM),
TIER_4_INFERRED (NLP-extracted).
Ontology mapping rationale:
- class_uri is dqv:QualityAnnotation from Data Quality Vocabulary
because this summarizes data quality levels across an entry
- close_mappings includes prov:Entity as the summary is itself
a traceable metadata entity
- related_mappings includes dqv:QualityMeasurement (quality metrics)
and schema:PropertyValue (tier assignments as property values)
class_uri: dqv:QualityAnnotation
close_mappings:
- prov:Entity
related_mappings:
- dqv:QualityMeasurement
- schema:PropertyValue
attributes:
TIER_1_AUTHORITATIVE:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
org: http://www.w3.org/ns/org#
crm: http://www.cidoc-crm.org/cidoc-crm/
imports:
- linkml:types
@ -21,7 +23,25 @@ default_range: string
classes:
EducationEntry:
description: Educational background entry
description: >-
Educational background entry representing a single educational credential or
period of study at an institution. Contains institution name, degree, field of
study, dates, and description. This represents observed educational data
extracted from a profile source.
Ontology mapping rationale:
- class_uri is org:Membership because education represents a temporal relationship
between a person and an educational institution (similar to employment)
- close_mappings includes schema:EducationalOccupationalCredential as Schema.org's
concept for educational credentials and qualifications
- related_mappings includes crm:E7_Activity (education is an activity with temporal
extent) and prov:Entity (participates in provenance chains)
class_uri: org:Membership
close_mappings:
- schema:EducationalOccupationalCredential
related_mappings:
- crm:E7_Activity
- prov:Entity
attributes:
institution:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
pav: http://purl.org/pav/
imports:
- linkml:types
@ -21,7 +22,24 @@ default_range: string
classes:
ExtractionSourceInfo:
description: Information about extraction source (can be structured or freeform)
description: >-
Information about extraction source (can be structured or freeform).
Documents the field extracted, the extracted text content, and
the method used for extraction (pattern matching, LLM, etc.).
Ontology mapping rationale:
- class_uri is prov:Entity because extraction source info is a
traceable entity recording what was extracted and how
- close_mappings includes pav:SourceAccessedAt as this documents
a source that was accessed during extraction
- related_mappings includes prov:Derivation (the extraction is
derived from source) and schema:PropertyValue (field/value pair)
class_uri: prov:Entity
close_mappings:
- pav:SourceAccessedAt
related_mappings:
- prov:Derivation
- schema:PropertyValue
attributes:
field:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
skos: http://www.w3.org/2004/02/skos/core#
org: http://www.w3.org/ns/org#
imports:
- linkml:types
@ -21,7 +23,20 @@ default_range: string
classes:
FormerName:
description: A former name of the institution with optional metadata
description: >-
A former name of the institution with optional temporal bounds and metadata,
representing historical naming that is no longer in official use.
Ontology mapping rationale:
- class_uri is skos:hiddenLabel because former names are historical labels
that are no longer preferred but should still be searchable
- close_mappings includes org:changedBy for organizational change context
- related_mappings includes schema:alternateName for variant name relationships
class_uri: skos:hiddenLabel
close_mappings:
- org:changedBy
related_mappings:
- schema:alternateName
attributes:
name:
range: string

View file

@ -25,7 +25,20 @@ default_range: string
classes:
GenealogiewerkbalkEnrichment:
description: Dutch genealogy archives registry data
description: >-
Dutch genealogy archives registry (Genealogiewerkbalk) data including
municipality, province, and associated archive information.
Ontology mapping rationale:
- class_uri is prov:Entity because this represents enrichment data
derived from the Dutch genealogy archives registry
- close_mappings includes schema:Dataset for registry data semantics
- related_mappings includes prov:PrimarySource for source registry
class_uri: prov:Entity
close_mappings:
- schema:Dataset
related_mappings:
- prov:PrimarySource
attributes:
source:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
dcterms: http://purl.org/dc/terms/
imports:
- linkml:types
@ -23,7 +24,25 @@ default_range: string
classes:
GhcidBlock:
description: GHCID generation metadata and history
description: >-
GHCID (Global Heritage Custodian Identifier) generation metadata
and history. Contains current GHCID string, UUID variants (v5, v8),
numeric form, generation timestamp, and history of GHCID changes
due to relocations, mergers, or collision resolution.
Ontology mapping rationale:
- class_uri is dcterms:Identifier because GHCID is fundamentally
an identifier assignment with associated metadata
- close_mappings includes prov:Entity as identifier blocks are
traceable provenance entities themselves
- related_mappings includes schema:PropertyValue (identifier as
property) and prov:Generation (identifier creation event)
class_uri: dcterms:Identifier
close_mappings:
- prov:Entity
related_mappings:
- schema:PropertyValue
- prov:Generation
attributes:
ghcid_current:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
dcterms: http://purl.org/dc/terms/
imports:
- linkml:types
@ -21,7 +22,21 @@ default_range: string
classes:
GhcidHistoryEntry:
description: Historical GHCID entry with validity period
description: >-
Historical GHCID entry with validity period tracking the evolution of
a Global Heritage Custodian Identifier over time, including reasons
for changes and supersession relationships.
Ontology mapping rationale:
- class_uri is prov:Entity because this represents a historical state
of an identifier entity with temporal validity bounds
- close_mappings includes dcterms:Identifier for identifier semantics
- related_mappings includes prov:Revision for versioning context
class_uri: prov:Entity
close_mappings:
- dcterms:Identifier
related_mappings:
- prov:Revision
attributes:
ghcid:
range: string

View file

@ -34,7 +34,28 @@ default_range: string
classes:
GoogleMapsEnrichment:
description: Full Google Maps Places API enrichment data
class_uri: prov:Entity
description: >-
Full Google Maps Places API enrichment data for a heritage custodian location.
prov:Entity - "An entity is a physical, digital, conceptual, or other kind of thing
with some fixed aspects; entities may be real or imaginary."
This class represents ENRICHMENT DATA extracted from Google Maps API about a place,
not the place itself. It captures metadata like ratings, reviews, photos, opening hours,
and address components that describe a heritage institution's physical location.
Mapping rationale:
- Uses prov:Entity because this is data derived from an external source (Google Maps API)
- The enrichment has clear provenance (API call, timestamp, place_id)
- NOT schema:Place - that would represent the actual location, not metadata about it
- Related to schema:Place as the subject being described
close_mappings:
- schema:PropertyValue # Similar: structured metadata about something
related_mappings:
- schema:Place # The subject this enrichment describes
- schema:LocalBusiness # Related: Google Maps often returns business data
- prov:Generation # The activity that created this enrichment
attributes:
place_id:
range: string
@ -281,9 +302,6 @@ classes:
alternate_address:
range: string
description: Alternative address for the location
note:
range: string
description: Additional notes about the Google Maps entry
wheelchair_accessible:
range: boolean
description: Whether the location is wheelchair accessible

View file

@ -27,7 +27,20 @@ default_range: string
classes:
GoogleMapsPlaywrightEnrichment:
description: Google Maps data extracted via Playwright browser automation
description: >-
Google Maps data extracted via Playwright browser automation including
place details, ratings, reviews, opening hours, photos, and popular times.
Ontology mapping rationale:
- class_uri is prov:Entity because this represents enrichment data
(an entity) derived from Google Maps via automated extraction
- close_mappings includes schema:Place for location/place semantics
- related_mappings includes schema:LocalBusiness for business attributes
class_uri: prov:Entity
close_mappings:
- schema:Place
related_mappings:
- schema:LocalBusiness
attributes:
scrape_timestamp:
range: datetime

View file

@ -21,7 +21,23 @@ default_range: string
classes:
GoogleReview:
description: Google Maps review
description: >-
Google Maps review for a heritage institution. Contains author
information, rating (1-5 stars), review text, and publication
timestamp. Used for crowd-sourced quality assessment data.
Ontology mapping rationale:
- class_uri is schema:Review which is the standard Schema.org
type for user reviews and ratings
- close_mappings includes schema:UserReview (specific review subtype)
- related_mappings includes prov:Entity (review as traceable data)
and schema:Rating (the numeric rating component)
class_uri: schema:Review
close_mappings:
- schema:UserReview
related_mappings:
- prov:Entity
- schema:Rating
attributes:
author_name:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
org: http://www.w3.org/ns/org#
imports:
- linkml:types
@ -21,7 +22,25 @@ default_range: string
classes:
HeritageExperienceEntry:
description: Heritage sector specific experience
description: >-
Heritage sector specific work experience entry. Contains job title,
company, relevance assessment, heritage institution type code
(A/L/M/etc.), and demonstrated skills. Used for assessing person
profiles' heritage sector relevance.
Ontology mapping rationale:
- class_uri is org:Membership because heritage experience represents
a person's membership/role within heritage organizations
- close_mappings includes schema:OrganizationRole for web semantics
compatibility with role-based employment modeling
- related_mappings includes prov:Entity (experience as traceable
data) and schema:Occupation (the occupation/role held)
class_uri: org:Membership
close_mappings:
- schema:OrganizationRole
related_mappings:
- prov:Entity
- schema:Occupation
attributes:
title:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
dcterms: http://purl.org/dc/terms/
imports:
- linkml:types
@ -21,7 +22,20 @@ default_range: string
classes:
IsilCodeEntry:
description: Structured ISIL code entry from Nationaal Archief
description: >-
Structured ISIL code entry from Nationaal Archief registry containing
the ISIL identifier, institution name, assignment date, and remarks.
Ontology mapping rationale:
- class_uri is dcterms:Identifier because ISIL is a standardized
identifier for libraries, archives, and similar institutions
- close_mappings includes schema:PropertyValue for structured identifier data
- related_mappings includes prov:Entity for provenance tracking
class_uri: dcterms:Identifier
close_mappings:
- schema:PropertyValue
related_mappings:
- prov:Entity
attributes:
code:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
dqv: http://www.w3.org/ns/dqv#
imports:
- linkml:types
@ -20,8 +21,21 @@ imports:
default_range: string
classes:
LLMVerification:
description: LLM-based verification results for enrichment data
LlmVerification:
description: >-
LLM-based verification results for enrichment data including match status,
confidence scores, entity type classification, and reasoning explanation.
Ontology mapping rationale:
- class_uri is dqv:QualityMeasurement because this represents a quality
assessment/verification measurement of enrichment data
- close_mappings includes prov:Activity for the verification activity
- related_mappings includes prov:SoftwareAgent for the LLM agent
class_uri: dqv:QualityMeasurement
close_mappings:
- prov:Activity
related_mappings:
- prov:SoftwareAgent
attributes:
is_match:
range: boolean

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
geo: http://www.w3.org/2003/01/geo/wgs84_pos#
imports:
- linkml:types
@ -24,7 +25,26 @@ default_range: string
classes:
LocationResolution:
description: Method and result of settlement resolution
description: >-
Method and result of settlement resolution for GHCID generation.
Records how a location was resolved from source data (coordinates,
place names, addresses) to a standardized settlement using GeoNames
or other authoritative geographic databases.
Ontology mapping rationale:
- class_uri is prov:Location because this class represents the result
of resolving/identifying a geographic location, which PROV-O defines
as "an identifiable geographic place" with various expression methods
- close_mappings includes geo:SpatialThing because the resolution
produces spatial extent information (coordinates, feature codes)
- related_mappings includes schema:Place (general place concept) and
prov:Entity (the resolution result is a traceable entity)
class_uri: prov:Location
close_mappings:
- geo:SpatialThing
related_mappings:
- schema:Place
- prov:Entity
attributes:
method:
range: LocationResolutionMethodEnum
@ -128,10 +148,7 @@ classes:
description: Whether micro-hamlet was skipped in favor of larger settlement
note:
range: string
description: Additional note about the resolution
note:
range: string
description: Additional notes about the resolution (alternative key)
description: Additional notes about the resolution
text_source:
range: string
description: Text source for fallback resolution (e.g., 'various')

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
skos: http://www.w3.org/2004/02/skos/core#
imports:
- linkml:types
@ -21,7 +22,24 @@ default_range: string
classes:
MatchingSource:
description: Source that contributed to name consensus
description: >-
Source that contributed to name consensus during entity resolution.
Records the source identifier, the name variant from that source,
and a match score indicating confidence in the match.
Ontology mapping rationale:
- class_uri is prov:Entity because matching sources are traceable
entities that contribute to entity resolution decisions
- close_mappings includes skos:mappingRelation as matching sources
establish relationships between name variants across sources
- related_mappings includes prov:PrimarySource (sources of evidence)
and schema:PropertyValue (source/name/score as property values)
class_uri: prov:Entity
close_mappings:
- skos:mappingRelation
related_mappings:
- prov:PrimarySource
- schema:PropertyValue
attributes:
source:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
crm: http://www.cidoc-crm.org/cidoc-crm/
imports:
- linkml:types
@ -21,7 +22,24 @@ default_range: string
classes:
MowInscription:
description: Memory of the World inscription reference
description: >-
UNESCO Memory of the World (MoW) inscription reference. Contains
Wikidata ID, inscription name/title, and associated country code.
MoW inscriptions recognize documentary heritage of world significance.
Ontology mapping rationale:
- class_uri is crm:E73_Information_Object from CIDOC-CRM because
MoW inscriptions are information objects about documentary heritage
- close_mappings includes schema:CreativeWork as inscriptions
document creative/documentary works of heritage value
- related_mappings includes prov:Entity (inscription reference as
data) and crm:E31_Document (documentary heritage concept)
class_uri: crm:E73_Information_Object
close_mappings:
- schema:CreativeWork
related_mappings:
- prov:Entity
- crm:E31_Document
attributes:
wikidata_id:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
locn: http://www.w3.org/ns/locn#
imports:
- linkml:types
@ -21,7 +22,20 @@ default_range: string
classes:
MunicipalityInfo:
description: Municipality information
description: >-
Municipality information representing an administrative division
with name and code (e.g., CBS municipality code in the Netherlands).
Ontology mapping rationale:
- class_uri is locn:AdminUnit because this represents an
administrative territorial unit (municipality level)
- close_mappings includes schema:AdministrativeArea for general admin areas
- related_mappings includes schema:Place for location aspects
class_uri: locn:AdminUnit
close_mappings:
- schema:AdministrativeArea
related_mappings:
- schema:Place
attributes:
name:
range: string

View file

@ -22,7 +22,20 @@ default_range: string
classes:
MuseumRegisterEnrichment:
description: Dutch Museum Register (Museumregister Nederland) data
description: >-
Dutch Museum Register (Museumregister Nederland) data including
registration status, museum type, collection focus, and visitor statistics.
Ontology mapping rationale:
- class_uri is prov:Entity because this represents enrichment data
derived from the Dutch Museum Register authority
- close_mappings includes schema:Museum for museum-specific semantics
- related_mappings includes prov:PrimarySource for authoritative registry
class_uri: prov:Entity
close_mappings:
- schema:Museum
related_mappings:
- prov:PrimarySource
attributes:
museum_name:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
pav: http://purl.org/pav/
imports:
- linkml:types
@ -21,7 +22,20 @@ default_range: string
classes:
MuseumRegisterProvenance:
description: Provenance metadata for museum register enrichment
description: >-
Provenance metadata for museum register enrichment including source file,
URL, scrape timestamp, and page number in the registry.
Ontology mapping rationale:
- class_uri is prov:Entity because this represents provenance metadata
about the museum register data source
- close_mappings includes pav:RetrievedFrom for web retrieval provenance
- related_mappings includes prov:PrimarySource for source registry
class_uri: prov:Entity
close_mappings:
- pav:RetrievedFrom
related_mappings:
- prov:PrimarySource
attributes:
source_file:
range: string

View file

@ -24,7 +24,20 @@ default_range: string
classes:
NanIsilEnrichment:
description: Nationaal Archief ISIL registry match
description: >-
Nationaal Archief ISIL registry match containing ISIL codes, institution
names, assignment dates, and matching metadata from the Dutch National Archive.
Ontology mapping rationale:
- class_uri is prov:Entity because this represents enrichment data
derived from the Nationaal Archief ISIL registry (authoritative source)
- close_mappings includes dcterms:Identifier for ISIL identifier semantics
- related_mappings includes prov:PrimarySource for authoritative registry
class_uri: prov:Entity
close_mappings:
- dcterms:Identifier
related_mappings:
- prov:PrimarySource
attributes:
source:
range: string
@ -73,10 +86,7 @@ classes:
description: Remarks
note:
range: string
description: Additional note about this enrichment
note:
range: string
description: Additional notes about this enrichment (alternative key)
description: Additional notes about this enrichment
nan_plaats:
range: string
description: City/place from Nationaal Archief

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
locn: http://www.w3.org/ns/locn#
geo: http://www.w3.org/2003/01/geo/wgs84_pos#
imports:
- linkml:types
@ -23,7 +25,20 @@ default_range: string
classes:
NormalizedLocation:
description: Normalized geographic location
description: >-
Normalized geographic location with standardized address components,
coordinates, and GeoNames integration for consistent place identification.
Ontology mapping rationale:
- class_uri is locn:Address because this represents a normalized,
structured geographic address with standardized components
- exact_mappings includes schema:Place as both represent physical locations
- close_mappings includes geo:SpatialThing for coordinate-based aspects
class_uri: locn:Address
exact_mappings:
- schema:Place
close_mappings:
- geo:SpatialThing
attributes:
latitude:
range: float

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
time: http://www.w3.org/2006/time#
imports:
- linkml:types
@ -22,7 +23,24 @@ default_range: string
classes:
OpeningHours:
description: Business opening hours
description: >-
Business opening hours for heritage institutions. Contains current
open/closed status, structured opening periods by day, and human-
readable weekday text descriptions.
Ontology mapping rationale:
- class_uri is schema:OpeningHoursSpecification which is the
standard Schema.org type for structured opening hours
- close_mappings includes time:TemporalEntity from OWL-Time as
opening hours define temporal availability
- related_mappings includes prov:Entity (opening hours as data)
and schema:Place (opening hours belong to places)
class_uri: schema:OpeningHoursSpecification
close_mappings:
- time:TemporalEntity
related_mappings:
- prov:Entity
- schema:Place
attributes:
open_now:
range: boolean

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
time: http://www.w3.org/2006/time#
imports:
- linkml:types
@ -22,7 +23,20 @@ default_range: string
classes:
OpeningPeriod:
description: Single opening period
description: >-
Single opening period representing a time window when an institution is
accessible, defined by open and close TimeSlot values.
Ontology mapping rationale:
- class_uri is schema:OpeningHoursSpecification because this class represents
structured opening hours data with open/close times
- exact_mappings includes time:Interval as both represent bounded time periods
- related_mappings includes schema:Schedule for broader scheduling context
class_uri: schema:OpeningHoursSpecification
exact_mappings:
- time:Interval
related_mappings:
- schema:Schedule
attributes:
open:
range: TimeSlot

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
org: http://www.w3.org/ns/org#
imports:
- linkml:types
@ -21,7 +22,24 @@ default_range: string
classes:
OrganizationalChange:
description: Organizational change record (closure, merger, etc.)
description: >-
Organizational change record documenting closures, mergers, renames,
and other lifecycle events. Includes change type, confirmation status,
source documentation, dates, and successor organization details.
Ontology mapping rationale:
- class_uri is org:ChangeEvent from W3C Organization Ontology which
specifically models organizational change events
- close_mappings includes prov:Activity as changes are activities
that transform organizations over time
- related_mappings includes schema:Event (general event concept) and
prov:Entity (change record as traceable data)
class_uri: org:ChangeEvent
close_mappings:
- prov:Activity
related_mappings:
- schema:Event
- prov:Entity
attributes:
change_type:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
dcat: http://www.w3.org/ns/dcat#
imports:
- linkml:types
@ -31,7 +32,23 @@ default_range: string
classes:
OriginalEntry:
description: Source registry data from NDE CSV or CH-Annotator
description: >-
Source registry data from NDE CSV or CH-Annotator extraction,
preserving original field names and values as imported from the
source system. This is the raw data before normalization.
Ontology mapping rationale:
- class_uri is prov:PrimarySource because original entries represent
authoritative source records before transformation.
- close_mappings includes dcat:Dataset as source entries form a
dataset of registry records.
- related_mappings includes prov:Entity for provenance tracking.
class_uri: prov:PrimarySource
close_mappings:
- dcat:Dataset
related_mappings:
- prov:Entity
- schema:DataCatalog
attributes:
unnamed_field:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
geo: http://www.w3.org/2003/01/geo/wgs84_pos#
imports:
- linkml:types
@ -21,7 +22,22 @@ default_range: string
classes:
OriginalEntryCoordinates:
description: Coordinates from original source entry
description: >-
Geographic coordinates from an original source entry, supporting
both lat/lon and latitude/longitude field naming conventions.
Ontology mapping rationale:
- class_uri is geo:Point from W3C WGS84 because coordinates
represent a geographic point.
- close_mappings includes schema:GeoCoordinates as the Schema.org
equivalent for coordinate data.
- related_mappings includes prov:Entity and geo:SpatialThing.
class_uri: geo:Point
close_mappings:
- schema:GeoCoordinates
related_mappings:
- prov:Entity
- geo:SpatialThing
attributes:
lat:
range: float

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
dcterms: http://purl.org/dc/terms/
imports:
- linkml:types
@ -21,7 +22,22 @@ default_range: string
classes:
OriginalEntryIdentifier:
description: Identifier from original source entry
description: >-
Identifier from an original source entry, supporting ISIL, Website,
Sigla, VIAF, GND, LCNAF and other identifier schemes.
Ontology mapping rationale:
- class_uri is dcterms:Identifier because this represents a formal
identifier with scheme and value.
- close_mappings includes schema:PropertyValue as identifiers are
property-value pairs.
- related_mappings includes prov:Entity for provenance tracking.
class_uri: dcterms:Identifier
close_mappings:
- schema:PropertyValue
related_mappings:
- prov:Entity
- schema:identifier
attributes:
identifier_scheme:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
dcterms: http://purl.org/dc/terms/
imports:
- linkml:types
@ -21,8 +22,24 @@ default_range: string
classes:
OriginalEntryIdentifiersDict:
description: Dictionary-format identifiers from original source (used by Palestinian
heritage extraction)
description: >-
Dictionary-format identifiers from original source, used by Palestinian
heritage extraction. Contains named identifier fields (VIAF, GND,
LCNAF, GeoNames, Wikidata, ISIL, Website) as direct properties.
Ontology mapping rationale:
- class_uri is prov:Entity because the identifier collection is a
trackable entity containing multiple identifier values.
- close_mappings includes schema:PropertyValueSpecification as this
defines a structure of named identifier properties.
- related_mappings includes dcterms:Identifier for the individual
identifier semantics.
class_uri: prov:Entity
close_mappings:
- schema:PropertyValueSpecification
related_mappings:
- dcterms:Identifier
- schema:PropertyValue
attributes:
viaf:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
locn: http://www.w3.org/ns/locn#
imports:
- linkml:types
@ -21,7 +22,22 @@ default_range: string
classes:
OriginalEntryLocation:
description: Location from original source entry
description: >-
Location from an original source entry including city, region, country,
postal code, street address, coordinates, and GeoNames ID.
Ontology mapping rationale:
- class_uri is schema:Place because this represents a geographic
place with address and coordinate information.
- close_mappings includes locn:Address from W3C Locn vocabulary
for structured address information.
- related_mappings includes prov:Location and geo:SpatialThing.
class_uri: schema:Place
close_mappings:
- locn:Address
related_mappings:
- prov:Location
- geo:SpatialThing
attributes:
city:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
wikibase: http://wikiba.se/ontology#
imports:
- linkml:types
@ -21,7 +22,22 @@ default_range: string
classes:
OriginalEntryWikidata:
description: Wikidata reference from original source
description: >-
Wikidata reference from an original source entry, including the
Q-number ID, URL, multilingual labels, and descriptions.
Ontology mapping rationale:
- class_uri is wikibase:Item because this represents a reference
to a Wikidata item (Q-number entity).
- close_mappings includes schema:Thing as Wikidata items are
general entities with identifiers.
- related_mappings includes prov:Entity for tracking.
class_uri: wikibase:Item
close_mappings:
- schema:Thing
related_mappings:
- prov:Entity
- skos:Concept
attributes:
id:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
foaf: http://xmlns.com/foaf/0.1/
pico: https://personsincontext.org/model#
imports:
- linkml:types
@ -25,7 +27,27 @@ default_range: string
classes:
PersonProfile:
description: Complete profile data for a person (heritage professional)
class_uri: foaf:PersonalProfileDocument
description: >-
Complete profile data for a person (heritage professional).
foaf:PersonalProfileDocument - "A personal profile RDF document."
This class represents a DOCUMENT containing profile information about a person,
not the person themselves. It captures structured data extracted from LinkedIn
profiles, staff pages, and other web sources about heritage professionals.
Mapping rationale:
- Uses foaf:PersonalProfileDocument because this is a structured document ABOUT a person
- NOT foaf:Person/schema:Person - those represent the actual person entity
- Related to pico:PersonObservation which captures person data from historical sources
close_mappings:
- pico:PersonObservation # Similar: person data from a source, but PiCo is for historical records
- schema:ProfilePage # Similar: a web page serving as profile, but our class is data not page
related_mappings:
- foaf:Person # The subject of this profile document
- schema:Person # The subject of this profile document
- prov:Entity # A profile is an entity with provenance
attributes:
exa_search_metadata:
range: ExaSearchMetadata

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
dcterms: http://purl.org/dc/terms/
imports:
- linkml:types
@ -21,7 +22,24 @@ default_range: string
classes:
PhotoAttribution:
description: Photo author attribution
description: >-
Photo author attribution containing display name, author URI,
and photo URI. Used for crediting photographers in Google Maps
and other image sources.
Ontology mapping rationale:
- class_uri is schema:ImageObject because this class describes
image attribution which relates to image objects
- close_mappings includes dcterms:RightsStatement as attribution
is a form of rights/credit statement
- related_mappings includes prov:Attribution (provenance attribution)
and schema:Person (the attributed author)
class_uri: schema:ImageObject
close_mappings:
- dcterms:RightsStatement
related_mappings:
- prov:Attribution
- schema:Person
attributes:
displayName:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
pav: http://purl.org/pav/
imports:
- linkml:types
@ -21,7 +22,20 @@ default_range: string
classes:
PlatformSourceReference:
description: Structured source reference for a digital platform
description: >-
Structured source reference for a digital platform including URL,
fetch timestamp, and list of data fields extracted from that source.
Ontology mapping rationale:
- class_uri is prov:PrimarySource because this represents a source
reference with provenance metadata for platform data extraction
- close_mappings includes pav:RetrievedFrom for web retrieval context
- related_mappings includes schema:WebPage for web platform references
class_uri: prov:PrimarySource
close_mappings:
- pav:RetrievedFrom
related_mappings:
- schema:WebPage
attributes:
url:
range: uri

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
pico: https://w3id.org/pico/
foaf: http://xmlns.com/foaf/0.1/
imports:
- linkml:types
@ -28,7 +30,26 @@ default_range: string
classes:
ProfileData:
description: Core profile information for a person
description: >-
Core profile information for a person, containing extracted biographical data
such as name, career history, education, skills, and professional summary.
This represents observed/extracted data ABOUT a person from a source document
(e.g., LinkedIn profile), not the person entity itself.
Ontology mapping rationale:
- class_uri is pico:PersonObservation because this represents observed biographical
data extracted from a source, following the PiCo pattern of separating observations
from person reconstructions
- close_mappings includes foaf:PersonalProfileDocument as this is essentially
profile document content (though not RDF-specific)
- related_mappings includes schema:Person because the data describes a person,
and prov:Entity because the profile data participates in provenance chains
class_uri: pico:PersonObservation
close_mappings:
- foaf:PersonalProfileDocument
related_mappings:
- schema:Person
- prov:Entity
attributes:
full_name:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
pav: http://purl.org/pav/
imports:
- linkml:types
@ -24,8 +25,25 @@ default_range: string
classes:
ProvenanceBlock:
description: Complete provenance tracking for the entry (supports both nested and
flat formats)
description: >-
Complete provenance tracking for the entry, supporting both nested and flat formats.
Contains information about data sources, extraction methods, timestamps, confidence
scores, and verification status. This is the primary class for documenting the
lineage and quality of data in custodian records.
Ontology mapping rationale:
- class_uri is prov:Bundle because this represents a named set of provenance
descriptions bundled together - it's provenance ABOUT provenance/data
- close_mappings includes pav:Provenance conceptually as PAV's approach to
tracking authoring and versioning provenance
- related_mappings includes prov:Entity (the bundle is itself an entity) and
prov:Activity (extraction/enrichment are activities with timestamps)
class_uri: prov:Bundle
close_mappings:
- pav:Provenance
related_mappings:
- prov:Entity
- prov:Activity
attributes:
schema_version:
range: string

View file

@ -23,7 +23,21 @@ default_range: string
classes:
ProvenanceSources:
description: Sources organized by type
description: >-
Sources organized by type, aggregating multiple source records from different
data providers (Google Maps, Wikidata, web archives, etc.) with data tier
classification (TIER_1 through TIER_4).
Ontology mapping rationale:
- class_uri is prov:Collection because this aggregates multiple provenance
sources into a typed collection structure
- close_mappings includes prov:Bundle as it groups related provenance records
- related_mappings includes schema:ItemList for list-based organization
class_uri: prov:Collection
close_mappings:
- prov:Bundle
related_mappings:
- schema:ItemList
attributes:
original_entry:
range: SourceRecord

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
locn: http://www.w3.org/ns/locn#
imports:
- linkml:types
@ -21,7 +22,24 @@ default_range: string
classes:
ProvinceInfo:
description: Province information
description: >-
Province/region administrative information containing name and
ISO 3166-2 subdivision code. Used for administrative region
identification in location resolution and GHCID generation.
Ontology mapping rationale:
- class_uri is locn:AdminUnit from ISA Location Core Vocabulary
which specifically models administrative territorial units
- close_mappings includes schema:AdministrativeArea for web
semantics compatibility
- related_mappings includes prov:Entity (province info as data)
and schema:Place (provinces are geographic places)
class_uri: locn:AdminUnit
close_mappings:
- schema:AdministrativeArea
related_mappings:
- prov:Entity
- schema:Place
attributes:
name:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
pav: http://purl.org/pav/
imports:
- linkml:types
@ -21,7 +22,22 @@ default_range: string
classes:
RawSource:
description: Raw source information for web enrichment
description: >-
Raw source information for web enrichment including URL, fetch timestamp,
HTTP status, content hash, and extracted highlights from search results.
Ontology mapping rationale:
- class_uri is prov:PrimarySource because this represents the original
source material fetched from the web with full provenance metadata
- close_mappings includes pav:RetrievedFrom for web retrieval provenance
- close_mappings includes schema:WebPage as it captures web page data
- related_mappings includes prov:Entity for general provenance entity
class_uri: prov:PrimarySource
close_mappings:
- pav:RetrievedFrom
- schema:WebPage
related_mappings:
- prov:Entity
attributes:
source_id:
range: string

View file

@ -21,7 +21,20 @@ default_range: string
classes:
RelatedPlace:
description: A related place from Google Maps
description: >-
A related place from Google Maps representing nearby or associated
locations with ratings and review information.
Ontology mapping rationale:
- class_uri is schema:Place because this represents a physical place
with associated review/rating metadata from Google Maps
- close_mappings includes schema:LocalBusiness for commercial place aspects
- related_mappings includes schema:Review for rating/review data
class_uri: schema:Place
close_mappings:
- schema:LocalBusiness
related_mappings:
- schema:Review
attributes:
name:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
cito: http://purl.org/spar/cito/
imports:
- linkml:types
@ -22,7 +23,25 @@ default_range: string
classes:
ResearchSource:
description: A research source consulted during location resolution
description: >-
A research source consulted during location resolution or other
investigative processes. Records the type of source (Wikidata,
web archive, official documents), identifiers, URLs, and any
structured data obtained from consultation.
Ontology mapping rationale:
- class_uri is prov:PrimarySource because research sources are
primary sources of information consulted during resolution
- close_mappings includes cito:CitationAct as consulting a source
is similar to citing it for evidence
- related_mappings includes schema:CreativeWork (sources are works)
and prov:Entity (sources are traceable entities)
class_uri: prov:PrimarySource
close_mappings:
- cito:CitationAct
related_mappings:
- schema:CreativeWork
- prov:Entity
attributes:
type:
range: string
@ -37,9 +56,6 @@ classes:
note:
range: string
description: Additional notes about this source
note:
range: string
description: Additional note about this source (singular alias for notes)
id:
range: string
description: Identifier for the source (e.g., Wikidata Q-number)

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
geo: http://www.w3.org/2003/01/geo/wgs84_pos#
imports:
- linkml:types
@ -21,7 +22,20 @@ default_range: string
classes:
SourceCoordinates:
description: Source of coordinates for resolution
description: >-
Source of coordinates for geographic resolution, combining latitude/longitude
values with the data source that provided them (e.g., google_maps, wikidata).
Ontology mapping rationale:
- class_uri is geo:Point because this represents a geographic point with
lat/lon coordinates
- exact_mappings includes schema:GeoCoordinates as both represent coordinate pairs
- close_mappings includes prov:Location for provenance-aware location data
class_uri: geo:Point
exact_mappings:
- schema:GeoCoordinates
close_mappings:
- prov:Location
attributes:
latitude:
range: float

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
pav: http://purl.org/pav/
imports:
- linkml:types
@ -21,7 +22,20 @@ default_range: string
classes:
SourceProvenance:
description: Detailed provenance information about a source
description: >-
Detailed provenance information about a source including file location
metadata such as CSV row numbers, YAML array indices, and file paths.
Ontology mapping rationale:
- class_uri is prov:Entity because this represents provenance metadata
about a source (the source as an entity with location details)
- close_mappings includes pav:SourceAccessedAt for source access provenance
- related_mappings includes schema:PropertyValue for structured metadata
class_uri: prov:Entity
close_mappings:
- pav:SourceAccessedAt
related_mappings:
- schema:PropertyValue
attributes:
csv_row_number:
range: integer

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
pav: http://purl.org/pav/
dcat: http://www.w3.org/ns/dcat#
imports:
- linkml:types
@ -22,7 +24,24 @@ default_range: string
classes:
SourceRecord:
description: Individual source record with claims
description: >-
Individual source record with claims, representing a data extraction from a specific
source (API, registry, web scrape, etc.). Contains metadata about the source type,
data tier, fetch timestamp, and extracted claims. Used to track provenance of
individual data points.
Ontology mapping rationale:
- class_uri is prov:Entity because this represents a discrete data entity with
provenance (when fetched, from where, by what method)
- close_mappings includes dcat:Distribution as this is similar to a specific
manifestation/representation of data from a source
- related_mappings includes pav:retrievedFrom conceptually (the source was retrieved)
and prov:PrimarySource (the record may be from a primary source)
class_uri: prov:Entity
close_mappings:
- dcat:Distribution
related_mappings:
- prov:PrimarySource
attributes:
source_type:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
oa: http://www.w3.org/ns/oa#
dcterms: http://purl.org/dc/terms/
imports:
- linkml:types
@ -21,7 +23,22 @@ default_range: string
classes:
SourceReference:
description: Structured source reference for a claim
description: >-
Structured source reference for a claim with text position information
including excerpts, character offsets, and relevance scores.
Ontology mapping rationale:
- class_uri is oa:TextPositionSelector because this class specifies
exact text positions (char_start, char_end) within a source document
- close_mappings includes prov:PrimarySource as it references source material
- close_mappings includes dcterms:BibliographicResource for citation context
- related_mappings includes schema:Quotation for text excerpt functionality
class_uri: oa:TextPositionSelector
close_mappings:
- prov:PrimarySource
- dcterms:BibliographicResource
related_mappings:
- schema:Quotation
attributes:
source_id:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
foaf: http://xmlns.com/foaf/0.1/
imports:
- linkml:types
@ -21,7 +22,24 @@ default_range: string
classes:
SourceStaffEntry:
description: Reference to original staff entry
description: >-
Reference to original staff entry from custodian staff parsing.
Contains staff identifier, name, academic degree, professional
headline, LinkedIn URL, and heritage relevance assessment.
Ontology mapping rationale:
- class_uri is prov:Entity because this is a reference to source
data about staff, not the person themselves
- close_mappings includes foaf:Person as the entry describes
attributes of a person
- related_mappings includes schema:Person (person semantics) and
prov:PrimarySource (reference to original staff data)
class_uri: prov:Entity
close_mappings:
- foaf:Person
related_mappings:
- schema:Person
- prov:PrimarySource
attributes:
staff_id:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
time: http://www.w3.org/2006/time#
crm: http://www.cidoc-crm.org/cidoc-crm/
imports:
- linkml:types
@ -22,7 +24,20 @@ default_range: string
classes:
TimeEntry:
description: Structured time entry from source data
description: >-
Structured time entry from source data representing a temporal point or marker
with an associated label and type classification.
Ontology mapping rationale:
- class_uri is time:Instant because TimeEntry represents a single point in time
(a date or year) rather than a duration or interval
- close_mappings includes schema:DateTime as it represents structured temporal data
- related_mappings includes crm:E52_Time-Span for CIDOC-CRM alignment
class_uri: time:Instant
close_mappings:
- schema:DateTime
related_mappings:
- crm:E52_Time-Span
attributes:
label:
any_of:

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
skos: http://www.w3.org/2004/02/skos/core#
time: http://www.w3.org/2006/time#
imports:
- linkml:types
@ -21,7 +23,20 @@ default_range: string
classes:
TimeEntryType:
description: Type classification for time entry
description: >-
Type classification for time entry specifying the semantic role of a temporal
point (e.g., begin, end, founded, dissolved).
Ontology mapping rationale:
- class_uri is skos:Concept because this represents a controlled vocabulary
term classifying the type/role of a time entry
- close_mappings includes time:TemporalEntity as it categorizes temporal concepts
- related_mappings includes schema:PropertyValue for structured type data
class_uri: skos:Concept
close_mappings:
- time:TemporalEntity
related_mappings:
- schema:PropertyValue
attributes:
label:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
time: http://www.w3.org/2006/time#
imports:
- linkml:types
@ -21,7 +22,20 @@ default_range: string
classes:
TimeSlot:
description: Day and time specification
description: >-
Day and time specification representing a specific point within a weekly
schedule, consisting of day of week, hour, and minute.
Ontology mapping rationale:
- class_uri is time:Instant because TimeSlot represents a specific moment
(day + hour + minute) within a recurring weekly pattern
- exact_mappings includes schema:Time as both represent time-of-day specifications
- related_mappings includes schema:OpeningHoursSpecification for schedule context
class_uri: time:Instant
exact_mappings:
- schema:Time
related_mappings:
- schema:OpeningHoursSpecification
attributes:
day:
range: integer

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
time: http://www.w3.org/2006/time#
crm: http://www.cidoc-crm.org/cidoc-crm/
imports:
- linkml:types
@ -21,7 +23,22 @@ default_range: string
classes:
TimespanBlock:
description: CRMsci E52 Time-Span temporal bounds
description: >-
CIDOC-CRM E52 Time-Span temporal bounds with four-point fuzzy temporal
representation (begin_of_the_begin, end_of_the_begin, begin_of_the_end,
end_of_the_end) to handle uncertain or approximate temporal boundaries.
Ontology mapping rationale:
- class_uri is crm:E52_Time-Span because this class directly implements
the CIDOC-CRM fuzzy temporal bounds pattern for cultural heritage data
- exact_mappings includes time:ProperInterval as both represent durations
with explicit start and end bounds
- related_mappings includes schema:Schedule for general temporal structuring
class_uri: crm:E52_Time-Span
exact_mappings:
- time:ProperInterval
related_mappings:
- schema:Schedule
attributes:
begin_of_the_begin:
range: datetime

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
crm: http://www.cidoc-crm.org/cidoc-crm/
imports:
- linkml:types
@ -22,7 +23,24 @@ default_range: string
classes:
UnescoIchEnrichment:
description: UNESCO Intangible Cultural Heritage elements for country
description: >-
UNESCO Intangible Cultural Heritage (ICH) elements for a country.
Contains the country code, total element count, enrichment timestamp,
and list of individual ICH elements inscribed on UNESCO lists.
Ontology mapping rationale:
- class_uri is prov:Entity because this is enrichment data extracted
from UNESCO ICH registry, not the heritage elements themselves
- close_mappings includes crm:E89_Propositional_Object as ICH
elements are conceptual/propositional cultural assets
- related_mappings includes schema:Dataset (collection of elements)
and prov:Collection (grouped provenance entities)
class_uri: prov:Entity
close_mappings:
- crm:E89_Propositional_Object
related_mappings:
- schema:Dataset
- prov:Collection
attributes:
country_code:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
shacl: http://www.w3.org/ns/shacl#
dqv: http://www.w3.org/ns/dqv#
imports:
- linkml:types
@ -21,7 +23,24 @@ default_range: string
classes:
ValidationMetadata:
description: Metadata about claim validation
description: >-
Metadata about claim validation including model, convention,
timestamp, and results. Records the outcome of validating
extracted claims against quality criteria or schema constraints.
Ontology mapping rationale:
- class_uri is prov:Activity because validation is an activity
that operates on entities and produces validation results
- close_mappings includes dqv:QualityMeasurement as validation
produces quality assessments of data
- related_mappings includes shacl:ValidationResult (SHACL validation
outputs) and prov:Entity (validation metadata is itself an entity)
class_uri: prov:Activity
close_mappings:
- dqv:QualityMeasurement
related_mappings:
- shacl:ValidationResult
- prov:Entity
attributes:
model:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
pav: http://purl.org/pav/
imports:
- linkml:types
@ -28,7 +29,24 @@ default_range: string
classes:
WebEnrichment:
description: Web archive metadata
description: >-
Web archive metadata and enrichment data extracted from institutional websites.
This class captures web scraping results, archived pages, extracted claims,
domain registration info, and organizational status discovered through web research.
Ontology mapping rationale:
- class_uri is prov:Entity because this represents enrichment DATA with provenance
(timestamps, methods, sources), not the institution or website itself
- close_mappings includes pav:SourceAccessedAt because this captures when/how
a web source was accessed and archived
- related_mappings includes schema:WebPage because the enrichment is derived from
web pages, though this class models the extracted data not the page itself
class_uri: prov:Entity
close_mappings:
- pav:SourceAccessedAt
related_mappings:
- schema:WebPage
- prov:Derivation
attributes:
web_archives:
range: WebArchive

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
pav: http://purl.org/pav/
dcat: http://www.w3.org/ns/dcat#
imports:
- linkml:types
@ -21,7 +23,24 @@ default_range: string
classes:
WebSource:
description: Web source used for profile compilation
description: >-
Web source used for profile compilation, representing a URL that was consulted
or accessed during data extraction. This class captures the reference to an
online resource (URL, title, access date) from which information was derived.
Ontology mapping rationale:
- class_uri is dcat:Resource because this represents a web resource that provides
data, aligning with DCAT's concept of resources in a data context
- close_mappings includes pav:sourceAccessedAt conceptually (though that's a property,
not class) - this class models the same semantic: a source that was consulted
- related_mappings includes schema:WebPage as the source is typically a web page,
and prov:Entity because it participates in provenance chains
class_uri: dcat:Resource
close_mappings:
- schema:WebPage
related_mappings:
- prov:Entity
- schema:CreativeWork
attributes:
url:
range: uri

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
http: http://www.w3.org/2011/http#
imports:
- linkml:types
@ -21,7 +22,23 @@ default_range: string
classes:
WikidataApiMetadata:
description: API call metadata
description: >-
Metadata about Wikidata API calls including endpoint, timestamp,
authentication status, response metrics, and rate limiting information.
Ontology mapping rationale:
- class_uri is prov:Activity because an API call is an activity that
retrieves data from Wikidata.
- close_mappings includes http:Request from W3C HTTP Vocabulary as
API calls are HTTP requests.
- related_mappings includes schema:Action as an API call is an action
with inputs and outputs.
class_uri: prov:Activity
close_mappings:
- http:Request
related_mappings:
- schema:Action
- prov:Entity
attributes:
has_or_had_api_endpoint:
range: uri

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
crm: http://www.cidoc-crm.org/cidoc-crm/
imports:
- linkml:types
@ -22,7 +23,24 @@ default_range: string
classes:
WikidataArchitecture:
description: Architecture-related Wikidata properties
description: >-
Architecture-related properties extracted from Wikidata including
architects (P84), architectural styles (P149), and structural
engineers (P631). Used for heritage buildings and cultural sites.
Ontology mapping rationale:
- class_uri is prov:Entity because this is an extracted data bundle
about architectural attributes, not a building itself
- close_mappings includes crm:E22_Human-Made_Object as architectural
properties relate to designed physical structures
- related_mappings includes schema:Place (architecture relates to
places) and crm:E7_Activity (design/construction activities)
class_uri: prov:Entity
close_mappings:
- crm:E22_Human-Made_Object
related_mappings:
- schema:Place
- crm:E7_Activity
attributes:
has_or_had_architect:
range: WikidataEntity

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
skos: http://www.w3.org/2004/02/skos/core#
wikibase: http://wikiba.se/ontology#
imports:
- linkml:types
@ -22,7 +24,23 @@ default_range: string
classes:
WikidataClassification:
description: Classification properties
description: >-
Classification properties from Wikidata including instance_of (P31),
field_of_work (P101), heritage_designation (P1435), and main_subject (P921).
Ontology mapping rationale:
- class_uri is skos:Concept because classification represents conceptual
categorization of entities.
- close_mappings includes wikibase:Statement as Wikidata classifications
are statements about entities.
- related_mappings includes prov:Entity as classifications are tracked
data entities.
class_uri: skos:Concept
close_mappings:
- wikibase:Statement
related_mappings:
- prov:Entity
- schema:CategoryCode
attributes:
instance_of:
range: WikidataEntity

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
bf: http://id.loc.gov/ontologies/bibframe/
imports:
- linkml:types
@ -21,7 +22,22 @@ default_range: string
classes:
WikidataCollectionInfo:
description: Collection information from Wikidata (flat structure)
description: >-
Collection information from Wikidata in a flat structure, capturing
collection item counts and related metrics.
Ontology mapping rationale:
- class_uri is schema:Collection because this describes collection-level
information from Wikidata.
- close_mappings includes bf:Collection from BIBFRAME as an equivalent
bibliographic collection concept.
- related_mappings includes prov:Entity as collection info is tracked data.
class_uri: schema:Collection
close_mappings:
- bf:Collection
related_mappings:
- prov:Entity
- schema:QuantitativeValue
attributes:
collection_items_count:
any_of:

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
vcard: http://www.w3.org/2006/vcard/ns#
imports:
- linkml:types
@ -21,7 +22,24 @@ default_range: string
classes:
WikidataContact:
description: Contact information from Wikidata
description: >-
Contact information extracted from Wikidata including phone numbers
(P1329), email addresses (P968), and fax numbers (P2900). Supports
multiple values for phone and email fields.
Ontology mapping rationale:
- class_uri is schema:ContactPoint because this class aggregates
contact details (phone, email, fax) as Schema.org defines
- close_mappings includes vcard:Contact from vCard ontology which
serves similar purpose for contact information modeling
- related_mappings includes prov:Entity (traceable contact data)
and schema:Organization (contact info typically belongs to orgs)
class_uri: schema:ContactPoint
close_mappings:
- vcard:Contact
related_mappings:
- prov:Entity
- schema:Organization
attributes:
phone_number:
any_of:

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
geo: http://www.w3.org/2003/01/geo/wgs84_pos#
wikibase: http://wikiba.se/ontology#
imports:
- linkml:types
@ -21,7 +23,24 @@ default_range: string
classes:
WikidataCoordinates:
description: Coordinates from Wikidata P625
description: >-
Coordinates from Wikidata P625 (coordinate location property).
Includes latitude, longitude, precision level, and reference globe.
Precision indicates the accuracy of coordinates (e.g., to nearest degree).
Ontology mapping rationale:
- class_uri is geo:Point because coordinates represent a specific
point in WGS84 coordinate reference system
- close_mappings includes wikibase:GlobecoordinateValue which is
Wikidata's native coordinate value type
- related_mappings includes schema:GeoCoordinates (web semantics)
and prov:Entity (coordinates are traceable data)
class_uri: geo:Point
close_mappings:
- wikibase:GlobecoordinateValue
related_mappings:
- schema:GeoCoordinates
- prov:Entity
attributes:
latitude:
range: float

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
wd: http://www.wikidata.org/entity/
imports:
- linkml:types
@ -44,7 +45,25 @@ default_range: string
classes:
WikidataEnrichment:
description: Full Wikidata enrichment data
description: >-
Full Wikidata enrichment data extracted from Wikidata SPARQL/API for a heritage custodian.
This class represents derived data (prov:Entity) where Wikidata serves as the primary source.
The enrichment captures labels, descriptions, identifiers, coordinates, temporal data,
classification, and other structured claims from the Wikidata knowledge graph.
Ontology mapping rationale:
- class_uri is prov:Entity because this represents enrichment DATA with provenance,
not the heritage institution itself (which is modeled by Custodian class)
- close_mappings includes prov:PrimarySource because Wikidata functions as a
primary/authoritative source for linked open data
- related_mappings includes prov:Derivation because the enrichment is derived from
Wikidata through API queries
class_uri: prov:Entity
close_mappings:
- prov:PrimarySource
related_mappings:
- prov:Derivation
- wd:Q2013
attributes:
wikidata_entity_id:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
wikibase: http://wikiba.se/ontology#
wd: http://www.wikidata.org/entity/
imports:
- linkml:types
@ -21,7 +23,23 @@ default_range: string
classes:
WikidataEntity:
description: Reference to a Wikidata entity
description: >-
Reference to a Wikidata entity (Q-item), including Q-number identifier,
multilingual labels (en/nl), descriptions, and instance_of classifications.
Ontology mapping rationale:
- class_uri is wikibase:Item because this represents a Wikidata item
(Q-number entity) in the Wikibase data model.
- close_mappings includes schema:Thing as Wikidata items are general
things with identifiers and labels.
- related_mappings includes prov:Entity as Wikidata entities are
provenance-trackable.
class_uri: wikibase:Item
close_mappings:
- schema:Thing
related_mappings:
- prov:Entity
- skos:Concept
attributes:
id:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
geo: http://www.w3.org/2003/01/geo/wgs84_pos#
locn: http://www.w3.org/ns/locn#
imports:
- linkml:types
@ -23,7 +25,24 @@ default_range: string
classes:
WikidataLocation:
description: Location properties from Wikidata
description: >-
Location properties extracted from Wikidata including country (P17),
headquarters location (P159), coordinates (P625), administrative
entity (P131), postal code (P281), and adjacent buildings (P3032).
Ontology mapping rationale:
- class_uri is schema:Place because location properties describe
a geographic place.
- close_mappings includes locn:Address from W3C Locn as this captures
structured location information.
- related_mappings includes geo:SpatialThing for coordinate data
and prov:Location for provenance context.
class_uri: schema:Place
close_mappings:
- locn:Address
related_mappings:
- geo:SpatialThing
- prov:Location
attributes:
country_reference:
any_of:

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
foaf: http://xmlns.com/foaf/0.1/
dcterms: http://purl.org/dc/terms/
imports:
- linkml:types
@ -21,7 +23,23 @@ default_range: string
classes:
WikidataMedia:
description: Media files from Wikidata
description: >-
Media files from Wikidata including images (P18), logos (P154),
Commons categories (P373), galleries (P935), coat of arms (P94),
and flag images (P41).
Ontology mapping rationale:
- class_uri is schema:MediaObject because this represents media
file references from Wikidata/Commons.
- close_mappings includes foaf:Image as many properties are images.
- related_mappings includes dcterms:MediaType for media classification
and prov:Entity as media references are tracked entities.
class_uri: schema:MediaObject
close_mappings:
- foaf:Image
related_mappings:
- dcterms:MediaType
- prov:Entity
attributes:
image:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
org: http://www.w3.org/ns/org#
wd: http://www.wikidata.org/entity/
imports:
- linkml:types
@ -22,7 +24,23 @@ default_range: string
classes:
WikidataOrganization:
description: Organizational properties
description: >-
Organizational properties extracted from Wikidata, including
hierarchical relationships (part_of, parent_organization, subsidiary),
governance (chairperson, CEO), and membership affiliations.
Ontology mapping rationale:
- class_uri is org:Organization because this class represents
organizational entity data from Wikidata aligned with W3C Org
- close_mappings includes schema:Organization for web semantics
- related_mappings includes prov:Entity (traceable data unit) and
wd:Q43229 (Wikidata's concept of organization)
class_uri: org:Organization
close_mappings:
- schema:Organization
related_mappings:
- prov:Entity
- wd:Q43229
attributes:
part_of:
range: WikidataEntity

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
crm: http://www.cidoc-crm.org/cidoc-crm/
imports:
- linkml:types
@ -22,7 +23,25 @@ default_range: string
classes:
WikidataRecognition:
description: Awards and recognition from Wikidata
description: >-
Awards and recognition information extracted from Wikidata,
particularly the award received property (P166). Used to track
honors, certifications, and formal recognition received by
heritage institutions.
Ontology mapping rationale:
- class_uri is prov:Entity because this is extracted recognition
data, not the recognition/award event itself
- close_mappings includes schema:AggregateRating as recognition
data provides a form of institutional quality assessment
- related_mappings includes crm:E7_Activity (award ceremonies are
activities) and schema:Organization (awards are given to orgs)
class_uri: prov:Entity
close_mappings:
- schema:AggregateRating
related_mappings:
- crm:E7_Activity
- schema:Organization
attributes:
award_received:
range: WikidataEntity

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
foaf: http://xmlns.com/foaf/0.1/
imports:
- linkml:types
@ -21,7 +22,24 @@ default_range: string
classes:
WikidataSocialMedia:
description: Social media identifiers
description: >-
Social media identifiers and metrics extracted from Wikidata.
Includes platform-specific usernames/IDs for Instagram, LinkedIn,
Twitter/X, Facebook, YouTube, plus aggregate follower counts (P8687).
Ontology mapping rationale:
- class_uri is foaf:OnlineAccount because social media profiles
are online accounts as defined by FOAF
- close_mappings includes schema:ProfilePage as social media
accounts manifest as profile pages
- related_mappings includes prov:Entity (traceable data) and
schema:Organization (social accounts belong to organizations)
class_uri: foaf:OnlineAccount
close_mappings:
- schema:ProfilePage
related_mappings:
- prov:Entity
- schema:Organization
attributes:
instagram_username:
any_of:

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
time: http://www.w3.org/2006/time#
imports:
- linkml:types
@ -21,7 +22,24 @@ default_range: string
classes:
WikidataTemporal:
description: Temporal properties from Wikidata
description: >-
Temporal properties extracted from Wikidata including inception (P571),
dissolution (P576), official opening (P1619), and activity time spans
(P580/P582). Captures key dates in organizational lifecycle.
Ontology mapping rationale:
- class_uri is time:TemporalEntity from OWL-Time because this class
aggregates temporal properties defining existence/activity periods
- close_mappings includes prov:InstantaneousEvent as dates mark
discrete events in time (founding, dissolution, opening)
- related_mappings includes schema:Event (lifecycle events) and
prov:Entity (temporal data as traceable entity)
class_uri: time:TemporalEntity
close_mappings:
- prov:InstantaneousEvent
related_mappings:
- schema:Event
- prov:Entity
attributes:
inception:
range: string

View file

@ -12,6 +12,8 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
wikibase: http://wikiba.se/ontology#
time: http://www.w3.org/2006/time#
imports:
- linkml:types
@ -21,7 +23,24 @@ default_range: string
classes:
WikidataTimeValue:
description: Wikidata time value with precision metadata
description: >-
Wikidata time value with precision metadata. Records temporal
information in ISO 8601 format along with precision level
(9=year, 10=month, 11=day) and calendar model (typically Gregorian).
Ontology mapping rationale:
- class_uri is wikibase:TimeValue because this directly represents
Wikidata's native time value datatype with precision
- close_mappings includes time:Instant from OWL-Time as both
represent points in time (though TimeValue adds precision)
- related_mappings includes xsd:dateTime (base type) and
prov:InstantaneousEvent (provenance temporal marker)
class_uri: wikibase:TimeValue
close_mappings:
- time:Instant
related_mappings:
- xsd:dateTime
- prov:InstantaneousEvent
attributes:
time:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
foaf: http://xmlns.com/foaf/0.1/
imports:
- linkml:types
@ -21,7 +22,24 @@ default_range: string
classes:
WikidataWeb:
description: Web presence from Wikidata
description: >-
Web presence information extracted from Wikidata including official
website URLs (P856), description URLs (P973), and official blog URLs
(P1581). Supports multiple URLs per property.
Ontology mapping rationale:
- class_uri is schema:WebSite because this class aggregates
web presence information (websites, blogs, description pages)
- close_mappings includes foaf:Document as web pages are documents
in the FOAF sense (information resources)
- related_mappings includes prov:Entity (traceable web data) and
schema:Organization (web presence belongs to organizations)
class_uri: schema:WebSite
close_mappings:
- foaf:Document
related_mappings:
- prov:Entity
- schema:Organization
attributes:
official_website:
any_of:

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
foaf: http://xmlns.com/foaf/0.1/
imports:
- linkml:types
@ -21,7 +22,23 @@ default_range: string
classes:
YoutubeChannel:
description: YouTube channel metadata
description: >-
YouTube channel metadata including channel ID, title, description,
subscriber/video/view counts, country code, and branding URLs.
Ontology mapping rationale:
- class_uri is schema:BroadcastChannel because a YouTube channel is
a broadcast channel for video content distribution.
- close_mappings includes foaf:OnlineAccount as a channel represents
an online account on YouTube.
- related_mappings includes schema:Organization as channels often
represent institutional presence, and prov:Entity for tracking.
class_uri: schema:BroadcastChannel
close_mappings:
- foaf:OnlineAccount
related_mappings:
- schema:Organization
- prov:Entity
attributes:
channel_id:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
sioc: http://rdfs.org/sioc/ns#
imports:
- linkml:types
@ -21,7 +22,22 @@ default_range: string
classes:
YoutubeComment:
description: YouTube video comment
description: >-
YouTube video comment including comment ID, author information,
text content, like count, and timestamps.
Ontology mapping rationale:
- class_uri is schema:Comment because this represents user-generated
comment content on YouTube videos.
- close_mappings includes sioc:Post from SIOC (Semantically-Interlinked
Online Communities) as a comment is a type of online post.
- related_mappings includes prov:Entity for tracking comment provenance.
class_uri: schema:Comment
close_mappings:
- sioc:Post
related_mappings:
- prov:Entity
- schema:UserComments
attributes:
comment_id:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
dcat: http://www.w3.org/ns/dcat#
imports:
- linkml:types
@ -27,8 +28,24 @@ default_range: string
classes:
YoutubeEnrichment:
description: YouTube channel and video data for the institution (supports both flat
and nested formats)
description: >-
YouTube channel and video data for a heritage institution, supporting
both flat and nested data formats. Includes channel metadata, videos,
social links, and LLM verification results.
Ontology mapping rationale:
- class_uri is prov:Entity because YouTube enrichment data is a
provenance-tracked entity derived from YouTube API.
- close_mappings includes dcat:Dataset as the enrichment represents
a dataset of YouTube information.
- related_mappings includes schema:BroadcastChannel for the channel
aspect and prov:Collection for the video collection.
class_uri: prov:Entity
close_mappings:
- dcat:Dataset
related_mappings:
- schema:BroadcastChannel
- prov:Collection
attributes:
source_url:
range: uri

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
pav: http://purl.org/pav/
imports:
- linkml:types
@ -22,7 +23,22 @@ default_range: string
classes:
YoutubeProvenance:
description: Provenance information for YouTube enrichment
description: >-
Provenance information for YouTube enrichment including source URL,
extraction method, timestamp, and data quality tier.
Ontology mapping rationale:
- class_uri is prov:Entity because provenance metadata is itself a
trackable entity describing data origins.
- close_mappings includes pav:SourceAccessedAt to capture the access
point and timing of YouTube data retrieval.
- related_mappings includes prov:Activity as extraction is an activity.
class_uri: prov:Entity
close_mappings:
- pav:SourceAccessedAt
related_mappings:
- prov:Activity
- prov:Generation
attributes:
source_url:
range: uri

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
foaf: http://xmlns.com/foaf/0.1/
imports:
- linkml:types
@ -21,7 +22,23 @@ default_range: string
classes:
YoutubeSocialLink:
description: Social media link from YouTube channel
description: >-
Social media link from a YouTube channel's about page, linking to
external platforms like Website, Facebook, Twitter, Instagram, etc.
Ontology mapping rationale:
- class_uri is schema:WebPage because a social link points to a
web page on another platform.
- close_mappings includes foaf:OnlineAccount as social links often
point to social media accounts.
- related_mappings includes prov:Entity for tracking and schema:URL
for the link structure.
class_uri: schema:WebPage
close_mappings:
- foaf:OnlineAccount
related_mappings:
- prov:Entity
- schema:URL
attributes:
platform:
range: string

View file

@ -22,7 +22,22 @@ default_range: string
classes:
YoutubeSourceRecord:
description: YouTube source record for provenance tracking
description: >-
YouTube source record for provenance tracking, documenting API calls,
data tier, claims extracted, and any misattribution corrections.
Ontology mapping rationale:
- class_uri is prov:PrimarySource because this represents a primary
source record from the YouTube Data API.
- close_mappings includes prov:Entity as source records are trackable
provenance entities.
- related_mappings includes prov:Revision for correction tracking.
class_uri: prov:PrimarySource
close_mappings:
- prov:Entity
related_mappings:
- prov:Revision
- prov:Activity
attributes:
source_type:
range: string

View file

@ -12,6 +12,7 @@ prefixes:
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
xsd: http://www.w3.org/2001/XMLSchema#
oa: http://www.w3.org/ns/oa#
imports:
- linkml:types
@ -21,7 +22,23 @@ default_range: string
classes:
YoutubeTranscript:
description: YouTube video transcript
description: >-
YouTube video transcript including video ID, language, transcript type
(manual or auto-generated), full text, and extraction metadata.
Ontology mapping rationale:
- class_uri is schema:Transcript because this represents a textual
transcript of video/audio content.
- close_mappings includes oa:TextualBody as the transcript text
forms annotation body content.
- related_mappings includes prov:Entity for tracking and schema:MediaObject
as transcripts derive from media.
class_uri: schema:Transcript
close_mappings:
- oa:TextualBody
related_mappings:
- prov:Entity
- schema:MediaObject
attributes:
video_id:
range: string

View file

@ -23,7 +23,24 @@ default_range: string
classes:
YoutubeVideo:
description: Individual YouTube video metadata
description: >-
Individual YouTube video metadata including video ID, title, description,
view/like/comment counts, duration, thumbnail, tags, and associated
comments and transcripts.
Ontology mapping rationale:
- class_uri is schema:VideoObject because this represents a video
as a media object on YouTube.
- close_mappings includes schema:MediaObject as the broader media
object category.
- related_mappings includes prov:Entity for provenance tracking and
schema:CreativeWork as videos are creative works.
class_uri: schema:VideoObject
close_mappings:
- schema:MediaObject
related_mappings:
- prov:Entity
- schema:CreativeWork
attributes:
video_id:
range: string

View file

@ -187,6 +187,10 @@ const router = createBrowserRouter([
path: 'conversation',
element: withSuspense(ConversationPage),
},
{
path: 'review',
element: withSuspense(EntityReviewPage),
},
],
},
]);

View file

@ -395,7 +395,7 @@ export function Navigation() {
{/* Settings Menu */}
<div className="nav-dropdown">
<button
className={`nav-dropdown-trigger ${isSubmenuActive(['/settings', '/roadmap']) ? 'active' : ''}`}
className={`nav-dropdown-trigger ${isSubmenuActive(['/settings', '/roadmap', '/review']) ? 'active' : ''}`}
onClick={() => toggleDropdown('settings')}
aria-expanded={openDropdown === 'settings'}
aria-haspopup="true"
@ -420,6 +420,9 @@ export function Navigation() {
{t('database')}
<span className="nav-external-icon" aria-hidden="true"></span>
</a>
<Link to="/review" className={`nav-dropdown-item ${isActive('/review') ? 'active' : ''}`}>
{language === 'nl' ? 'Entity Review' : 'Entity Review'}
</Link>
</div>
)}
</div>
@ -564,6 +567,9 @@ export function Navigation() {
{t('database')}
<span className="nav-external-icon" aria-hidden="true"></span>
</a>
<Link to="/review" className={`nav-mobile-link ${isActive('/review') ? 'active' : ''}`}>
{language === 'nl' ? 'Entity Review' : 'Entity Review'}
</Link>
</div>
</div>

View file

@ -0,0 +1,432 @@
/**
* OntologyTermPopup.css
*
* Styles for the ontology term popup shown when clicking on mapping tags
* in the LinkML viewer (e.g., rico:Rule, schema:name)
*/
.ontology-popup {
position: fixed;
width: 420px;
height: 350px;
max-height: calc(100vh - 100px);
background: white;
border-radius: 12px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
z-index: 10200; /* Above SemanticDetailsPanel (10100) */
display: flex;
flex-direction: column;
overflow: hidden;
border: 1px solid #e5e7eb;
transition: box-shadow 0.2s;
}
/* Dragging state */
.ontology-popup--dragging {
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 8px 20px rgba(0, 0, 0, 0.15);
opacity: 0.95;
}
/* Minimized state */
.ontology-popup--minimized {
height: auto !important;
max-height: 52px;
overflow: hidden;
}
.ontology-popup--minimized .ontology-popup__header {
border-bottom: none;
}
/* Header */
.ontology-popup__header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
color: #ffffff;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
cursor: grab;
flex-shrink: 0;
}
.ontology-popup--dragging .ontology-popup__header {
cursor: grabbing;
}
.ontology-popup__title {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
min-width: 0;
}
.ontology-popup__curie {
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
font-size: 14px;
font-weight: 600;
color: #ffffff;
background: rgba(255, 255, 255, 0.15);
padding: 3px 8px;
border-radius: 4px;
}
.ontology-popup__controls {
display: flex;
gap: 4px;
flex-shrink: 0;
}
.ontology-popup__minimize,
.ontology-popup__close {
background: rgba(255, 255, 255, 0.1);
border: none;
color: white;
width: 28px;
height: 28px;
border-radius: 6px;
cursor: pointer;
font-size: 18px;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s;
}
.ontology-popup__minimize:hover,
.ontology-popup__close:hover {
background: rgba(255, 255, 255, 0.2);
}
/* Badges */
.ontology-popup__type-badge,
.ontology-popup__ontology-badge {
display: inline-flex;
align-items: center;
padding: 2px 8px;
border-radius: 12px;
font-size: 10px;
font-weight: 600;
color: white;
text-transform: uppercase;
letter-spacing: 0.03em;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.ontology-popup__type-badge {
background: rgba(255, 255, 255, 0.2);
}
/* Content */
.ontology-popup__content {
padding: 16px;
overflow-y: auto;
overscroll-behavior: contain;
flex: 1;
}
.ontology-popup__loading,
.ontology-popup__error {
padding: 24px 16px;
text-align: center;
color: #64748b;
}
.ontology-popup__error {
color: #dc2626;
background: #fef2f2;
border-radius: 8px;
margin: 8px;
}
/* Sections */
.ontology-popup__section {
margin-bottom: 14px;
padding-bottom: 14px;
border-bottom: 1px solid #f1f5f9;
}
.ontology-popup__section:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}
.ontology-popup__section-label {
font-size: 11px;
font-weight: 600;
color: #64748b;
text-transform: uppercase;
letter-spacing: 0.05em;
display: block;
margin-bottom: 6px;
}
.ontology-popup__label-title {
margin: 0;
font-size: 18px;
font-weight: 600;
color: #172a59;
}
.ontology-popup__description {
margin: 0;
font-size: 13px;
line-height: 1.6;
color: #475569;
}
/* URI display */
.ontology-popup__uri {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}
.ontology-popup__uri-compact {
background: #f1f5f9;
padding: 4px 8px;
border-radius: 4px;
font-size: 12px;
color: #475569;
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
word-break: break-all;
}
.ontology-popup__uri-link {
font-size: 14px;
color: #14b8a6;
text-decoration: none;
padding: 2px 4px;
border-radius: 4px;
transition: background 0.2s;
}
.ontology-popup__uri-link:hover {
background: #f0fdfa;
text-decoration: none;
}
.ontology-popup__uri-list {
display: flex;
flex-direction: column;
gap: 6px;
}
/* Aliases (Wikidata) */
.ontology-popup__aliases {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.ontology-popup__alias {
background: #f0fdf4;
color: #166534;
padding: 3px 8px;
border-radius: 4px;
font-size: 12px;
border: 1px solid #bbf7d0;
}
/* Property type badge */
.ontology-popup__property-type {
display: inline-block;
background: #eff6ff;
color: #1e40af;
padding: 3px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: 500;
}
/* Resize handles */
.ontology-popup__resize {
position: absolute;
z-index: 10;
}
.ontology-popup__resize--n {
top: 0;
left: 8px;
right: 8px;
height: 6px;
cursor: n-resize;
}
.ontology-popup__resize--s {
bottom: 0;
left: 8px;
right: 8px;
height: 6px;
cursor: s-resize;
}
.ontology-popup__resize--e {
right: 0;
top: 8px;
bottom: 8px;
width: 6px;
cursor: e-resize;
}
.ontology-popup__resize--w {
left: 0;
top: 8px;
bottom: 8px;
width: 6px;
cursor: w-resize;
}
.ontology-popup__resize--ne {
top: 0;
right: 0;
width: 12px;
height: 12px;
cursor: ne-resize;
}
.ontology-popup__resize--nw {
top: 0;
left: 0;
width: 12px;
height: 12px;
cursor: nw-resize;
}
.ontology-popup__resize--se {
bottom: 0;
right: 0;
width: 12px;
height: 12px;
cursor: se-resize;
}
.ontology-popup__resize--sw {
bottom: 0;
left: 0;
width: 12px;
height: 12px;
cursor: sw-resize;
}
/* SE corner grip indicator */
.ontology-popup__resize--se::after {
content: '';
position: absolute;
right: 3px;
bottom: 3px;
width: 8px;
height: 8px;
border-right: 2px solid #94a3b8;
border-bottom: 2px solid #94a3b8;
opacity: 0.5;
transition: opacity 0.2s;
}
.ontology-popup__resize--se:hover::after {
opacity: 1;
}
/* Dark mode */
[data-theme="dark"] .ontology-popup {
background: #1e293b;
border-color: #334155;
}
[data-theme="dark"] .ontology-popup__header {
background: linear-gradient(135deg, #134e4a 0%, #0f766e 100%);
}
[data-theme="dark"] .ontology-popup__content {
background: #1e293b;
}
[data-theme="dark"] .ontology-popup__label-title {
color: #f1f5f9;
}
[data-theme="dark"] .ontology-popup__section {
border-bottom-color: #334155;
}
[data-theme="dark"] .ontology-popup__section-label {
color: #94a3b8;
}
[data-theme="dark"] .ontology-popup__description {
color: #cbd5e1;
}
[data-theme="dark"] .ontology-popup__uri-compact {
background: #334155;
color: #e2e8f0;
}
[data-theme="dark"] .ontology-popup__uri-link {
color: #2dd4bf;
}
[data-theme="dark"] .ontology-popup__uri-link:hover {
background: rgba(45, 212, 191, 0.1);
}
[data-theme="dark"] .ontology-popup__alias {
background: rgba(34, 197, 94, 0.15);
color: #86efac;
border-color: rgba(34, 197, 94, 0.3);
}
[data-theme="dark"] .ontology-popup__property-type {
background: rgba(59, 130, 246, 0.15);
color: #93c5fd;
}
[data-theme="dark"] .ontology-popup__error {
background: rgba(220, 38, 38, 0.15);
color: #fca5a5;
}
[data-theme="dark"] .ontology-popup__loading {
color: #94a3b8;
}
[data-theme="dark"] .ontology-popup__resize--se::after {
border-color: #64748b;
}
/* Responsive - Full screen on mobile */
@media (max-width: 600px) {
.ontology-popup {
position: fixed !important;
top: 0 !important;
left: 0 !important;
right: 0 !important;
bottom: 0 !important;
width: 100% !important;
height: 100% !important;
max-height: 100vh !important;
border-radius: 0;
}
.ontology-popup__header {
cursor: default;
}
.ontology-popup__resize {
display: none;
}
.ontology-popup__minimize {
display: none;
}
.ontology-popup__close {
width: 40px;
height: 40px;
font-size: 24px;
}
}

View file

@ -0,0 +1,806 @@
/**
* OntologyTermPopup.tsx
*
* A popup component that displays ontology term information when clicking on
* mapping tags (like `rico:Rule`, `schema:name`) in the LinkML viewer.
*
* Features:
* - Draggable (drag from header)
* - Minimizable (collapse to title bar only)
* - Resizable (drag edges and corners)
* - Loads term definitions from local ontology files
* - Falls back to Wikidata API for wd: prefixed terms
*/
import React, { useEffect, useState, useRef, useCallback } from 'react';
import {
loadOntology,
getOntologyFileByUri,
getLocalName,
} from '../../lib/ontology/ontology-loader';
import { isTargetInsideAny } from '../../utils/dom';
import './OntologyTermPopup.css';
/**
* Standard prefix mappings for CURIE expansion
*/
const STANDARD_PREFIXES: Record<string, string> = {
// Top-level ontologies
'rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
'rdfs': 'http://www.w3.org/2000/01/rdf-schema#',
'owl': 'http://www.w3.org/2002/07/owl#',
'xsd': 'http://www.w3.org/2001/XMLSchema#',
'skos': 'http://www.w3.org/2004/02/skos/core#',
'foaf': 'http://xmlns.com/foaf/0.1/',
'prov': 'http://www.w3.org/ns/prov#',
'org': 'http://www.w3.org/ns/org#',
'dcat': 'http://www.w3.org/ns/dcat#',
// Dublin Core
'dc': 'http://purl.org/dc/elements/1.1/',
'dcterms': 'http://purl.org/dc/terms/',
'dct': 'http://purl.org/dc/terms/',
// Schema.org (support both http and https)
'schema': 'http://schema.org/',
// Domain ontologies
'rico': 'https://www.ica.org/standards/RiC/ontology#',
'crm': 'http://www.cidoc-crm.org/cidoc-crm/',
'bf': 'http://id.loc.gov/ontologies/bibframe/',
'premis': 'http://www.loc.gov/premis/rdf/v3/',
'pico': 'https://pico.hypotheses.org/the-pico-ontology#',
'tooi': 'https://identifier.overheid.nl/tooi/def/ont/',
// Application ontologies
'cpov': 'http://data.europa.eu/m8g/',
// Utility ontologies
'geo': 'http://www.w3.org/2003/01/geo/wgs84_pos#',
'time': 'http://www.w3.org/2006/time#',
'vcard': 'http://www.w3.org/2006/vcard/ns#',
// Wikidata
'wd': 'http://www.wikidata.org/entity/',
'wikidata': 'http://www.wikidata.org/entity/',
'wdt': 'http://www.wikidata.org/prop/direct/',
// Project-specific
'linkml': 'https://w3id.org/linkml/',
'hc': 'https://w3id.org/heritage/custodian/',
};
interface OntologyTermPopupProps {
/** The CURIE or URI to look up (e.g., "rico:Rule", "schema:name") */
curie: string;
/** Called when user wants to close the popup */
onClose: () => void;
/** Initial position (optional, defaults to center) */
initialPosition?: { x: number; y: number };
}
interface Position {
x: number;
y: number;
}
interface Size {
width: number;
height: number;
}
type ResizeDirection = 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw' | null;
// Minimum panel dimensions
const MIN_WIDTH = 300;
const MIN_HEIGHT = 150;
const DEFAULT_WIDTH = 420;
const DEFAULT_HEIGHT = 350;
/**
* Term information loaded from ontology
*/
interface TermInfo {
uri: string;
localName: string;
label: string;
description?: string;
comment?: string;
ontologyName: string;
termType: 'class' | 'property' | 'individual' | 'unknown';
// Class-specific
subClassOf?: string[];
equivalentClass?: string[];
// Property-specific
domain?: string[];
range?: string[];
propertyType?: 'object' | 'datatype' | 'annotation' | 'unknown';
subPropertyOf?: string[];
inverseOf?: string;
// Wikidata-specific
wikidataId?: string;
aliases?: string[];
}
/**
* Wikidata entity response structure
*/
interface WikidataEntity {
labels?: { en?: { value: string } };
descriptions?: { en?: { value: string } };
aliases?: { en?: Array<{ value: string }> };
}
/**
* Expand a CURIE to a full URI using standard prefixes
*/
function expandCurie(curie: string): string {
if (!curie) return curie;
// Already a full URI
if (curie.startsWith('http://') || curie.startsWith('https://')) {
return curie;
}
const colonIndex = curie.indexOf(':');
if (colonIndex > 0) {
const prefix = curie.substring(0, colonIndex);
const localName = curie.substring(colonIndex + 1);
const namespace = STANDARD_PREFIXES[prefix];
if (namespace) {
return namespace + localName;
}
}
return curie;
}
/**
* Get the prefix from a CURIE
*/
function getPrefix(curie: string): string | undefined {
const colonIndex = curie.indexOf(':');
if (colonIndex > 0) {
return curie.substring(0, colonIndex);
}
return undefined;
}
/**
* Fetch Wikidata entity information
*/
async function fetchWikidataEntity(entityId: string): Promise<TermInfo | null> {
try {
// Remove wd: or wikidata: prefix if present
const id = entityId.replace(/^(wd:|wikidata:)/, '');
const response = await fetch(
`https://www.wikidata.org/wiki/Special:EntityData/${id}.json`
);
if (!response.ok) {
console.warn(`[OntologyTermPopup] Wikidata fetch failed for ${id}: ${response.status}`);
return null;
}
const data = await response.json();
const entity = data.entities?.[id] as WikidataEntity;
if (!entity) {
return null;
}
return {
uri: `http://www.wikidata.org/entity/${id}`,
localName: id,
label: entity.labels?.en?.value || id,
description: entity.descriptions?.en?.value,
ontologyName: 'Wikidata',
termType: id.startsWith('P') ? 'property' : 'class',
wikidataId: id,
aliases: entity.aliases?.en?.map(a => a.value),
};
} catch (error) {
console.error('[OntologyTermPopup] Error fetching Wikidata entity:', error);
return null;
}
}
/**
* Load term information from ontology files or Wikidata
*/
async function loadTermInfo(curie: string): Promise<TermInfo | null> {
const prefix = getPrefix(curie);
// Handle Wikidata terms
if (prefix === 'wd' || prefix === 'wikidata') {
return fetchWikidataEntity(curie);
}
// Expand the CURIE to full URI
const fullUri = expandCurie(curie);
// Find the ontology file that contains this URI
const ontologyFile = getOntologyFileByUri(fullUri);
if (!ontologyFile) {
console.warn(`[OntologyTermPopup] No ontology file found for URI: ${fullUri}`);
// Return basic info
return {
uri: fullUri,
localName: getLocalName(fullUri) || curie,
label: getLocalName(fullUri) || curie,
ontologyName: 'Unknown',
termType: 'unknown',
};
}
try {
// Load and parse the ontology
const ontology = await loadOntology(ontologyFile.path);
// Search for the term in classes
const classMatch = ontology.classes.find(c => c.uri === fullUri);
if (classMatch) {
return {
uri: fullUri,
localName: getLocalName(fullUri) || curie,
label: classMatch.label || getLocalName(fullUri) || curie,
description: classMatch.description,
comment: classMatch.comment,
ontologyName: ontologyFile.name,
termType: 'class',
subClassOf: classMatch.subClassOf,
equivalentClass: classMatch.equivalentClass,
};
}
// Search for the term in properties
const propMatch = ontology.properties.find(p => p.uri === fullUri);
if (propMatch) {
return {
uri: fullUri,
localName: getLocalName(fullUri) || curie,
label: propMatch.label || getLocalName(fullUri) || curie,
description: propMatch.description,
comment: propMatch.comment,
ontologyName: ontologyFile.name,
termType: 'property',
domain: propMatch.domain,
range: propMatch.range,
propertyType: propMatch.propertyType,
subPropertyOf: propMatch.subPropertyOf,
inverseOf: propMatch.inverseOf,
};
}
// Search for the term in individuals
const indMatch = ontology.individuals.find(i => i.uri === fullUri);
if (indMatch) {
return {
uri: fullUri,
localName: getLocalName(fullUri) || curie,
label: indMatch.label || getLocalName(fullUri) || curie,
description: indMatch.description,
ontologyName: ontologyFile.name,
termType: 'individual',
};
}
// Term not found in ontology, return basic info
console.warn(`[OntologyTermPopup] Term not found in ${ontologyFile.name}: ${fullUri}`);
return {
uri: fullUri,
localName: getLocalName(fullUri) || curie,
label: getLocalName(fullUri) || curie,
ontologyName: ontologyFile.name,
termType: 'unknown',
comment: `Term not found in ${ontologyFile.name} ontology file.`,
};
} catch (error) {
console.error(`[OntologyTermPopup] Error loading ontology ${ontologyFile.path}:`, error);
return {
uri: fullUri,
localName: getLocalName(fullUri) || curie,
label: getLocalName(fullUri) || curie,
ontologyName: ontologyFile.name,
termType: 'unknown',
comment: `Error loading ontology: ${error}`,
};
}
}
/**
* Compact a full URI back to CURIE form if possible
*/
function compactUri(uri: string): string {
for (const [prefix, namespace] of Object.entries(STANDARD_PREFIXES)) {
if (uri.startsWith(namespace)) {
return `${prefix}:${uri.substring(namespace.length)}`;
}
}
return uri;
}
/**
* Ontology badge colors based on the ontology type
*/
const ONTOLOGY_COLORS: Record<string, string> = {
'CIDOC-CRM v7.1.3': '#8B5CF6', // Purple
'RiC-O 1.1': '#EC4899', // Pink
'Schema.org': '#F59E0B', // Amber
'PROV-O': '#10B981', // Green
'SKOS': '#F97316', // Orange
'FOAF': '#6366F1', // Indigo
'Dublin Core Terms': '#EF4444', // Red
'Dublin Core Elements': '#EF4444',
'ORG Ontology': '#8B5CF6', // Purple
'DCAT 3': '#3B82F6', // Blue
'CPOV (Core Public Org)': '#3B82F6',
'BIBFRAME': '#14B8A6', // Teal
'TOOI': '#14B8A6',
'PiCo': '#0EA5E9', // Sky
'Wikidata': '#339966', // Wikidata green
'TIME': '#6B7280', // Gray
'GEO': '#059669', // Emerald
'VCard': '#7C3AED', // Violet
};
export const OntologyTermPopup: React.FC<OntologyTermPopupProps> = ({
curie,
onClose,
initialPosition,
}) => {
const [termInfo, setTermInfo] = useState<TermInfo | null>(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState<string | null>(null);
// Draggable state
const [position, setPosition] = useState<Position | null>(initialPosition || null);
const [isDragging, setIsDragging] = useState(false);
const dragStartRef = useRef<{ x: number; y: number; posX: number; posY: number } | null>(null);
const panelRef = useRef<HTMLDivElement>(null);
// Minimized state
const [isMinimized, setIsMinimized] = useState(false);
// Resize state
const [size, setSize] = useState<Size>({ width: DEFAULT_WIDTH, height: DEFAULT_HEIGHT });
const [isResizing, setIsResizing] = useState(false);
const [resizeDirection, setResizeDirection] = useState<ResizeDirection>(null);
const resizeStartRef = useRef<{
x: number;
y: number;
width: number;
height: number;
posX: number;
posY: number;
} | null>(null);
// Load term information
useEffect(() => {
const loadInfo = async () => {
setLoading(true);
setError(null);
try {
const info = await loadTermInfo(curie);
if (info) {
setTermInfo(info);
} else {
setError(`Could not find information for "${curie}"`);
}
} catch (err) {
console.error('[OntologyTermPopup] Error loading term info:', err);
setError(`Failed to load: ${err}`);
} finally {
setLoading(false);
}
};
loadInfo();
}, [curie]);
// Center the popup on initial load if no position provided
useEffect(() => {
if (!initialPosition && panelRef.current && !position) {
const rect = panelRef.current.getBoundingClientRect();
setPosition({
x: (window.innerWidth - rect.width) / 2,
y: (window.innerHeight - rect.height) / 3,
});
}
}, [initialPosition, position]);
// Drag handlers
const handleMouseDown = useCallback((e: React.MouseEvent) => {
if (isTargetInsideAny(e.target, ['.ontology-popup__close', '.ontology-popup__minimize'])) {
return;
}
e.preventDefault();
setIsDragging(true);
const panel = panelRef.current;
if (panel) {
const rect = panel.getBoundingClientRect();
const currentX = position?.x ?? rect.left;
const currentY = position?.y ?? rect.top;
dragStartRef.current = {
x: e.clientX,
y: e.clientY,
posX: currentX,
posY: currentY,
};
}
}, [position]);
const handleMouseMove = useCallback((e: MouseEvent) => {
if (!isDragging || !dragStartRef.current) return;
const deltaX = e.clientX - dragStartRef.current.x;
const deltaY = e.clientY - dragStartRef.current.y;
const newX = dragStartRef.current.posX + deltaX;
const newY = dragStartRef.current.posY + deltaY;
const maxX = window.innerWidth - 100;
const maxY = window.innerHeight - 50;
setPosition({
x: Math.max(0, Math.min(newX, maxX)),
y: Math.max(0, Math.min(newY, maxY)),
});
}, [isDragging]);
const handleMouseUp = useCallback(() => {
setIsDragging(false);
dragStartRef.current = null;
}, []);
// Add/remove global mouse event listeners for dragging
useEffect(() => {
if (isDragging) {
window.addEventListener('mousemove', handleMouseMove);
window.addEventListener('mouseup', handleMouseUp);
document.body.style.cursor = 'grabbing';
document.body.style.userSelect = 'none';
} else {
document.body.style.cursor = '';
document.body.style.userSelect = '';
}
return () => {
window.removeEventListener('mousemove', handleMouseMove);
window.removeEventListener('mouseup', handleMouseUp);
document.body.style.cursor = '';
document.body.style.userSelect = '';
};
}, [isDragging, handleMouseMove, handleMouseUp]);
// Toggle minimize
const toggleMinimize = useCallback(() => {
setIsMinimized(prev => !prev);
}, []);
// Resize handlers
const handleResizeMouseDown = useCallback((direction: ResizeDirection) => (e: React.MouseEvent) => {
e.preventDefault();
e.stopPropagation();
setIsResizing(true);
setResizeDirection(direction);
const panel = panelRef.current;
if (panel) {
const rect = panel.getBoundingClientRect();
resizeStartRef.current = {
x: e.clientX,
y: e.clientY,
width: size.width,
height: size.height,
posX: position?.x ?? rect.left,
posY: position?.y ?? rect.top,
};
}
}, [size, position]);
const handleResizeMouseMove = useCallback((e: MouseEvent) => {
if (!isResizing || !resizeStartRef.current || !resizeDirection) return;
const deltaX = e.clientX - resizeStartRef.current.x;
const deltaY = e.clientY - resizeStartRef.current.y;
let newWidth = resizeStartRef.current.width;
let newHeight = resizeStartRef.current.height;
let newX = resizeStartRef.current.posX;
let newY = resizeStartRef.current.posY;
if (resizeDirection.includes('e')) {
newWidth = Math.max(MIN_WIDTH, resizeStartRef.current.width + deltaX);
}
if (resizeDirection.includes('w')) {
const potentialWidth = resizeStartRef.current.width - deltaX;
if (potentialWidth >= MIN_WIDTH) {
newWidth = potentialWidth;
newX = resizeStartRef.current.posX + deltaX;
}
}
if (resizeDirection.includes('s')) {
newHeight = Math.max(MIN_HEIGHT, resizeStartRef.current.height + deltaY);
}
if (resizeDirection.includes('n')) {
const potentialHeight = resizeStartRef.current.height - deltaY;
if (potentialHeight >= MIN_HEIGHT) {
newHeight = potentialHeight;
newY = resizeStartRef.current.posY + deltaY;
}
}
setSize({ width: newWidth, height: newHeight });
if (resizeDirection.includes('w') || resizeDirection.includes('n')) {
setPosition({ x: newX, y: newY });
}
}, [isResizing, resizeDirection]);
const handleResizeMouseUp = useCallback(() => {
setIsResizing(false);
setResizeDirection(null);
resizeStartRef.current = null;
}, []);
// Add/remove global mouse event listeners for resizing
useEffect(() => {
if (isResizing) {
window.addEventListener('mousemove', handleResizeMouseMove);
window.addEventListener('mouseup', handleResizeMouseUp);
document.body.style.userSelect = 'none';
}
return () => {
window.removeEventListener('mousemove', handleResizeMouseMove);
window.removeEventListener('mouseup', handleResizeMouseUp);
if (!isDragging) {
document.body.style.userSelect = '';
}
};
}, [isResizing, handleResizeMouseMove, handleResizeMouseUp, isDragging]);
// Render URI as clickable link
const renderUri = (uri: string) => {
const compact = compactUri(uri);
return (
<span className="ontology-popup__uri">
<code className="ontology-popup__uri-compact">{compact}</code>
<a
href={uri}
target="_blank"
rel="noopener noreferrer"
className="ontology-popup__uri-link"
title={uri}
>
</a>
</span>
);
};
// Render ontology badge
const renderOntologyBadge = (ontologyName: string) => {
const color = ONTOLOGY_COLORS[ontologyName] || '#64748B';
return (
<span
className="ontology-popup__ontology-badge"
style={{ backgroundColor: color }}
>
{ontologyName}
</span>
);
};
// Render term type badge
const renderTypeBadge = (termType: string) => {
const colors: Record<string, string> = {
'class': '#3B82F6',
'property': '#10B981',
'individual': '#F59E0B',
'unknown': '#6B7280',
};
return (
<span
className="ontology-popup__type-badge"
style={{ backgroundColor: colors[termType] || colors.unknown }}
>
{termType}
</span>
);
};
// Calculate panel style
const panelStyle: React.CSSProperties = {
width: size.width,
height: isMinimized ? 'auto' : size.height,
...(position && {
position: 'fixed',
left: position.x,
top: position.y,
}),
};
return (
<div
ref={panelRef}
className={`ontology-popup ${isMinimized ? 'ontology-popup--minimized' : ''} ${isDragging ? 'ontology-popup--dragging' : ''}`}
style={panelStyle}
>
{/* Header */}
<div
className="ontology-popup__header"
onMouseDown={handleMouseDown}
>
<div className="ontology-popup__title">
<code className="ontology-popup__curie">{curie}</code>
{termInfo && (
<>
{renderTypeBadge(termInfo.termType)}
{renderOntologyBadge(termInfo.ontologyName)}
</>
)}
</div>
<div className="ontology-popup__controls">
<button
className="ontology-popup__minimize"
onClick={toggleMinimize}
title={isMinimized ? 'Expand' : 'Minimize'}
>
{isMinimized ? '□' : ''}
</button>
<button
className="ontology-popup__close"
onClick={onClose}
title="Close"
>
×
</button>
</div>
</div>
{/* Content */}
{!isMinimized && (
<div className="ontology-popup__content">
{loading && (
<div className="ontology-popup__loading">
Loading term information...
</div>
)}
{error && (
<div className="ontology-popup__error">
{error}
</div>
)}
{!loading && !error && termInfo && (
<>
{/* Label */}
<div className="ontology-popup__section">
<h4 className="ontology-popup__label-title">{termInfo.label}</h4>
</div>
{/* URI */}
<div className="ontology-popup__section">
<span className="ontology-popup__section-label">URI:</span>
{renderUri(termInfo.uri)}
</div>
{/* Description / Comment */}
{(termInfo.description || termInfo.comment) && (
<div className="ontology-popup__section">
<span className="ontology-popup__section-label">Description:</span>
<p className="ontology-popup__description">
{termInfo.description || termInfo.comment}
</p>
</div>
)}
{/* Wikidata aliases */}
{termInfo.aliases && termInfo.aliases.length > 0 && (
<div className="ontology-popup__section">
<span className="ontology-popup__section-label">Also known as:</span>
<div className="ontology-popup__aliases">
{termInfo.aliases.map((alias, idx) => (
<span key={idx} className="ontology-popup__alias">{alias}</span>
))}
</div>
</div>
)}
{/* Class-specific: subClassOf */}
{termInfo.subClassOf && termInfo.subClassOf.length > 0 && (
<div className="ontology-popup__section">
<span className="ontology-popup__section-label">Subclass of:</span>
<div className="ontology-popup__uri-list">
{termInfo.subClassOf.map((uri, idx) => (
<div key={idx}>{renderUri(uri)}</div>
))}
</div>
</div>
)}
{/* Property-specific: domain and range */}
{termInfo.domain && termInfo.domain.length > 0 && (
<div className="ontology-popup__section">
<span className="ontology-popup__section-label">Domain:</span>
<div className="ontology-popup__uri-list">
{termInfo.domain.map((uri, idx) => (
<div key={idx}>{renderUri(uri)}</div>
))}
</div>
</div>
)}
{termInfo.range && termInfo.range.length > 0 && (
<div className="ontology-popup__section">
<span className="ontology-popup__section-label">Range:</span>
<div className="ontology-popup__uri-list">
{termInfo.range.map((uri, idx) => (
<div key={idx}>{renderUri(uri)}</div>
))}
</div>
</div>
)}
{/* Property type */}
{termInfo.propertyType && termInfo.propertyType !== 'unknown' && (
<div className="ontology-popup__section">
<span className="ontology-popup__section-label">Property type:</span>
<span className="ontology-popup__property-type">{termInfo.propertyType}</span>
</div>
)}
{/* Inverse property */}
{termInfo.inverseOf && (
<div className="ontology-popup__section">
<span className="ontology-popup__section-label">Inverse of:</span>
{renderUri(termInfo.inverseOf)}
</div>
)}
{/* Sub-property */}
{termInfo.subPropertyOf && termInfo.subPropertyOf.length > 0 && (
<div className="ontology-popup__section">
<span className="ontology-popup__section-label">Sub-property of:</span>
<div className="ontology-popup__uri-list">
{termInfo.subPropertyOf.map((uri, idx) => (
<div key={idx}>{renderUri(uri)}</div>
))}
</div>
</div>
)}
</>
)}
</div>
)}
{/* Resize handles */}
{!isMinimized && (
<>
<div className="ontology-popup__resize ontology-popup__resize--n" onMouseDown={handleResizeMouseDown('n')} />
<div className="ontology-popup__resize ontology-popup__resize--s" onMouseDown={handleResizeMouseDown('s')} />
<div className="ontology-popup__resize ontology-popup__resize--e" onMouseDown={handleResizeMouseDown('e')} />
<div className="ontology-popup__resize ontology-popup__resize--w" onMouseDown={handleResizeMouseDown('w')} />
<div className="ontology-popup__resize ontology-popup__resize--ne" onMouseDown={handleResizeMouseDown('ne')} />
<div className="ontology-popup__resize ontology-popup__resize--nw" onMouseDown={handleResizeMouseDown('nw')} />
<div className="ontology-popup__resize ontology-popup__resize--se" onMouseDown={handleResizeMouseDown('se')} />
<div className="ontology-popup__resize ontology-popup__resize--sw" onMouseDown={handleResizeMouseDown('sw')} />
</>
)}
</div>
);
};
export default OntologyTermPopup;

Some files were not shown because too many files have changed in this diff Show more