RDF Vocabularies for Dart

Type-Safe Constants for Semantic Web Development

Build robust semantic web applications with compile-time safety, intelligent IDE support, and comprehensive coverage of standard RDF vocabularies.

πŸ€” What are RDF Vocabularies?

RDF vocabularies define standardized terms and relationships for describing data on the semantic web. Instead of inventing your own properties like "name" or "email", you use well-established terms like foaf:name or schema:email that everyone understands.

This library provides type-safe Dart constants for these vocabularies, eliminating typos and enabling powerful IDE features like auto-completion and refactoring.

πŸš€ Why Use This Library?

πŸ›‘οΈ Type Safety

Compile-time verification prevents typos in URIs. No more broken links due to "foaf:Nam" instead of "foaf:name".

πŸ’‘ IDE Support

Full auto-completion, refactoring, and go-to-definition for all vocabulary terms. Your IDE becomes your vocabulary reference.

πŸ“š Comprehensive

Covers all major vocabularies: RDF, RDFS, OWL, FOAF, Dublin Core, Schema.org, SKOS, and many more.

πŸ”§ Modular

Choose only what you need. Use core vocabularies for basic RDF work, or add Schema.org for rich structured data.

⚑ Performance

Constants are resolved at compile-time. Zero runtime overhead for vocabulary lookups.

πŸ”„ Interoperable

Works seamlessly with any RDF library. Just use the constants as URI strings.

πŸ’Ό Common Use Cases

🏒 Knowledge Graphs

Build enterprise knowledge graphs with standardized vocabularies for people, organizations, and relationships.

πŸ” SEO & Structured Data

Enhance your web applications with Schema.org markup for better search engine visibility.

πŸ“Š Data Integration

Create interoperable datasets by using common vocabularies that other systems understand.

πŸ”— Linked Data APIs

Build REST APIs that serve properly structured linked data with consistent vocabulary usage.

πŸ“– Content Management

Organize and describe digital assets using Dublin Core and other metadata vocabularies.

🎯 Data Validation

Validate RDF data against vocabulary constraints using SHACL or similar technologies.

πŸš€ Quick Start Example

Here's how easy it is to use RDF vocabularies in your Dart code:

// Install dependencies dart pub add rdf_vocabularies_core rdf_core // Use in your code import 'package:rdf_core/rdf_core.dart'; import 'package:rdf_vocabularies_core/foaf.dart'; import 'package:rdf_vocabularies_core/rdf.dart'; // Create a person with class-specific type safety final personIri = IriTerm('http://example.org/jane'); final graph = RdfGraph.fromTriples([ // IDE ensures only valid FOAF Person properties Triple(personIri, Rdf.type, FoafPerson.classIri), Triple(personIri, FoafPerson.name, LiteralTerm.string('Jane Doe')), Triple(personIri, FoafPerson.givenName, LiteralTerm.string('Jane')), Triple(personIri, FoafPerson.mbox, IriTerm('mailto:jane@example.com')), ]); // Convert to RDF format final rdfData = RdfCore.withStandardCodecs().encode(graph); print(rdfData);

πŸ“¦ Choose Your Package

Select the package that best fits your project's needs. You can always add more packages later.

RECOMMENDED

rdf_vocabularies_core

Perfect for most RDF applications. Includes essential vocabularies like RDF, RDFS, OWL, FOAF, Dublin Core, SKOS, and more. Start here if you're building knowledge graphs, linked data APIs, or working with basic semantic web technologies.
πŸ“¦ Size: ~5MB
WEB APPS

rdf_vocabularies_schema

Add Schema.org support for web applications, SEO, and structured data. Includes the complete Schema.org vocabulary with HTTPS URIs. Essential for modern web development with structured markup.
πŸ“¦ Size: ~35MB
LEGACY

rdf_vocabularies_schema_http

Schema.org vocabulary with HTTP URIs for legacy system compatibility. Use this if you need to work with older systems that specifically require HTTP (not HTTPS) Schema.org URIs.
πŸ“¦ Size: ~36MB
ALL-IN-ONE

rdf_vocabularies

Meta-package that includes all vocabularies for maximum compatibility. Use this if you need access to everything or are migrating from the original single-package version. Note: This is larger than individual packages.
πŸ“¦ Size: ~77MB (includes all packages)