Show / Hide Table of Contents

Class QNameOutputMapper

Class for representing Mappings from URIs to QNames.
Inheritance
System.Object
NamespaceMapper
QNameOutputMapper
ThreadSafeQNameOutputMapper
Implements
INamespaceMapper
System.IDisposable
Inherited Members
NamespaceMapper.RDF
NamespaceMapper.RDFS
NamespaceMapper.XMLSCHEMA
NamespaceMapper.OWL
NamespaceMapper._uris
NamespaceMapper._prefixes
NamespaceMapper.GetPrefix(Uri)
NamespaceMapper.GetNamespaceUri(String)
NamespaceMapper.AddNamespace(String, Uri)
NamespaceMapper.RemoveNamespace(String)
NamespaceMapper.HasNamespace(String)
NamespaceMapper.HasNamespace(Uri)
NamespaceMapper.Clear()
NamespaceMapper.Prefixes
NamespaceMapper.Import(INamespaceMapper)
NamespaceMapper.NamespaceAdded
NamespaceMapper.NamespaceModified
NamespaceMapper.NamespaceRemoved
NamespaceMapper.OnNamespaceAdded(String, Uri)
NamespaceMapper.OnNamespaceModified(String, Uri)
NamespaceMapper.OnNamespaceRemoved(String, Uri)
NamespaceMapper.Dispose()
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 class QNameOutputMapper : NamespaceMapper, INamespaceMapper, IDisposable
Remarks
Used primarily in outputting RDF syntax.

Constructors

| Improve this Doc View Source

QNameOutputMapper()

Creates a new QName Output Mapper which has an empty Namespace Map.
Declaration
public QNameOutputMapper()
| Improve this Doc View Source

QNameOutputMapper(INamespaceMapper)

Creates a new QName Output Mapper using the given Namespace Map.
Declaration
public QNameOutputMapper(INamespaceMapper nsmapper)
Parameters
Type Name Description
INamespaceMapper nsmapper Namespace Map.

Fields

| Improve this Doc View Source

_mapping

Mapping of URIs to QNames.
Declaration
protected MultiDictionary<string, QNameMapping> _mapping
Field Value
Type Description
VDS.Common.Collections.MultiDictionary<System.String, QNameMapping>
| Improve this Doc View Source

_nextNamespaceID

Next available Temporary Namespace ID.
Declaration
protected int _nextNamespaceID
Field Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

AddToCache(String, QNameMapping)

Adds a QName mapping to the cache.
Declaration
protected virtual void AddToCache(string uri, QNameMapping mapping)
Parameters
Type Name Description
System.String uri URI.
QNameMapping mapping Mapping.
| Improve this Doc View Source

ReduceToQName(String, out String)

A Function which attempts to reduce a Uri to a QName.
Declaration
public override 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
Overrides
NamespaceMapper.ReduceToQName(String, out String)
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

ReduceToQName(String, out String, out String)

A Function which attempts to reduce a Uri to a QName and issues a Temporary Namespace if required.
Declaration
public bool ReduceToQName(string uri, out string qname, out string tempNamespace)
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.
System.String tempNamespace The Temporary Namespace issued (if any).
Returns
Type Description
System.Boolean
Remarks

This function will always returns a possible QName for the URI if the format of the URI permits it. It doesn't guarentee that the QName will be valid for the syntax it is being written to - it is up to implementers of writers to validate the QNames returned.

Where necessary a Temporary Namespace will be issued and the tempNamespace parameter will be set to the prefix of the new temporary namespace.

Implements

INamespaceMapper
System.IDisposable

Extension Methods

Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • QNameOutputMapper()
    • QNameOutputMapper(INamespaceMapper)
  • Fields
    • _mapping
    • _nextNamespaceID
  • Methods
    • AddToCache(String, QNameMapping)
    • ReduceToQName(String, out String)
    • ReduceToQName(String, out String, out String)
  • Implements
  • Extension Methods
Back to top Generated by DocFX