Show / Hide Table of Contents

Class MimeTypeDefinition

Represents the definition of a MIME Type including mappings to relevant readers and writers.

Inheritance
object
MimeTypeDefinition
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF
Assembly: dotNetRdf.dll
Syntax
public sealed class MimeTypeDefinition

Constructors

| Edit this page View Source

MimeTypeDefinition(string, IEnumerable<string>, IEnumerable<string>)

Creates a new MIME Type Definition.

Declaration
public MimeTypeDefinition(string syntaxName, IEnumerable<string> mimeTypes, IEnumerable<string> fileExtensions)
Parameters
Type Name Description
string syntaxName

Syntax Name for the Syntax which has this MIME Type definition.

IEnumerable<string> mimeTypes

MIME Types.

IEnumerable<string> fileExtensions

File Extensions.

| Edit this page View Source

MimeTypeDefinition(string, IEnumerable<string>, IEnumerable<string>, Type, Type, Type, Type, Type, Type, decimal)

Creates a new MIME Type Definition.

Declaration
public MimeTypeDefinition(string syntaxName, IEnumerable<string> mimeTypes, IEnumerable<string> fileExtensions, Type rdfParserType, Type rdfDatasetParserType, Type sparqlResultsParserType, Type rdfWriterType, Type rdfDatasetWriterType, Type sparqlResultsWriterType, decimal preference = 1.0)
Parameters
Type Name Description
string syntaxName

Syntax Name for the Syntax which has this MIME Type definition.

IEnumerable<string> mimeTypes

MIME Types.

IEnumerable<string> fileExtensions

File Extensions.

Type rdfParserType

Type to use to parse RDF (or null if not applicable).

Type rdfDatasetParserType

Type to use to parse RDF Datasets (or null if not applicable).

Type sparqlResultsParserType

Type to use to parse SPARQL Results (or null if not applicable).

Type rdfWriterType

Type to use to writer RDF (or null if not applicable).

Type rdfDatasetWriterType

Type to use to write RDF Datasets (or null if not applicable).

Type sparqlResultsWriterType

Type to use to write SPARQL Results (or null if not applicable).

decimal preference

The preference level to specify for this mime type in Accept headers.

| Edit this page View Source

MimeTypeDefinition(string, string, IEnumerable<string>, IEnumerable<string>)

Creates a new MIME Type Definition.

Declaration
public MimeTypeDefinition(string syntaxName, string formatUri, IEnumerable<string> mimeTypes, IEnumerable<string> fileExtensions)
Parameters
Type Name Description
string syntaxName

Syntax Name for the Syntax which has this MIME Type definition.

string formatUri

Format URI as defined by the. W3C

IEnumerable<string> mimeTypes

MIME Types.

IEnumerable<string> fileExtensions

File Extensions.

| Edit this page View Source

MimeTypeDefinition(string, string, IEnumerable<string>, IEnumerable<string>, Type, Type, Type, Type, Type, Type)

Creates a new MIME Type Definition.

Declaration
public MimeTypeDefinition(string syntaxName, string formatUri, IEnumerable<string> mimeTypes, IEnumerable<string> fileExtensions, Type rdfParserType, Type rdfDatasetParserType, Type sparqlResultsParserType, Type rdfWriterType, Type rdfDatasetWriterType, Type sparqlResultsWriterType)
Parameters
Type Name Description
string syntaxName

Syntax Name for the Syntax which has this MIME Type definition.

string formatUri

Format URI as defined by the. W3C

IEnumerable<string> mimeTypes

MIME Types.

IEnumerable<string> fileExtensions

File Extensions.

Type rdfParserType

Type to use to parse RDF (or null if not applicable).

Type rdfDatasetParserType

Type to use to parse RDF Datasets (or null if not applicable).

Type sparqlResultsParserType

Type to use to parse SPARQL Results (or null if not applicable).

Type rdfWriterType

Type to use to writer RDF (or null if not applicable).

Type rdfDatasetWriterType

Type to use to write RDF Datasets (or null if not applicable).

Type sparqlResultsWriterType

Type to use to write SPARQL Results (or null if not applicable).

Properties

| Edit this page View Source

CanParseRdf

Gets whether this definition can instantiate a Parser that can parse RDF.

Declaration
public bool CanParseRdf { get; }
Property Value
Type Description
bool
| Edit this page View Source

CanParseRdfDatasets

Gets whether this definition can instantiate a Parser that can parse RDF Datasets.

Declaration
public bool CanParseRdfDatasets { get; }
Property Value
Type Description
bool
| Edit this page View Source

CanParseSparqlResults

Gets whether this definition can instantiate a Parser that can parse SPARQL Results.

Declaration
public bool CanParseSparqlResults { get; }
Property Value
Type Description
bool
| Edit this page View Source

