show.php
- Pfad:
src/View/semantic-explorer/entitaeten/show.php
- Namespace: -
- Zeilen: 163 | Größe: 5,793 Bytes
- Geändert: 2025-12-28 03:00:50 | Gescannt: 2025-12-31 10:22:15
Code Hygiene Score: 99
- Dependencies: 100 (25%)
- LOC: 100 (20%)
- Methods: 100 (20%)
- Secrets: 100 (15%)
- Classes: 100 (10%)
- Magic Numbers: 90 (10%)
Issues 1
| Zeile |
Typ |
Beschreibung |
| 149 |
magic_number |
Magic Number gefunden: 100 |
Versionen 7
-
v7
2025-12-28 03:00 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation
-
v6
2025-12-28 01:21 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation
-
v5
2025-12-28 01:21 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation
-
v4
2025-12-28 01:21 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation
-
v3
2025-12-28 01:21 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation
-
v2
2025-12-27 09:43 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation
-
v1
2025-12-27 09:43 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation
Code
<?php ob_start(); ?>
<nav class="breadcrumb">
<a href="/">Campus KI</a> » <a href="/semantic-explorer">Semantic Explorer</a> » <a href="/semantic-explorer/entitaeten">Entitäten</a> » <?= htmlspecialchars($entity['name']) ?>
</nav>
<h1><?= htmlspecialchars($entity['name']) ?></h1>
<p><span class="badge badge--primary"><?= htmlspecialchars($entity['type']) ?></span></p>
<div class="stats-grid">
<div class="stat-card">
<span class="stat-card__value"><?= count($chunks) ?></span>
<span class="stat-card__label">Chunks</span>
</div>
<div class="stat-card">
<span class="stat-card__value"><?= count($outgoingRelations) ?></span>
<span class="stat-card__label">Ausgehend</span>
</div>
<div class="stat-card">
<span class="stat-card__value"><?= count($incomingRelations) ?></span>
<span class="stat-card__label">Eingehend</span>
</div>
<div class="stat-card stat-card--<?= isset($knowledgeSemantics) && $knowledgeSemantics ? 'success' : 'muted' ?>">
<span class="stat-card__value"><?= isset($knowledgeSemantics) && $knowledgeSemantics ? 'Analysiert' : 'Offen' ?></span>
<span class="stat-card__label">Wissenssemantik</span>
</div>
</div>
<?php if (isset($knowledgeSemantics) && $knowledgeSemantics): ?>
<h2>Wissenssemantik</h2>
<table class="table">
<tr>
<th>Semantische Rolle</th>
<td><span class="badge badge--primary"><?= htmlspecialchars($knowledgeSemantics['semantic_role'] ?? '-') ?></span></td>
</tr>
<tr>
<th>Funktionale Kategorie</th>
<td><span class="badge badge--info"><?= htmlspecialchars($knowledgeSemantics['functional_category'] ?? '-') ?></span></td>
</tr>
<tr>
<th>Kontextbedeutung</th>
<td><?= htmlspecialchars($knowledgeSemantics['context_meaning'] ?? '-') ?></td>
</tr>
<?php if (!empty($knowledgeSemantics['properties'])): ?>
<tr>
<th>Eigenschaften</th>
<td><pre class="code-block"><?= htmlspecialchars(
is_string($knowledgeSemantics['properties'])
? json_encode(json_decode($knowledgeSemantics['properties']), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)
: json_encode($knowledgeSemantics['properties'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)
) ?></pre></td>
</tr>
<?php endif; ?>
<tr>
<th>Modell</th>
<td><code><?= htmlspecialchars($knowledgeSemantics['model_used'] ?? '-') ?></code></td>
</tr>
</table>
<?php endif; ?>
<?php if ($entity['description']): ?>
<h2>Beschreibung</h2>
<p><?= htmlspecialchars($entity['description']) ?></p>
<?php endif; ?>
<?php if (!empty($synonyms)): ?>
<h2>Synonyme</h2>
<div class="tags">
<?php foreach ($synonyms as $s): ?>
<span class="badge"><?= htmlspecialchars($s['synonym']) ?></span>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if (!empty($classifications)): ?>
<h2>Ontologie-Klassen</h2>
<table>
<tr><th>Klasse</th><th>Konfidenz</th></tr>
<?php foreach ($classifications as $c): ?>
<tr>
<td><?= htmlspecialchars($c['name']) ?></td>
<td><?= number_format($c['confidence'] * \Domain\Constants::PERCENT_FULL, 0) ?>%</td>
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<?php if (!empty($outgoingRelations)): ?>
<h2>Ausgehende Relationen</h2>
<table>
<thead>
<tr>
<th>Relation</th>
<th>Ziel</th>
<th>Staerke</th>
</tr>
</thead>
<tbody>
<?php foreach ($outgoingRelations as $r): ?>
<tr>
<td><span class="badge"><?= htmlspecialchars($r['relation_type']) ?></span></td>
<td><a href="/semantic-explorer/entitaeten/<?= $r['target_entity_id'] ?>"><?= htmlspecialchars($r['target_name']) ?></a> <span class="badge badge--small"><?= $r['target_type'] ?></span></td>
<td><?= number_format($r['strength'] * \Domain\Constants::PERCENT_FULL, 0) ?>%</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php if (!empty($incomingRelations)): ?>
<h2>Eingehende Relationen</h2>
<table>
<thead>
<tr>
<th>Quelle</th>
<th>Relation</th>
<th>Staerke</th>
</tr>
</thead>
<tbody>
<?php foreach ($incomingRelations as $r): ?>
<tr>
<td><a href="/semantic-explorer/entitaeten/<?= $r['source_entity_id'] ?>"><?= htmlspecialchars($r['source_name']) ?></a> <span class="badge badge--small"><?= $r['source_type'] ?></span></td>
<td><span class="badge"><?= htmlspecialchars($r['relation_type']) ?></span></td>
<td><?= number_format($r['strength'] * \Domain\Constants::PERCENT_FULL, 0) ?>%</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php if (!empty($chunks)): ?>
<h2>Vorkommnisse in Chunks</h2>
<table>
<thead>
<tr>
<th>Chunk</th>
<th>Dokument</th>
<th>Relevanz</th>
<th>Inhalt</th>
</tr>
</thead>
<tbody>
<?php foreach ($chunks as $c): ?>
<tr>
<td><a href="/semantic-explorer/chunks/<?= $c['id'] ?>">#<?= $c['id'] ?></a></td>
<td><?= htmlspecialchars($c['filename']) ?></td>
<td><?= number_format($c['relevance_score'] * \Domain\Constants::PERCENT_FULL, 0) ?>%</td>
<td><?= htmlspecialchars(substr($c['content'], 0, 100)) ?>...</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<p class="links-bar">
<a href="/semantic-explorer/entitaeten">Alle Entitäten</a> |
<a href="/semantic-explorer/relationen">Relationen</a>
</p>
<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>