AppVocab constructor

const AppVocab({
  1. required String appBaseUri,
  2. String vocabPath = '/vocab',
  3. IriTerm defaultBaseClass = OwlThing.classIri,
  4. Map<String, IriTerm> wellKnownProperties = defaultWellKnownProperties,
  5. String? label,
  6. String? comment,
  7. List<(IriTerm, RdfObject)> metadata = const [],
})

Creates an AppVocab configuration.

appBaseUri is required and specifies the base URI for the application. vocabPath is optional and defaults to '/vocab'. label is optional and provides a human-readable label for the ontology. comment is optional and provides a description for the ontology. metadata is optional and defaults to an empty list of records.

Example:

import 'package:locorda_rdf_terms_core/owl.dart';
import 'package:locorda_rdf_terms_common/dcterms.dart';

const myVocab = AppVocab(
  appBaseUri: 'https://my.app.de',
  vocabPath: '/vocab',
  label: 'Example Vocabulary',
  comment: 'A vocabulary for example application',
  metadata: [
    (Owl.versionInfo, LiteralTerm('1.0.0')),
    (Dcterms.created, LiteralTerm('2025-01-15', datatype: Xsd.date)),
  ]
);

Implementation

const AppVocab({
  required this.appBaseUri,
  this.vocabPath = '/vocab',
  this.defaultBaseClass = OwlThing.classIri,
  this.wellKnownProperties = defaultWellKnownProperties,
  this.label,
  this.comment,
  this.metadata = const [],
});