Interface INamespaceMapper
Interface for Namespace Maps which provide mappings between Namespace Prefixes and Namespace URIs.
Inherited Members
System.IDisposable.Dispose()
Namespace: VDS.RDF
Assembly: dotNetRDF.dll
Syntax
public interface INamespaceMapper : IDisposable
Properties
| Improve this Doc View SourcePrefixes
Gets a Enumeratorion of all the Prefixes.
Declaration
IEnumerable<string> Prefixes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
Methods
| Improve this Doc View SourceAddNamespace(String, Uri)
Adds a Namespace to the Namespace Map.
Declaration
void AddNamespace(string prefix, Uri uri)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | Namespace Prefix. |
System.Uri | uri | Namespace Uri. |
Clear()
Clears the Namespace Map.
Declaration
void Clear()
GetNamespaceUri(String)
Returns the Namespace URI associated with the given Prefix.
Declaration
Uri GetNamespaceUri(string prefix)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | The Prefix to lookup the Namespace URI for. |
Returns
Type | Description |
---|---|
System.Uri | URI for the Namespace. |
GetPrefix(Uri)
Returns the Prefix associated with the given Namespace URI.
Declaration
string GetPrefix(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | The Namespace URI to lookup the Prefix for. |
Returns
Type | Description |
---|---|
System.String | String prefix for the Namespace. |
HasNamespace(String)
Method which checks whether a given Namespace Prefix is defined.
Declaration
bool HasNamespace(string prefix)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | Prefix to test. |
Returns
Type | Description |
---|---|
System.Boolean |
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.
|
Improve this Doc
View Source
ReduceToQName(String, out String)
A Function which attempts to reduce a Uri to a QName.
Declaration
bool ReduceToQName(string uri, out string qname)
Parameters
Type | Name | Description |
---|---|---|
System.String | uri | The Uri to attempt to reduce. |
System.String | qname | The value to output the QName to if possible. |
Returns
Type | Description |
---|---|
System.Boolean |
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.
|
Improve this Doc
View Source
RemoveNamespace(String)
Removes a Namespace from the Namespace Map.
Declaration
void RemoveNamespace(string prefix)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | Namespace Prefix of the Namespace to remove. |
Events
| Improve this Doc View SourceNamespaceAdded
Event which is raised when a Namespace is Added
Declaration
event NamespaceChanged NamespaceAdded
Event Type
Type | Description |
---|---|
NamespaceChanged |
NamespaceModified
Event which is raised when a Namespace is Modified
Declaration
event NamespaceChanged NamespaceModified
Event Type
Type | Description |
---|---|
NamespaceChanged |
NamespaceRemoved
Event which is raised when a Namespace is Removed
Declaration
event NamespaceChanged NamespaceRemoved
Event Type
Type | Description |
---|---|
NamespaceChanged |