CanWriteRdf

Gets whether the definition provides a RDF Writer.

Declaration
public bool CanWriteRdf { get; }
Property Value
Type Description
bool
| Edit this page View Source

CanWriteRdfDatasets

Gets whether the Definition provides a RDF Dataset Writer.

Declaration
public bool CanWriteRdfDatasets { get; }
Property Value
Type Description
bool
| Edit this page View Source

CanWriteSparqlResults

Gets whether the Definition provides a SPARQL Results Writer.

Declaration
public bool CanWriteSparqlResults { get; }
Property Value
Type Description
bool
| Edit this page View Source

CanonicalFileExtension

Gets/Sets the Canonical File Extension for this Syntax.

Declaration
public string CanonicalFileExtension { get; set; }
Property Value
Type Description
string
| Edit this page View Source

CanonicalMimeType

Gets the Canonical MIME Type that should be used.

Declaration
public string CanonicalMimeType { get; set; }
Property Value
Type Description
string
| Edit this page View Source

Encoding

Gets the Encoding that should be used for reading and writing this Syntax.

Declaration
public Encoding Encoding { get; set; }
Property Value
Type Description
Encoding
| Edit this page View Source

FileExtensions

Gets the File Extensions associated with this Syntax.

Declaration
public IEnumerable<string> FileExtensions { get; }
Property Value
Type Description
IEnumerable<string>
| Edit this page View Source

FormatUri

Gets the Format URI as defined by the W3C (where applicable).

Declaration
public string FormatUri { get; }
Property Value
Type Description
string
| Edit this page View Source

HasFileExtensions

Gets whether any file extensions are associated with this syntax.

Declaration
public bool HasFileExtensions { get; }
Property Value
Type Description
bool
| Edit this page View Source

MimeTypes

Gets the MIME Types defined.

Declaration
public IEnumerable<string> MimeTypes { get; }
Property Value
Type Description
IEnumerable<string>
| Edit this page View Source

ObjectParserTypes

Gets the registered Object Parser Types.

Declaration
public IEnumerable<KeyValuePair<Type, Type>> ObjectParserTypes { get; }
Property Value
Type Description
IEnumerable<KeyValuePair<Type, Type>>
| Edit this page View Source

Preference

Get or set the preference for this content type when specified in Accept headers. Value must be between 0.0 and 1.0.

Declaration
public decimal Preference { get; set; }
Property Value
Type Description
decimal
| Edit this page View Source

RdfDatasetParserType

Gets/Sets the Type to use to parse RDF Datasets (or null if not applicable).

Declaration
public Type RdfDatasetParserType { get; set; }
Property Value
Type Description
Type
| Edit this page View Source

RdfDatasetWriterType

Gets/Sets the Type to use to writer RDF Dataets (or null if not applicable).

Declaration
public Type RdfDatasetWriterType { get; set; }
Property Value
Type Description
Type
| Edit this page View Source

RdfParserType

Gets/Sets the Type to use to parse RDF (or null if not applicable).

Declaration
public Type RdfParserType { get; set; }
Property Value
Type Description
Type
| Edit this page View Source

RdfWriterType

Gets/Sets the Type to use to writer RDF (or null if not applicable).

Declaration
public Type RdfWriterType { get; set; }
Property Value
Type Description
Type
| Edit this page View Source

SparqlResultsParserType

Gets/Sets the Type to use to parse SPARQL Results (or null if not applicable).

Declaration
public Type SparqlResultsParserType { get; set; }
Property Value
Type Description
Type
| Edit this page View Source

SparqlResultsWriterType

Gets/Sets the Type to use to write SPARQL Results (or null if not applicable).

Declaration
public Type SparqlResultsWriterType { get; set; }
Property Value
Type Description
Type
| Edit this page View Source

SyntaxName

Gets the name of the Syntax to which this MIME Type Definition relates.

Declaration
public string SyntaxName { get; }
Property Value
Type Description
string

Methods

| Edit this page View Source

AddFileExtension(string)

Adds a File Extension for this Syntax.

Declaration
public void AddFileExtension(string ext)
Parameters
Type Name Description
string ext

File Extension.

| Edit this page View Source

AddMimeType(string)

Adds a MIME Type to this definition.

Declaration
public void AddMimeType(string type)
Parameters
Type Name Description
string type

MIME Type.

| Edit this page View Source

CanParseObject<T>()

Gets whether a particular Type of Object can be parsed.

Declaration
public bool CanParseObject<T>()
Returns
Type Description
bool
Type Parameters
Name Description
T

Object Type.

| Edit this page View Source

CheckValidMimeType(string)

Checks that MIME Types are valid.

Declaration
public string CheckValidMimeType(string type)
Parameters
Type Name Description
string type

Type.

