Show / Hide Table of Contents

Class BaseRdfWriter

Base implementation of IRdfWriter that simply handles the logic of optionally closing a text writer stream.
Inheritance
System.Object
BaseRdfWriter
BaseGZipWriter
CompressingTurtleWriter
CsvWriter
GraphVizWriter
Notation3Writer
NTriplesWriter
PrettyRdfXmlWriter
RdfJsonWriter
RdfXmlWriter
TsvWriter
TurtleWriter
Implements
IRdfWriter
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF.Writing
Assembly: dotNetRDF.dll
Syntax
public abstract class BaseRdfWriter : IRdfWriter

Methods

| Improve this Doc View Source

Save(IGraph, TextWriter)

Method for Saving a Graph to a Concrete RDF Syntax via some arbitrary System.IO.TextWriter.
Declaration
public void Save(IGraph g, TextWriter output)
Parameters
Type Name Description
IGraph g The Graph to Save.
System.IO.TextWriter output The System.IO.TextWriter to save the Graph to.
Exceptions
Type Condition
RdfException Thrown if the RDF in the Graph is not representable by the Writer.
System.IO.IOException Thrown if the Writer is unable to write to the underlying storage of the System.IO.TextWriter specified in the output.
| Improve this Doc View Source

Save(IGraph, TextWriter, Boolean)

Method for saving a graph to a concrete RDF syntax via some arbitray System.IO.TextWriter.
Declaration
public void Save(IGraph g, TextWriter output, bool leaveOpen)
Parameters
Type Name Description
IGraph g The graph to save.
System.IO.TextWriter output The System.IO.TextWriter to save the graph to.
System.Boolean leaveOpen
true
to leave the stream open when the method completes;.
false
otherwise.
Exceptions
Type Condition
RdfException Thrown if the RDF in the graph is not representable by the writer.
System.IO.IOException Thrown if the writer is unable to write to the underlying storage of the System.IO.TextWriter specified in the output.
| Improve this Doc View Source

Save(IGraph, String)

Method for Saving a Graph to a Concrete RDF Syntax in a file based format.
Declaration
public abstract void Save(IGraph g, string filename)
Parameters
Type Name Description
IGraph g The Graph to Save.
System.String filename The filename to save the Graph in.
Exceptions
Type Condition
RdfException Thrown if the RDF in the Graph is not representable by the Writer.
System.IO.IOException Thrown if the Writer is unable to write to the File.
| Improve this Doc View Source

SaveInternal(IGraph, TextWriter)

Method to be implemented in derived classes to perform the actual writing to a TextWriter.
Declaration
protected abstract void SaveInternal(IGraph graph, TextWriter output)
Parameters
Type Name Description
IGraph graph The graph to be saved.
System.IO.TextWriter output The System.IO.TextWriter to save the graph to.

Events

| Improve this Doc View Source

Warning

Event which writers can raise to indicate possible ambiguities or issues in the syntax they are producing
Declaration
public abstract event RdfWriterWarning Warning
Event Type
Type Description
RdfWriterWarning

Implements

IRdfWriter

Extension Methods

Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Methods
    • Save(IGraph, TextWriter)
    • Save(IGraph, TextWriter, Boolean)
    • Save(IGraph, String)
    • SaveInternal(IGraph, TextWriter)
  • Events
    • Warning
  • Implements
  • Extension Methods
Back to top Generated by DocFX