YAML Schema to RDF Generator

Generate a JSON LD representation of the model

class linkml.generators.rdfgen.RDFGenerator(schema: Union[str, TextIO, linkml_runtime.linkml_model.meta.SchemaDefinition, ForwardRef('Generator'), pathlib.Path], schemaview: Optional[linkml_runtime.utils.schemaview.SchemaView] = None, format: Optional[str] = None, metadata: bool = True, useuris: Optional[bool] = None, log_level: Optional[int] = 30, mergeimports: Optional[bool] = True, source_file_date: Optional[str] = None, source_file_size: Optional[int] = None, logger: Optional[logging.Logger] = None, verbose: Optional[bool] = None, output: Optional[str] = None, namespaces: Optional[linkml_runtime.utils.namespaces.Namespaces] = None, directory_output: bool = False, base_dir: str = None, metamodel_name_map: Dict[str, str] = None, importmap: Union[str, Mapping[str, str], NoneType] = None, emit_prefixes: Set[str] = <factory>, metamodel: linkml.utils.schemaloader.SchemaLoader = None, stacktrace: bool = False, emit_metadata: bool = False, context: List[str] = None, original_schema: linkml_runtime.linkml_model.meta.SchemaDefinition = None, **_kwargs)[source]#
context: List[str] = None#
emit_metadata: bool = False#
end_schema(output: str | None = None, context: str | None = None, **_) str[source]#

Visited once at the end of generation

@param kwargs: Arguments passed through from CLI – implementation dependent

generatorname: ClassVar[str] = 'rdfgen.py'#

Name of the generator. Override with os.path.basename(__file__)

generatorversion: ClassVar[str] = '0.1.1'#

Version of the generator. Consider deprecating and instead use overall linkml version

original_schema: SchemaDefinition = None#



See https

uses_schemaloader: ClassVar[bool] = True#

Old-style generator that uses the SchemaLoader and visitor pattern

valid_formats: ClassVar[List[str]] = ['ttl', 'hext', 'json-ld', 'n3', 'nquads', 'nt', 'nt11', 'ntriples', 'trig', 'trix', 'ttl', 'turtle', 'xml']#

Allowed formats - first format is default

visit_all_class_slots: ClassVar[bool] = False#

False means only visit own slots, True means visit all slots


Visitor ClassVar