@_linked/dcmi

中文文档
1.6.4发布于 2026/10/28MIT AND CC-BY-4.0TypeScriptES Module构建来源已验证近 30 天下载 3074

This module is an up-to-date specification of all metadata terms maintained by the Dublin Core Metadata Initiative, including properties, vocabulary encoding schemes, syntax encoding schemes, and classes.

原始使用文档
文档目录4 节
  1. Ontologies
  2. The data
  3. Development
  4. Data license

@_linked/dcmi

DCMI Metadata Terms for Linked: the Dublin Core vocabularies as Turtle, an accessor for every term, and the Image shape. The package mirrors the three namespaces and holds only their terms.

Ontologies

PrefixNamespaceModule
dchttp://purl.org/dc/elements/1.1/@_linked/dcmi/ontologies/dc
dctermshttp://purl.org/dc/terms/@_linked/dcmi/ontologies/dcterms
dcmitypehttp://purl.org/dc/dcmitype/@_linked/dcmi/ontologies/dcmitype

Import a module as a namespace:

import * as dcterms from '@_linked/dcmi/ontologies/dcterms';

@literalProperty({path: dcterms.title}) get title(): string {…}

Each module has one named export per term; ontologies/<prefix>.data holds ns, dataFiles, _ontologyResource and loadData(). A term's export name is its local name made an identifier (dcterms:ISO639-2 → dcterms.ISO639_2). 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.

The data

The data is DCMI's latest release, DCMI Metadata Terms, Date Issued 2020-01-20, as DCMI publishes it in Turtle, unchanged apart from a leading comment that names the source:

FileSource
src/data/dcelems.ttlhttps://www.dublincore.org/specifications/dublin-core/dcmi-terms/dublin_core_elements.ttl
src/data/dcterms.ttlhttps://www.dublincore.org/specifications/dublin-core/dcmi-terms/dublin_core_terms.ttl
src/data/dcmitype.ttlhttps://www.dublincore.org/specifications/dublin-core/dcmi-terms/dublin_core_type.ttl

To refresh, download each file, put the comment back with the new release date, update the -added files' 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.

DCMI's files describe each namespace (title, publisher, modified) but do not declare it an owl:Ontology, so dc-added.ttl, dcterms-added.ttl and dcmitype-added.ttl add the ontology entity, the preferred prefix and namespace, and the source and version.

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 DCMI Metadata Terms (https://www.dublincore.org/specifications/dublin-core/dcmi-terms/) published by the Dublin Core Metadata Initiative and is not covered by the MIT license: it remains under the Creative Commons Attribution 4.0 International (CC BY 4.0), https://creativecommons.org/licenses/by/4.0/. See NOTICE.

版本与发布记录

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

版本发布日期距今
1.6.4latest2026/10/2810 天前
1.6.32026/10/2513 天前
1.6.22026/10/2513 天前
1.6.12026/10/2513 天前
1.6.02026/10/2414 天前
1.5.02026/10/2414 天前

关于 @_linked/dcmi 的常见问题

@_linked/dcmi 是什么?

This module is an up-to-date specification of all metadata terms maintained by the Dublin Core Metadata Initiative, including properties, vocabulary encoding schemes, syntax encoding schemes, and classes.

如何安装 @_linked/dcmi?

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

@_linked/dcmi 支持 TypeScript 吗?

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

@_linked/dcmi 支持 ESM 还是 CommonJS?

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

@_linked/dcmi 可以商用吗?

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

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

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

@_linked/dcmi 还在维护吗?

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