Skip to content

docs: add RDF import profile reference for external generators - #83

Open
Gaurangit wants to merge 1 commit into
microsoft:mainfrom
Gaurangit:docs/external-rdf-profile
Open

docs: add RDF import profile reference for external generators#83
Gaurangit wants to merge 1 commit into
microsoft:mainfrom
Gaurangit:docs/external-rdf-profile

Conversation

@Gaurangit

@Gaurangit Gaurangit commented Jul 20, 2026

Copy link
Copy Markdown

What changed

Adds docs/external-rdf-generators.md — a reference documenting the exact RDF/XML profile parseRDF() (src/lib/rdf/parser.ts) accepts — plus a row in the README documentation table.

It covers, for authors of external tools that want to emit Playground-compatible ontologies programmatically:

  • how entity ids are derived from class URIs (uncapitalized local name)
  • property attachment via exact rdfs:domain URI match, ont:propertyType values, and the XSD range fallback mapping
  • relationship endpoints (ont:fromEntityId/ont:toEntityId vs domain/range), valid cardinalities, and relationship attributes via ont:relationshipAttributeOf
  • display annotations (ont:icon, ont:color, ont:unit, ont:enumValues, ont:isIdentifier)
  • constructs the parser deliberately ignores (e.g. rdfs:subClassOf), with the recommended alternative
  • a minimal complete example and verification tips (round-trip via the serializer, headless parseRDF() in CI)

Why

The existing Authoring Guide targets humans writing ontologies by hand. While integrating two external Python tools (a schema.org schema generator and a knowledge-object framework) with the Playground, I had to reverse-engineer these rules from parser.ts. Documenting the import profile makes the Playground usable as a visualization front-end for external pipelines — generators can emit .rdf artifacts that import cleanly via Import/Export, the catalogue, and the embed widget, without reading the parser source.

Notes

  • Docs-only change; no code touched.
  • The behaviors documented were verified against a live dev instance by importing programmatically generated files (entity ids, property types, cardinalities, stub handling all render as described).

🤖 Generated with Claude Code

Document the exact RDF/XML profile parseRDF() accepts — entity-id
derivation, property type mapping, cardinalities, ont: annotations,
relationship attributes, and the constructs that are ignored (e.g.
rdfs:subClassOf) — so external tools can programmatically emit
ontologies that import cleanly into the Playground, the catalogue,
and the embed widget. Includes a minimal complete example and
verification tips.

Co-Authored-By: Claude Fable 5 <[email protected]>
@Gaurangit

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant