Show / Hide Table of Contents

Interface INamespaceMapper

Interface for Namespace Maps which provide mappings between Namespace Prefixes and Namespace URIs.

Inherited Members
IDisposable.Dispose()
Namespace: VDS.RDF
Assembly: dotNetRdf.dll
Syntax
public interface INamespaceMapper : IDisposable

Properties

| Edit this page View Source

Prefixes

Gets a Enumeratorion of all the Prefixes.

Declaration
IEnumerable<string> Prefixes { get; }
Property Value
Type Description
IEnumerable<string>

Methods

| Edit this page View Source

AddNamespace(string, Uri)

Adds a Namespace to the Namespace Map.

Declaration
void AddNamespace(string prefix, Uri uri)
Parameters
Type Name Description
string prefix

Namespace Prefix.

Uri uri

Namespace Uri.

| Edit this page View Source

Clear()

Clears the Namespace Map.

Declaration
void Clear()
| Edit this page View Source

GetNamespaceUri(string)

Returns the Namespace URI associated with the given Prefix.

Declaration
Uri GetNamespaceUri(string prefix)
Parameters
Type Name Description
string prefix

The Prefix to lookup the Namespace URI for.

Returns
Type Description
Uri

URI for the Namespace.

| Edit this page View Source

GetPrefix(Uri)

Returns the Prefix associated with the given Namespace URI.

Declaration
string GetPrefix(Uri uri)
Parameters
Type Name Description
Uri uri

The Namespace URI to lookup the Prefix for.

Returns
Type Description
string

String prefix for the Namespace.

| Edit this page View Source

HasNamespace(string)

Method which checks whether a given Namespace Prefix is defined.

Declaration
bool HasNamespace(string prefix)
Parameters
Type Name Description
string prefix

Prefix to test.

Returns
Type Description
bool
| Edit this page View Source

Import(INamespaceMapper)

Imports the contents of another Namespace Map into this Namespace Map.

Declaration
void Import(INamespaceMapper nsmap)
Parameters
Type Name Description
INamespaceMapper nsmap

Namespace Map to import.

Remarks

Prefixes in the imported Map which are already defined in this Map are ignored, this may change in future releases.

| Edit this page View Source

ReduceToQName(string, out string, Func<string, bool>)

A Function which attempts to reduce a Uri to a QName.

Declaration
bool ReduceToQName(string uri, out string qname, Func<string, bool> validationFunction = null)
Parameters
Type Name Description
string uri

The Uri to attempt to reduce.

string qname

The value to output the QName to if possible.

Func<string, bool> validationFunction

A validation function to use to validate the QName. Only a QName value for which the validation function return true will be returned.

Returns
Type Description
bool
Remarks

This function will return a Boolean indicated whether it succeeded in reducing the Uri to a QName. If it did then the out parameter qname will contain the reduction, otherwise it will be the empty string.

| Edit this page View Source

RemoveNamespace(string)

Removes a Namespace from the Namespace Map.

Declaration
void RemoveNamespace(string prefix)
Parameters
Type Name Description
string prefix

Namespace Prefix of the Namespace to remove.

Events

| Edit this page View Source

NamespaceAdded

Event which is raised when a Namespace is Added

Declaration
event NamespaceChanged NamespaceAdded
Event Type
Type Description
NamespaceChanged
| Edit this page View Source

NamespaceModified

Event which is raised when a Namespace is Modified

Declaration
event NamespaceChanged NamespaceModified
Event Type
Type Description
NamespaceChanged
| Edit this page View Source

NamespaceRemoved

Event which is raised when a Namespace is Removed

Declaration
event NamespaceChanged NamespaceRemoved
Event Type
Type Description
NamespaceChanged

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Properties
    • Prefixes
  • Methods
    • AddNamespace(string, Uri)
    • Clear()
    • GetNamespaceUri(string)
    • GetPrefix(Uri)
    • HasNamespace(string)
    • Import(INamespaceMapper)
    • ReduceToQName(string, out string, Func<string, bool>)
    • RemoveNamespace(string)
  • Events
    • NamespaceAdded
    • NamespaceModified
    • NamespaceRemoved
  • Extension Methods
Back to top Generated by DocFX