Returns
Type Description
string
| Edit this page View Source

GetObjectParserType<T>()

Gets an Object Parser for the given Type.

Declaration
public Type GetObjectParserType<T>()
Returns
Type Description
Type
Type Parameters
Name Description
T

Object Type.

| Edit this page View Source

GetObjectParser<T>()

Gets an Object Parser for the given Type.

Declaration
public IObjectParser<T> GetObjectParser<T>()
Returns
Type Description
IObjectParser<T>
Type Parameters
Name Description
T

Object Type.

| Edit this page View Source

GetRdfDatasetParser()

Gets an instance of a RDF Dataset parser.

Declaration
public IStoreReader GetRdfDatasetParser()
Returns
Type Description
IStoreReader
| Edit this page View Source

GetRdfDatasetWriter()

Gets an instance of a RDF Dataset writer.

Declaration
public IStoreWriter GetRdfDatasetWriter()
Returns
Type Description
IStoreWriter
| Edit this page View Source

GetRdfParser()

Gets an instance of a RDF parser.

Declaration
public IRdfReader GetRdfParser()
Returns
Type Description
IRdfReader
| Edit this page View Source

GetRdfWriter()

Gets an instance of a RDF writer.

Declaration
public IRdfWriter GetRdfWriter()
Returns
Type Description
IRdfWriter
| Edit this page View Source

GetSparqlResultsParser()

Gets an instance of a SPARQL Results parser.

Declaration
public ISparqlResultsReader GetSparqlResultsParser()
Returns
Type Description
ISparqlResultsReader
| Edit this page View Source

GetSparqlResultsWriter()

Gets an instance of a SPARQL Results writer.

Declaration
public ISparqlResultsWriter GetSparqlResultsWriter()
Returns
Type Description
ISparqlResultsWriter
| Edit this page View Source

SetObjectParserType<T>(Type)

Sets an Object Parser for the given Type.

Declaration
public void SetObjectParserType<T>(Type parserType)
Parameters
Type Name Description
Type parserType

Parser Type.

Type Parameters
Name Description
T

Object Type.

| Edit this page View Source

SupportsFileExtension(string)

Determines whether the Definition supports a particular File Extension.

Declaration
public bool SupportsFileExtension(string ext)
Parameters
Type Name Description
string ext

File Extension.

Returns
Type Description
bool
| Edit this page View Source

SupportsMimeType(string)

Determines whether the Definition supports a particular MIME type.

Declaration
[Obsolete("Deprecated in favour of the alternative overload which takes a MimeTypeSelector", true)]
public bool SupportsMimeType(string mimeType)
Parameters
Type Name Description
string mimeType

MIME Type.

Returns
Type Description
bool
| Edit this page View Source

SupportsMimeType(MimeTypeSelector)

Determines whether the definition supports the MIME type specified by the selector.

Declaration
public bool SupportsMimeType(MimeTypeSelector selector)
Parameters
Type Name Description
MimeTypeSelector selector

MIME Type selector.

Returns
Type Description
bool

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • MimeTypeDefinition(string, IEnumerable<string>, IEnumerable<string>)
    • MimeTypeDefinition(string, IEnumerable<string>, IEnumerable<string>, Type, Type, Type, Type, Type, Type, decimal)
    • MimeTypeDefinition(string, string, IEnumerable<string>, IEnumerable<string>)
    • MimeTypeDefinition(string, string, IEnumerable<string>, IEnumerable<string>, Type, Type, Type, Type, Type, Type)
  • Properties
    • CanParseRdf
    • CanParseRdfDatasets
    • CanParseSparqlResults
    • CanWriteRdf
    • CanWriteRdfDatasets
    • CanWriteSparqlResults
    • CanonicalFileExtension
    • CanonicalMimeType
    • Encoding
    • FileExtensions
    • FormatUri
    • HasFileExtensions
    • MimeTypes
    • ObjectParserTypes
    • Preference
    • RdfDatasetParserType
    • RdfDatasetWriterType
    • RdfParserType
    • RdfWriterType
    • SparqlResultsParserType
    • SparqlResultsWriterType
    • SyntaxName
  • Methods
    • AddFileExtension(string)
    • AddMimeType(string)
    • CanParseObject<T>()
    • CheckValidMimeType(string)
    • GetObjectParserType<T>()
    • GetObjectParser<T>()
    • GetRdfDatasetParser()
    • GetRdfDatasetWriter()
    • GetRdfParser()
    • GetRdfWriter()
    • GetSparqlResultsParser()
    • GetSparqlResultsWriter()
    • SetObjectParserType<T>(Type)
    • SupportsFileExtension(string)
    • SupportsMimeType(string)
    • SupportsMimeType(MimeTypeSelector)
  • Extension Methods
Back to top Generated by DocFX