@_linked/owl

中文文档
1.7.0发布于 2026/10/28MIT AND W3C-20150513TypeScriptES Module构建来源已验证近 30 天下载 2352

OWL 2 for Linked: the OWL vocabulary as Turtle, an accessor for every term, and shapes for its classes (Class, ObjectProperty, DatatypeProperty, AnnotationProperty, NamedIndividual, Ontology, `Restrictio

原始使用文档
文档目录5 节
  1. Terms
  2. Ontology metadata
  3. The data
  4. Development
  5. Data license

@_linked/owl

OWL 2 for Linked: the OWL vocabulary as Turtle, an accessor for every term, and shapes for its classes (Class, ObjectProperty, DatatypeProperty, AnnotationProperty, NamedIndividual, Ontology, Restriction). The package mirrors http://www.w3.org/2002/07/owl# and holds only its terms.

Terms

import * as owl from '@_linked/owl/ontologies/owl';

static targetClass = owl.Class;

ontologies/owl has one named export per term (77); ontologies/owl.data holds ns, dataFiles, _ontologyResource and loadData(). linked generate-ontology writes the modules from the data (package.json "linkedOntologies"), and linked build fails when they are stale; never edit them by hand.

Ontology metadata

Ontology (@_linked/owl/shapes/Ontology) reads what an ontology states about itself:

AccessorPathValue
titledcterms:titleliteral, one
descriptiondcterms:descriptionliteral, one
preferredNamespacePrefixvann:preferredNamespacePrefixliteral, one
preferredNamespaceUrivann:preferredNamespaceUriliteral, one
creatordcterms:creatorIRI, one
contributordcterms:contributorIRIs, any number
maintainerschema:maintainer (http://schema.org/maintainer)IRIs, any number
statusadms:status (http://www.w3.org/ns/adms#status)IRI, one
const o = await Ontology.select((o) => [o.title, o.preferredNamespacePrefix, o.status]).for({id});

The status is one of @_linked/core's core:Draft, core:ReadyForReview and core:Published (coreOntology in @_linked/core/ontologies/linked-core). prefix and declaredPrefix are the SHACL prefix declaration (sh:prefix), not the preferred prefix. The Dublin Core terms come from @_linked/dcmi; the VANN, ADMS and schema.org terms are named by IRI in ontologies/metadata-terms, so the package depends on neither a VANN nor an ADMS package, nor on @_linked/schema.

The data

src/data/owl.ttl is the OWL 2 vocabulary as the W3C publishes it at the namespace, https://www.w3.org/2002/07/owl (Turtle, owl:versionInfo "$Date: 2009/11/15 10:54:12 $", Last-Modified 2009-11-15), unchanged apart from a leading comment that names the source and LF line endings. To refresh, download it with curl -sSL -H 'Accept: text/turtle' https://www.w3.org/2002/07/owl, put the comment back with the new version, and run npx linked generate-ontology.

The official files are the only source of the package's terms: the package never adds a class or property to a standard's namespace. What the published standard lacks, mainly metadata, goes in one extra file per prefix, src/data/<prefix>-added.ttl, listed in "linkedOntologies"' data:

  • the ontology entity itself: owl:Ontology, title, description, vann:preferredNamespacePrefix, vann:preferredNamespaceUri, the source URL and version;
  • annotations on terms the standard already defines, such as a missing rdfs:label.

New classes or properties never go there; a term a standard lacks belongs in the consumer's own ontology package.

The official file carries its own ontology header (on <http://www.w3.org/2002/07/owl>, without the #), so this package has no -added file. _ontologyResource is that ontology IRI, http://www.w3.org/2002/07/owl (the generator takes it from the owl:Ontology declaration).

Development

npx linked build    # checks the ontology modules, compiles, writes lib/esm/data/shapes.ttl
npm test            # runs against lib/

Data license

The package code is MIT licensed (see LICENSE). The bundled ontology data is derived from the W3C OWL specification and is not covered by the MIT license: it remains under the W3C Software and Document License, https://www.w3.org/copyright/software-license-2023/. See NOTICE.

版本与发布记录

@_linked/owl 共发布 23 个版本,首次发布于 2026/04/23;过去 12 个月发布了 23 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.7.0latest2026/10/2810 天前
1.6.52026/10/2513 天前
1.6.42026/10/2513 天前
1.6.32026/10/2513 天前
1.6.22026/10/2514 天前
1.6.12026/10/2414 天前

关于 @_linked/owl 的常见问题

@_linked/owl 是什么?

OWL 2 for Linked: the OWL vocabulary as Turtle, an accessor for every term, and shapes for its classes (Class, ObjectProperty, DatatypeProperty, AnnotationProperty, NamedIndividual, Ontology, `Restrictio

如何安装 @_linked/owl?

在项目目录运行 npm install @_linked/owl,或使用 pnpm add / yarn add / bun add。

@_linked/owl 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@_linked/owl 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@_linked/owl 可以商用吗?

@_linked/owl 使用 MIT AND W3C-20150513 许可。声明的许可为 MIT AND W3C-20150513,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@_linked/owl 的下载量有多少?

根据 npm 官方下载统计,@_linked/owl 在 2026/10/05 – 2026/11/03 这 30 天内被下载 2,352 次,日均约 78 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@_linked/owl 还在维护吗?

最新版本 1.7.0 发布于 2026/10/28(10 天前);至今共发布 23 个版本,其中过去 12 个月发布了 23 个;首次发布于 2026/04/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。