swish-0.6.0.1: A semantic web toolkit.

PortabilityOverloadedStrings
Stabilityexperimental
MaintainerDouglas Burke

Swish.Utils.QName

Description

This module defines an algebraic datatype for qualified names (QNames).

Synopsis

Documentation

data QName Source

A qualified name, consisting of a namespace URI and the local part of the identifier.

Instances

Eq QName

Equality is determined by a case sensitive comparison of the URI.

Ord QName 
Show QName

The format used to display the URI is uri.

IsString QName

This is not total since it will fail if the input string is not a valid URI.

FromRDFLabel QName

Converts from a Resource.

ToRDFLabel QName

Converts to a Resource.

getNamespace :: QName -> URISource

Return the URI of the namespace stored in the QName. This does not contain the local component.

getLocalName :: QName -> TextSource

Return the local component of the QName.

getQNameURI :: QName -> URISource

Returns the full URI of the QName (ie the combination of the namespace and local components).

qnameFromFilePath :: FilePath -> IO QNameSource

Convert a filepath to a file: URI stored in a QName. If the input file path is relative then the working directory is used to convert it into an absolute path.

If the input represents a directory then it *must* end in the directory separator - so for Posix systems use "/foo/bar/" rather than "/foo/bar".

This has not been tested on Windows.