module Swish.RDF.Vocabulary
( namespaceNull
, namespaceRDF
, namespaceRDFS
, namespaceRDFD
, namespaceOWL
, namespaceXSD
, namespaceXsdType
, namespaceMATH
, namespaceLOG
, namespaceDAML
, namespaceDefault
, namespaceSwish, swishName
, namespaceLang, langName, langTag, isLang
, scopeRDF
, scopeRDFS
, scopeRDFD
, rdf_datatype, rdf_resource, rdf_about, rdf_ID
, rdf_type
, rdf_first, rdf_rest, rdf_nil, rdf_XMLLiteral
, rdfs_member
, rdfd_GeneralRestriction
, rdfd_onProperties, rdfd_constraint, rdfd_maxCardinality
, owl_sameAs, log_implies
, xsd_type, xsd_string, xsd_boolean
, xsd_decimal, xsd_integer
, xsd_nonneg_integer, xsd_nonpos_integer, xsd_pos_integer, xsd_neg_integer
, xsd_float, xsd_double
, default_base
)
where
import Swish.Utils.Namespace
( Namespace(..), ScopedName(..) )
import Swish.Utils.MiscHelpers
( lower )
namespaceNull :: Namespace
namespaceNull
= Namespace "" ""
namespaceRDF :: Namespace
namespaceRDF =
Namespace "rdf" "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
namespaceRDFS :: Namespace
namespaceRDFS =
Namespace "rdfs" "http://www.w3.org/2000/01/rdf-schema#"
namespaceRDFD :: Namespace
namespaceRDFD =
Namespace "rdfd" "http://id.ninebynine.org/2003/rdfext/rdfd#"
namespaceOWL :: Namespace
namespaceOWL =
Namespace "owl" "http://www.w3.org/2002/07/owl#"
namespaceXSD :: Namespace
namespaceXSD =
Namespace "xsd" "http://www.w3.org/2001/XMLSchema#"
namespaceXsdType :: String -> Namespace
namespaceXsdType dtname =
Namespace ("xsd_"++dtname)
("http://id.ninebynine.org/2003/XMLSchema/"++dtname++"#")
namespaceMATH :: Namespace
namespaceMATH =
Namespace "math" "http://www.w3.org/2000/10/swap/math#"
namespaceLOG :: Namespace
namespaceLOG =
Namespace "log" "http://www.w3.org/2000/10/swap/log#"
namespaceDAML :: Namespace
namespaceDAML =
Namespace "daml" "http://www.daml.org/2000/10/daml-ont#"
namespaceDefault :: Namespace
namespaceDefault
= Namespace "default" "http://id.ninebynine.org/default/"
namespaceSwish :: Namespace
namespaceSwish
= Namespace "swish" "http://id.ninebynine.org/2003/Swish/"
swishName :: String -> ScopedName
swishName = ScopedName namespaceSwish
namespaceLang :: Namespace
namespaceLang
= Namespace "lang" "http://id.ninebynine.org/2003/Swish/Lang/"
langName :: String -> ScopedName
langName tag = ScopedName namespaceLang (lower tag)
langTag :: ScopedName -> String
langTag = snLocal
isLang :: ScopedName -> Bool
isLang sname = snScope sname == namespaceLang
scopeRDF :: Namespace
scopeRDF =
Namespace "rs_rdf" "http://id.ninebynine.org/2003/Ruleset/rdf#"
scopeRDFS :: Namespace
scopeRDFS =
Namespace "rs_rdfs" "http://id.ninebynine.org/2003/Ruleset/rdfs#"
scopeRDFD :: Namespace
scopeRDFD =
Namespace "rs_rdfd" "http://id.ninebynine.org/2003/Ruleset/rdfd#"
rdf_datatype :: ScopedName
rdf_datatype = ScopedName namespaceRDF "datatype"
rdf_resource :: ScopedName
rdf_resource = ScopedName namespaceRDF "resource"
rdf_about :: ScopedName
rdf_about = ScopedName namespaceRDF "about"
rdf_ID :: ScopedName
rdf_ID = ScopedName namespaceRDF "ID"
rdf_type :: ScopedName
rdf_type = ScopedName namespaceRDF "type"
rdf_first :: ScopedName
rdf_first = ScopedName namespaceRDF "first"
rdf_rest :: ScopedName
rdf_rest = ScopedName namespaceRDF "rest"
rdf_nil :: ScopedName
rdf_nil = ScopedName namespaceRDF "nil"
rdf_XMLLiteral :: ScopedName
rdf_XMLLiteral = ScopedName namespaceRDF "XMLLiteral"
rdfs_member :: ScopedName
rdfs_member = ScopedName namespaceRDFS "member"
rdfd_GeneralRestriction :: ScopedName
rdfd_GeneralRestriction = ScopedName namespaceRDFD "GeneralRestriction"
rdfd_onProperties :: ScopedName
rdfd_onProperties = ScopedName namespaceRDFD "onProperties"
rdfd_constraint :: ScopedName
rdfd_constraint = ScopedName namespaceRDFD "constraint"
rdfd_maxCardinality :: ScopedName
rdfd_maxCardinality = ScopedName namespaceRDFD "maxCardinality"
xsd_type :: String -> ScopedName
xsd_type = ScopedName namespaceXSD
xsd_string :: ScopedName
xsd_string = xsd_type "string"
xsd_boolean :: ScopedName
xsd_boolean = xsd_type "boolean"
xsd_decimal :: ScopedName
xsd_decimal = xsd_type "decimal"
xsd_integer :: ScopedName
xsd_integer = xsd_type "integer"
xsd_nonneg_integer :: ScopedName
xsd_nonneg_integer = xsd_type "nonNegativeInteger"
xsd_nonpos_integer :: ScopedName
xsd_nonpos_integer = xsd_type "nonPositiveInteger"
xsd_pos_integer :: ScopedName
xsd_pos_integer = xsd_type "positiveInteger"
xsd_neg_integer :: ScopedName
xsd_neg_integer = xsd_type "negativeInteger"
xsd_float :: ScopedName
xsd_float = xsd_type "float"
xsd_double :: ScopedName
xsd_double = xsd_type "double"
owl_sameAs :: ScopedName
owl_sameAs = ScopedName namespaceOWL "sameAs"
log_implies :: ScopedName
log_implies = ScopedName namespaceLOG "implies"
default_base :: ScopedName
default_base = ScopedName namespaceDefault "base"