rdf4h-5.0.1: A library for RDF processing in Haskell
Safe HaskellNone
LanguageHaskell2010

Data.RDF.Namespace

Description

Defines types and utility functions related to namespaces, and some predefined values for commonly used namespaces, such as rdf, xsd, dublin core, etc.

Synopsis

Namespace types and functions

data Namespace Source #

Represents a namespace as either a prefix and uri, respectively, or just a uri.

Instances

Instances details
Eq Namespace Source # 
Instance details

Defined in Data.RDF.Types

Show Namespace Source # 
Instance details

Defined in Data.RDF.Types

mkPlainNS :: Text -> Namespace Source #

Make a namespace for the given URI reference.

mkPrefixedNS :: Text -> Text -> Namespace Source #

Make a namespace having the given prefix for the given URI reference, respectively.

mkPrefixedNS' :: String -> String -> Namespace Source #

Make a namespace having the given prefix for the given URI reference, respectively, using strings which will be converted to bytestrings automatically.

newtype PrefixMappings Source #

An alias for a map from prefix to namespace URI.

Constructors

PrefixMappings (Map Text Text) 

Instances

Instances details
Eq PrefixMappings Source # 
Instance details

Defined in Data.RDF.Types

Ord PrefixMappings Source # 
Instance details

Defined in Data.RDF.Types

Show PrefixMappings Source # 
Instance details

Defined in Data.RDF.Types

Generic PrefixMappings Source # 
Instance details

Defined in Data.RDF.Types

Associated Types

type Rep PrefixMappings :: Type -> Type #

Semigroup PrefixMappings Source # 
Instance details

Defined in Data.RDF.Types

Monoid PrefixMappings Source # 
Instance details

Defined in Data.RDF.Types

Binary PrefixMappings Source # 
Instance details

Defined in Data.RDF.Types

NFData PrefixMappings Source # 
Instance details

Defined in Data.RDF.Types

Methods

rnf :: PrefixMappings -> () #

type Rep PrefixMappings Source # 
Instance details

Defined in Data.RDF.Types

type Rep PrefixMappings = D1 ('MetaData "PrefixMappings" "Data.RDF.Types" "rdf4h-5.0.1-ILsYSRUr1TL4ltcw62SdWg" 'True) (C1 ('MetaCons "PrefixMappings" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text))))

toPMList :: PrefixMappings -> [(Text, Text)] Source #

View the prefix mappings as a list of key-value pairs. The PM in in the name is to reduce name clashes if used without qualifying.

mkUri :: Namespace -> Text -> Text Source #

Make a URI consisting of the given namespace and the given localname.

prefixOf :: Namespace -> Maybe Text Source #

Determine the prefix of the given namespace, if it has one.

uriOf :: Namespace -> Text Source #

Determine the URI of the given namespace.

Predefined namespace values

rdf :: Namespace Source #

The RDF namespace.

rdfs :: Namespace Source #

The RDF Schema namespace.

dc :: Namespace Source #

The Dublin Core namespace.

dct :: Namespace Source #

The Dublin Core terms namespace.

owl :: Namespace Source #

The OWL namespace.

schema :: Namespace Source #

The Schema.org namespace

xml :: Namespace Source #

The XML Schema namespace.

xsd :: Namespace Source #

The XML Schema namespace.

skos :: Namespace Source #

The SKOS namespace.

foaf :: Namespace Source #

The friend of a friend namespace.

ex :: Namespace Source #

Example namespace #1.

ex2 :: Namespace Source #

Example namespace #2.

standard_ns_mappings :: PrefixMappings Source #

The set of common predefined namespaces as a PrefixMappings value.

ns_mappings :: [Namespace] -> PrefixMappings Source #

Takes a list of Namespaces and returns PrefixMappings.