NTriplesEncoder class final

Encoder for the N-Triples format.

This class extends the RdfGraphEncoder abstract class to convert RDF graphs into the N-Triples serialization format. N-Triples is a line-based format where each line represents a single triple, making it very simple to parse and generate.

The encoder creates one line for each triple in the form: <subject> <predicate> <object> .

N-Triples is fully compatible with the RDF 1.1 N-Triples specification (https://www.w3.org/TR/n-triples/).

Inheritance

Constructors

NTriplesEncoder({NTriplesEncoderOptions options = const NTriplesEncoderOptions()})
Creates a new N-Triples serializer

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind(Stream<RdfGraph> stream) Stream<String>
Transforms the provided stream.
inherited
cast<RS, RT>() Converter<RS, RT>
Provides a Converter<RS, RT> view of this stream transformer.
inherited
convert(RdfGraph graph, {String? baseUri}) String
Encodes an RDF graph to a string representation in a specific format.
override
fuse<TT>(Converter<String, TT> other) Converter<RdfGraph, TT>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startChunkedConversion(Sink<String> sink) Sink<RdfGraph>
Starts a chunked conversion.
inherited
toString() String
A string representation of this object.
inherited
withOptions(RdfGraphEncoderOptions options) RdfGraphEncoder
Creates a new encoder instance with the specified options.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited