{-# Language OverloadedStrings #-}
module Swish.RDF.Vocabulary.RDF
(
namespaceRDF
, namespaceRDFS
, rdfRDF
, rdfDescription
, rdfID
, rdfAbout
, rdfParseType
, rdfResource
, rdfLi
, rdfNodeID
, rdfDatatype
, rdf1, rdf2, rdfn
, rdfsResource
, rdfsClass
, rdfsLiteral
, rdfsDatatype
, rdfXMLLiteral
, rdfProperty
, rdfsRange
, rdfsDomain
, rdfType
, rdfsSubClassOf
, rdfsSubPropertyOf
, rdfsLabel
, rdfsComment
, rdfsContainer
, rdfBag
, rdfSeq
, rdfAlt
, rdfsContainerMembershipProperty
, rdfsMember
, rdfList
, rdfFirst
, rdfRest
, rdfNil
, rdfStatement
, rdfSubject
, rdfPredicate
, rdfObject
, rdfsSeeAlso
, rdfsIsDefinedBy
, rdfValue
)
where
import Swish.Namespace (Namespace, makeNamespace, ScopedName, makeNSScopedName)
import Swish.QName (LName, newLName)
import Data.Maybe (fromMaybe, fromJust)
import Data.Word (Word32)
import Network.URI (URI, parseURI)
import qualified Data.Text as T
rdfURI, rdfsURI :: URI
rdfURI :: URI
rdfURI = URI -> Maybe URI -> URI
forall a. a -> Maybe a -> a
fromMaybe ([Char] -> URI
forall a. HasCallStack => [Char] -> a
error [Char]
"Internal error processing RDF URI") (Maybe URI -> URI) -> Maybe URI -> URI
forall a b. (a -> b) -> a -> b
$ [Char] -> Maybe URI
parseURI [Char]
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
rdfsURI :: URI
rdfsURI = URI -> Maybe URI -> URI
forall a. a -> Maybe a -> a
fromMaybe ([Char] -> URI
forall a. HasCallStack => [Char] -> a
error [Char]
"Internal error processing RDFS URI") (Maybe URI -> URI) -> Maybe URI -> URI
forall a b. (a -> b) -> a -> b
$ [Char] -> Maybe URI
parseURI [Char]
"http://www.w3.org/2000/01/rdf-schema#"
namespaceRDF :: Namespace
namespaceRDF :: Namespace
namespaceRDF = Maybe Text -> URI -> Namespace
makeNamespace (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
"rdf") URI
rdfURI
namespaceRDFS :: Namespace
namespaceRDFS :: Namespace
namespaceRDFS = Maybe Text -> URI -> Namespace
makeNamespace (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
"rdfs") URI
rdfsURI
toRDF, toRDFS :: LName -> ScopedName
toRDF :: LName -> ScopedName
toRDF = Namespace -> LName -> ScopedName
makeNSScopedName Namespace
namespaceRDF
toRDFS :: LName -> ScopedName
toRDFS = Namespace -> LName -> ScopedName
makeNSScopedName Namespace
namespaceRDFS
rdfRDF :: ScopedName
rdfRDF :: ScopedName
rdfRDF = LName -> ScopedName
toRDF LName
"RDF"
rdfDescription :: ScopedName
rdfDescription :: ScopedName
rdfDescription = LName -> ScopedName
toRDF LName
"Description"
rdfDatatype :: ScopedName
rdfDatatype :: ScopedName
rdfDatatype = LName -> ScopedName
toRDF LName
"datatype"
rdfResource :: ScopedName
rdfResource :: ScopedName
rdfResource = LName -> ScopedName
toRDF LName
"resource"
rdfAbout :: ScopedName
rdfAbout :: ScopedName
rdfAbout = LName -> ScopedName
toRDF LName
"about"
rdfID :: ScopedName
rdfID :: ScopedName
rdfID = LName -> ScopedName
toRDF LName
"ID"
rdfParseType :: ScopedName
rdfParseType :: ScopedName
rdfParseType = LName -> ScopedName
toRDF LName
"parseType"
rdfLi :: ScopedName
rdfLi :: ScopedName
rdfLi = LName -> ScopedName
toRDF LName
"li"
rdfNodeID :: ScopedName
rdfNodeID :: ScopedName
rdfNodeID = LName -> ScopedName
toRDF LName
"nodeID"
rdfn ::
Word32
-> ScopedName
rdfn :: Word32 -> ScopedName
rdfn = LName -> ScopedName
toRDF (LName -> ScopedName) -> (Word32 -> LName) -> Word32 -> ScopedName
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Maybe LName -> LName
forall a. HasCallStack => Maybe a -> a
fromJust (Maybe LName -> LName)
-> (Word32 -> Maybe LName) -> Word32 -> LName
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Maybe LName
newLName (Text -> Maybe LName) -> (Word32 -> Text) -> Word32 -> Maybe LName
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Text
T.pack ([Char] -> Text) -> (Word32 -> [Char]) -> Word32 -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ([Char]
"_" [Char] -> [Char] -> [Char]
forall a. [a] -> [a] -> [a]
++) ([Char] -> [Char]) -> (Word32 -> [Char]) -> Word32 -> [Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word32 -> [Char]
forall a. Show a => a -> [Char]
show
rdf1 :: ScopedName
rdf1 :: ScopedName
rdf1 = LName -> ScopedName
toRDF LName
"_1"
rdf2 :: ScopedName
rdf2 :: ScopedName
rdf2 = LName -> ScopedName
toRDF LName
"_2"
rdfFirst :: ScopedName
rdfFirst :: ScopedName
rdfFirst = LName -> ScopedName
toRDF LName
"first"
rdfRest :: ScopedName
rdfRest :: ScopedName
rdfRest = LName -> ScopedName
toRDF LName
"rest"
rdfNil :: ScopedName
rdfNil :: ScopedName
rdfNil = LName -> ScopedName
toRDF LName
"nil"
rdfType :: ScopedName
rdfType :: ScopedName
rdfType = LName -> ScopedName
toRDF LName
"type"
rdfProperty :: ScopedName
rdfProperty :: ScopedName
rdfProperty = LName -> ScopedName
toRDF LName
"Property"
rdfXMLLiteral :: ScopedName
rdfXMLLiteral :: ScopedName
rdfXMLLiteral = LName -> ScopedName
toRDF LName
"XMLLiteral"
rdfsResource :: ScopedName
rdfsResource :: ScopedName
rdfsResource = LName -> ScopedName
toRDFS LName
"Resource"
rdfsClass :: ScopedName
rdfsClass :: ScopedName
rdfsClass = LName -> ScopedName
toRDFS LName
"Class"
rdfsLiteral :: ScopedName
rdfsLiteral :: ScopedName
rdfsLiteral = LName -> ScopedName
toRDFS LName
"Literal"
rdfsDatatype :: ScopedName
rdfsDatatype :: ScopedName
rdfsDatatype = LName -> ScopedName
toRDFS LName
"Datatype"
rdfsLabel :: ScopedName
rdfsLabel :: ScopedName
rdfsLabel = LName -> ScopedName
toRDFS LName
"label"
rdfsComment :: ScopedName
= LName -> ScopedName
toRDFS LName
"comment"
rdfsRange :: ScopedName
rdfsRange :: ScopedName
rdfsRange = LName -> ScopedName
toRDFS LName
"range"
rdfsDomain :: ScopedName
rdfsDomain :: ScopedName
rdfsDomain = LName -> ScopedName
toRDFS LName
"domain"
rdfsSubClassOf :: ScopedName
rdfsSubClassOf :: ScopedName
rdfsSubClassOf = LName -> ScopedName
toRDFS LName
"subClassOf"
rdfsSubPropertyOf :: ScopedName
rdfsSubPropertyOf :: ScopedName
rdfsSubPropertyOf = LName -> ScopedName
toRDFS LName
"subPropertyOf"
rdfsContainer :: ScopedName
rdfsContainer :: ScopedName
rdfsContainer = LName -> ScopedName
toRDFS LName
"Container"
rdfBag :: ScopedName
rdfBag :: ScopedName
rdfBag = LName -> ScopedName
toRDF LName
"Bag"
rdfSeq :: ScopedName
rdfSeq :: ScopedName
rdfSeq = LName -> ScopedName
toRDF LName
"Seq"
rdfAlt :: ScopedName
rdfAlt :: ScopedName
rdfAlt = LName -> ScopedName
toRDF LName
"Alt"
rdfsContainerMembershipProperty :: ScopedName
rdfsContainerMembershipProperty :: ScopedName
rdfsContainerMembershipProperty = LName -> ScopedName
toRDFS LName
"ContainerMembershipProperty"
rdfsMember :: ScopedName
rdfsMember :: ScopedName
rdfsMember = LName -> ScopedName
toRDFS LName
"member"
rdfList :: ScopedName
rdfList :: ScopedName
rdfList = LName -> ScopedName
toRDF LName
"List"
rdfStatement :: ScopedName
rdfStatement :: ScopedName
rdfStatement = LName -> ScopedName
toRDF LName
"Statement"
rdfSubject :: ScopedName
rdfSubject :: ScopedName
rdfSubject = LName -> ScopedName
toRDF LName
"subject"
rdfPredicate :: ScopedName
rdfPredicate :: ScopedName
rdfPredicate = LName -> ScopedName
toRDF LName
"subject"
rdfObject :: ScopedName
rdfObject :: ScopedName
rdfObject = LName -> ScopedName
toRDF LName
"object"
rdfsSeeAlso :: ScopedName
rdfsSeeAlso :: ScopedName
rdfsSeeAlso = LName -> ScopedName
toRDFS LName
"seeAlso"
rdfsIsDefinedBy :: ScopedName
rdfsIsDefinedBy :: ScopedName
rdfsIsDefinedBy = LName -> ScopedName
toRDFS LName
"isDefinedBy"
rdfValue :: ScopedName
rdfValue :: ScopedName
rdfValue = LName -> ScopedName
toRDF LName
"value"