Class MimeTypeDefinition
Represents the definition of a MIME Type including mappings to relevant readers and writers.
Inheritance
System.Object
MimeTypeDefinition
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
Assembly: dotNetRDF.dll
Syntax
public sealed class MimeTypeDefinition
Constructors
| Improve this Doc View SourceMimeTypeDefinition(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 |
---|---|---|
System.String | syntaxName | Syntax Name for the Syntax which has this MIME Type definition. |
System.Collections.Generic.IEnumerable<System.String> | mimeTypes | MIME Types. |
System.Collections.Generic.IEnumerable<System.String> | fileExtensions | File Extensions. |
MimeTypeDefinition(String, IEnumerable<String>, IEnumerable<String>, Type, Type, Type, Type, Type, Type)
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)
Parameters
Type | Name | Description |
---|---|---|
System.String | syntaxName | Syntax Name for the Syntax which has this MIME Type definition. |
System.Collections.Generic.IEnumerable<System.String> | mimeTypes | MIME Types. |
System.Collections.Generic.IEnumerable<System.String> | fileExtensions | File Extensions. |
System.Type | rdfParserType | Type to use to parse RDF (or null if not applicable). |
System.Type | rdfDatasetParserType | Type to use to parse RDF Datasets (or null if not applicable). |
System.Type | sparqlResultsParserType | Type to use to parse SPARQL Results (or null if not applicable). |
System.Type | rdfWriterType | Type to use to writer RDF (or null if not applicable). |
System.Type | rdfDatasetWriterType | Type to use to write RDF Datasets (or null if not applicable). |
System.Type | sparqlResultsWriterType | Type to use to write SPARQL Results (or null if not applicable). |
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 |
---|---|---|
System.String | syntaxName | Syntax Name for the Syntax which has this MIME Type definition. |
System.String | formatUri | Format URI as defined by the. W3C |
System.Collections.Generic.IEnumerable<System.String> | mimeTypes | MIME Types. |
System.Collections.Generic.IEnumerable<System.String> | fileExtensions | File Extensions. |
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 |
---|---|---|
System.String | syntaxName | Syntax Name for the Syntax which has this MIME Type definition. |
System.String | formatUri | Format URI as defined by the. W3C |
System.Collections.Generic.IEnumerable<System.String> | mimeTypes | MIME Types. |
System.Collections.Generic.IEnumerable<System.String> | fileExtensions | File Extensions. |
System.Type | rdfParserType | Type to use to parse RDF (or null if not applicable). |
System.Type | rdfDatasetParserType | Type to use to parse RDF Datasets (or null if not applicable). |
System.Type | sparqlResultsParserType | Type to use to parse SPARQL Results (or null if not applicable). |
System.Type | rdfWriterType | Type to use to writer RDF (or null if not applicable). |
System.Type | rdfDatasetWriterType | Type to use to write RDF Datasets (or null if not applicable). |
System.Type | sparqlResultsWriterType | Type to use to write SPARQL Results (or null if not applicable). |
Properties
| Improve this Doc View SourceCanonicalFileExtension
Gets/Sets the Canonical File Extension for this Syntax.
Declaration
public string CanonicalFileExtension { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CanonicalMimeType
Gets the Canonical MIME Type that should be used.
Declaration
public string CanonicalMimeType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CanParseRdf
Gets whether this definition can instantiate a Parser that can parse RDF.
Declaration
public bool CanParseRdf { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CanParseRdfDatasets
Gets whether this definition can instantiate a Parser that can parse RDF Datasets.
Declaration
public bool CanParseRdfDatasets { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CanParseSparqlResults
Gets whether this definition can instantiate a Parser that can parse SPARQL Results.
Declaration
public bool CanParseSparqlResults { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CanWriteRdf
Gets whether the definition provides a RDF Writer.
Declaration
public bool CanWriteRdf { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CanWriteRdfDatasets
Gets whether the Definition provides a RDF Dataset Writer.
Declaration
public bool CanWriteRdfDatasets { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CanWriteSparqlResults
Gets whether the Definition provides a SPARQL Results Writer.
Declaration
public bool CanWriteSparqlResults { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Encoding
Gets the Encoding that should be used for reading and writing this Syntax.
Declaration
public Encoding Encoding { get; set; }
Property Value
Type | Description |
---|---|
System.Text.Encoding |
FileExtensions
Gets the File Extensions associated with this Syntax.
Declaration
public IEnumerable<string> FileExtensions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
FormatUri
Gets the Format URI as defined by the W3C (where applicable).
Declaration
public string FormatUri { get; }
Property Value
Type | Description |
---|---|
System.String |
HasFileExtensions
Gets whether any file extensions are associated with this syntax.
Declaration
public bool HasFileExtensions { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MimeTypes
Gets the MIME Types defined.
Declaration
public IEnumerable<string> MimeTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
ObjectParserTypes
Gets the registered Object Parser Types.
Declaration
public IEnumerable<KeyValuePair<Type, Type>> ObjectParserTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Type, System.Type>> |
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 |
---|---|
System.Type |
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 |
---|---|
System.Type |
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 |
---|---|
System.Type |
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 |
---|---|
System.Type |
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 |
---|---|
System.Type |
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 |
---|---|
System.Type |
SyntaxName
Gets the name of the Syntax to which this MIME Type Definition relates.
Declaration
public string SyntaxName { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceAddFileExtension(String)
Adds a File Extension for this Syntax.
Declaration
public void AddFileExtension(string ext)
Parameters
Type | Name | Description |
---|---|---|
System.String | ext | File Extension. |
AddMimeType(String)
Adds a MIME Type to this definition.
Declaration
public void AddMimeType(string type)
Parameters
Type | Name | Description |
---|---|---|
System.String | type | MIME Type. |
CanParseObject<T>()
Gets whether a particular Type of Object can be parsed.
Declaration
public bool CanParseObject<T>()
Returns
Type | Description |
---|---|
System.Boolean |
Type Parameters
Name | Description |
---|---|
T | Object Type. |
CheckValidMimeType(String)
Checks that MIME Types are valid.
Declaration
public string CheckValidMimeType(string type)
Parameters
Type | Name | Description |
---|---|---|
System.String | type | Type. |
Returns
Type | Description |
---|---|
System.String |
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. |
GetObjectParserType<T>()
Gets an Object Parser for the given Type.
Declaration
public Type GetObjectParserType<T>()
Returns
Type | Description |
---|---|
System.Type |
Type Parameters
Name | Description |
---|---|
T | Object Type. |
GetRdfDatasetParser()
Gets an instance of a RDF Dataset parser.
Declaration
public IStoreReader GetRdfDatasetParser()
Returns
Type | Description |
---|---|
IStoreReader |
GetRdfDatasetWriter()
Gets an instance of a RDF Dataset writer.
Declaration
public IStoreWriter GetRdfDatasetWriter()
Returns
Type | Description |
---|---|
IStoreWriter |
GetRdfParser()
Gets an instance of a RDF parser.
Declaration
public IRdfReader GetRdfParser()
Returns
Type | Description |
---|---|
IRdfReader |
GetRdfWriter()
Gets an instance of a RDF writer.
Declaration
public IRdfWriter GetRdfWriter()
Returns
Type | Description |
---|---|
IRdfWriter |
GetSparqlResultsParser()
Gets an instance of a SPARQL Results parser.
Declaration
public ISparqlResultsReader GetSparqlResultsParser()
Returns
Type | Description |
---|---|
ISparqlResultsReader |
GetSparqlResultsWriter()
Gets an instance of a SPARQL Results writer.
Declaration
public ISparqlResultsWriter GetSparqlResultsWriter()
Returns
Type | Description |
---|---|
ISparqlResultsWriter |
SetObjectParserType<T>(Type)
Sets an Object Parser for the given Type.
Declaration
public void SetObjectParserType<T>(Type parserType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | parserType | Parser Type. |
Type Parameters
Name | Description |
---|---|
T | Object Type. |
SupportsFileExtension(String)
Determines whether the Definition supports a particular File Extension.
Declaration
public bool SupportsFileExtension(string ext)
Parameters
Type | Name | Description |
---|---|---|
System.String | ext | File Extension. |
Returns
Type | Description |
---|---|
System.Boolean |
SupportsMimeType(String)
Determines whether the Definition supports a particular MIME type.
Declaration
[Obsolete("Deprecated in favour of the alternative overload which takes a MimeTypeSelector", false)]
public bool SupportsMimeType(string mimeType)
Parameters
Type | Name | Description |
---|---|---|
System.String | mimeType | MIME Type. |
Returns
Type | Description |
---|---|
System.Boolean |
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 |
---|---|
System.Boolean |