Skip to main content

pub.layers.ontology

Annotation ontology definitions. Defines the types, labels, and relationships used in annotation, inspired by FOVEA's persona-based ontology builder and bead's unified frame ontology interfaces. Ontologies are first-class objects that can be shared, versioned, and linked to knowledge graphs.

Types

ontology

NSID: pub.layers.ontology.ontology Type: Record

An annotation ontology: a collection of typed definitions (entity types, event types, role types, relation types) that together form a complete annotation framework.

FieldTypeDescription
namestringHuman-readable name for this ontology.
descriptionstringDetailed description of the ontology's purpose and scope.
versionstringSemantic version string.
domainUriat-uriAT-URI of the domain definition node. Community-expandable via knowledge graph.
domainstringDomain slug (fallback when domainUri unavailable). Known values: general, biomedical, legal, financial, news, social-media, scientific, intelligence, dialogue, multimodal, custom
parentRefat-uriReference to a parent ontology this one extends.
personaRefat-uriReference to the persona that created/owns this ontology.
knowledgeRefsarrayKnowledge graph references grounding this ontology. Array of ref: pub.layers.defs#knowledgeRef
createdAtdatetimeRecord creation timestamp.

typeDef

NSID: pub.layers.ontology.typeDef Type: Record

A type definition within an ontology. Covers entity types, event types, role types, and relation types in a single unified model.

FieldTypeDescription
ontologyRefat-uriThe ontology this type belongs to.
namestringThe type name/label.
typeKindUriat-uriAT-URI of the type kind definition node. Community-expandable via knowledge graph.
typeKindstringType kind slug (fallback when typeKindUri unavailable). Known values: entity-type, situation-type, role-type, relation-type, attribute-type
glossstringRich text definition/gloss of this type. May include references to other types and Wikidata entities.
parentTypeRefat-uriReference to a parent type (for type hierarchies/inheritance).
allowedRolesarrayFor frame/event types: the roles that can be filled. Array of ref: pub.layers.ontology.defs#roleSlot
allowedValuesarrayFor attribute types: enumerated allowed values. Array of strings
knowledgeRefsarrayKnowledge graph groundings (Wikidata, chive.pub, FrameNet, etc.). Array of ref: pub.layers.defs#knowledgeRef
featuresrefOpen-ended features. For relation-type typeDefs, standardized feature keys include: symmetric (boolean, if true A→B implies B→A), transitive (boolean, if true A→B and B→C implies A→C), reflexive (boolean, if true A→A is valid), inverse (AT-URI of the inverse relation typeDef), domain (AT-URI of required source type), range (AT-URI of required target type). Ref: pub.layers.defs#featureMap
createdAtdatetimeRecord creation timestamp.

roleSlot

NSID: pub.layers.ontology.defs#roleSlot Type: Object

A role/argument slot in a frame or event type definition. Structurally parallel to pub.layers.resource.defs#slot: both represent named positions with type constraints.

FieldTypeDescription
roleNamestringThe role label (e.g., Agent, Patient, Theme, ARG0).
roleDescriptionstringDescription of the role.
fillerTypeRefsarrayReferences to allowed filler types (pub.layers.ontology.typeDef AT-URIs). Array of at-uri
collectionRefat-uriAT-URI of a pub.layers.resource.collection constraining allowed fillers.
requiredbooleanWhether this role is obligatory.
defaultValuestringDefault filler value if not explicitly filled.
constraintsarrayDeclarative constraints on fillers of this role. Array of ref: pub.layers.defs#constraint
knowledgeRefsarrayKnowledge graph references. Array of ref: pub.layers.defs#knowledgeRef
featuresrefOpen-ended features for this role slot. Ref: pub.layers.defs#featureMap

XRPC Queries

getOntology

NSID: pub.layers.ontology.getOntology

Retrieve a single ontology record by AT-URI.

ParameterTypeDescription
uriat-uri (required)The AT-URI of the ontology record.

Output: The ontology record object.

listOntologies

NSID: pub.layers.ontology.listOntologies

List ontology records in a repository with pagination.

ParameterTypeDescription
repodid (required)The DID of the repository.
limitintegerMaximum number of records to return (1-100, default 50).
cursorstringPagination cursor from previous response.

Output: { records: ontology[], cursor?: string }

getTypeDef

NSID: pub.layers.ontology.getTypeDef

Retrieve a single type definition record by AT-URI.

ParameterTypeDescription
uriat-uri (required)The AT-URI of the type definition record.

Output: The type definition record object.

listTypeDefs

NSID: pub.layers.ontology.listTypeDefs

List type definition records in a repository with pagination.

ParameterTypeDescription
repodid (required)The DID of the repository.
limitintegerMaximum number of records to return (1-100, default 50).
cursorstringPagination cursor from previous response.

Output: { records: typeDef[], cursor?: string }