{-# LANGUAGE OverloadedStrings #-}

--------------------------------------------------------------------------------
--  See end of this file for licence information.
--------------------------------------------------------------------------------
-- |
--  Module      :  Swish.RDF.Vocabulary.Provenance
--  Copyright   :  (c) 2012 Douglas Burke
--  License     :  GPL V2
--
--  Maintainer  :  Douglas Burke
--  Stability   :  experimental
--  Portability :  OverloadedStrings
--
--  This module defines some vocabulary terms from the Provenance Ontology
--  <http://www.w3.org/TR/prov-o/> by the W3C Provenance Working Group
--  (<http://www.w3.org/2011/prov/wiki/Main_Page/>).
--  This is /experimental/ since the Ontology is still a Working Draft.
--
--------------------------------------------------------------------------------

module Swish.RDF.Vocabulary.Provenance
    ( 
      -- | The version used for this module is 
      --   \"W3C Working Draft 13 December 2011\",
      --   <http://www.w3.org/TR/2011/WD-prov-o-20111213/>.
      namespacePROV
      
      -- * Classes
      , provActivity
      , provAgent
      , provControl
      , provEntity
      , provGeneration
      , provLocation
      , provParticipation
      , provProvenanceContainer
      , provQualifiedInvolvement
      , provRecipe
      , provRole
      , provUsage
        
      -- * Properties
      , provdependedOn
      , provendedAt
      , provhadLocation
      , provhadOriginalSource
      , provhadParticipant
      , provhadQualifiedControl
      , provhadQualifiedEntity
      , provhadQualifiedGeneration
      , provhadQualifiedParticipation
      , provhadQualifiedUsage
      , provhadRecipe
      , provhadRole
      , provhadTemporalValue
      , provstartedAt
      , provused
      , provwasAttributedTo
      , provwasComplementOf
      , provwasControlledBy
      , provwasDerivedFrom
      , provwasEventuallyDerivedFrom
      , provwasGeneratedAt
      , provwasGeneratedBy
      , provwasInformedBy
      , provwasQuoteOf
      , provwasRevisionOf
      , provwasScheduledAfter
      , provwasSummaryOf
        
    )
where

import Swish.Namespace (Namespace, makeNamespace, ScopedName, makeNSScopedName)
import Swish.QName (LName)

import Data.Maybe (fromMaybe)
import Network.URI (URI, parseURI)

------------------------------------------------------------
--  Namespace
------------------------------------------------------------

provURI :: URI
provURI :: URI
provURI = URI -> Maybe URI -> URI
forall a. a -> Maybe a -> a
fromMaybe ([Char] -> URI
forall a. HasCallStack => [Char] -> a
error [Char]
"Internal error processing PROV URI") (Maybe URI -> URI) -> Maybe URI -> URI
forall a b. (a -> b) -> a -> b
$ [Char] -> Maybe URI
parseURI [Char]
"http://www.w3.org/ns/prov-o/"

-- | Maps @prov@ to <http://www.w3.org/ns/prov-o/>.
namespacePROV :: Namespace
namespacePROV :: Namespace
namespacePROV = Maybe Text -> URI -> Namespace
makeNamespace (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
"prov") URI
provURI

------------------------------------------------------------
--  Terms
------------------------------------------------------------

toS :: LName -> ScopedName
toS :: LName -> ScopedName
toS  = Namespace -> LName -> ScopedName
makeNSScopedName Namespace
namespacePROV

-- Classes

-- | @prov:Activity@ from <http://www.w3.org/TR/prov-o/#activity>.
provActivity :: ScopedName
provActivity :: ScopedName
provActivity = LName -> ScopedName
toS LName
"Activity"

-- | @prov:Agent@ from <http://www.w3.org/TR/prov-o/#agent>.
provAgent :: ScopedName
provAgent :: ScopedName
provAgent = LName -> ScopedName
toS LName
"Agent"

-- | @prov:Control@ from <http://www.w3.org/TR/prov-o/#control>.
provControl :: ScopedName
provControl :: ScopedName
provControl = LName -> ScopedName
toS LName
"Control"

-- | @prov:Entity@ from <http://www.w3.org/TR/prov-o/#entity>.
provEntity :: ScopedName
provEntity :: ScopedName
provEntity = LName -> ScopedName
toS LName
"Entity"

-- | @prov:Generation@ from <http://www.w3.org/TR/prov-o/#generation>.
provGeneration :: ScopedName
provGeneration :: ScopedName
provGeneration = LName -> ScopedName
toS LName
"Generation"

-- | @prov:Location@ from <http://www.w3.org/TR/prov-o/#location>.
provLocation :: ScopedName
provLocation :: ScopedName
provLocation = LName -> ScopedName
toS LName
"Location"

-- | @prov:Participation@ from <http://www.w3.org/TR/prov-o/#participation>.
provParticipation :: ScopedName
provParticipation :: ScopedName
provParticipation = LName -> ScopedName
toS LName
"Participation"

-- | @prov:ProvenanceContainer@ from <http://www.w3.org/TR/prov-o/#provenancecontainer>.
provProvenanceContainer :: ScopedName
provProvenanceContainer :: ScopedName
provProvenanceContainer = LName -> ScopedName
toS LName
"ProvenanceContainer"

-- | @prov:QualifiedInvolvement@ from <http://www.w3.org/TR/prov-o/#qualifiedinvolvement>.
provQualifiedInvolvement :: ScopedName
provQualifiedInvolvement :: ScopedName
provQualifiedInvolvement = LName -> ScopedName
toS LName
"QualifiedInvolvement"

-- | @prov:Recipe@ from <http://www.w3.org/TR/prov-o/#recipe>.
provRecipe :: ScopedName
provRecipe :: ScopedName
provRecipe = LName -> ScopedName
toS LName
"Recipe"

-- | @prov:Role@ from <http://www.w3.org/TR/prov-o/#role>.
provRole :: ScopedName
provRole :: ScopedName
provRole = LName -> ScopedName
toS LName
"Role"

-- | @prov:Usage@ from <http://www.w3.org/TR/prov-o/#usage>.
provUsage :: ScopedName
provUsage :: ScopedName
provUsage = LName -> ScopedName
toS LName
"Usage"

-- Properties

-- | @prov:dependedOn@ from <http://www.w3.org/TR/prov-o/#dependedon>.
provdependedOn :: ScopedName
provdependedOn :: ScopedName
provdependedOn = LName -> ScopedName
toS LName
"dependedOn"

-- | @prov:endedAt@ from <http://www.w3.org/TR/prov-o/#endedat>.
provendedAt :: ScopedName
provendedAt :: ScopedName
provendedAt = LName -> ScopedName
toS LName
"endedAt"

-- | @prov:hadLocation@ from <http://www.w3.org/TR/prov-o/#hadlocation>.
provhadLocation :: ScopedName
provhadLocation :: ScopedName
provhadLocation = LName -> ScopedName
toS LName
"hadLocation"

-- | @prov:hadOriginalSource@ from <http://www.w3.org/TR/prov-o/#hadoriginalsource>.
provhadOriginalSource :: ScopedName
provhadOriginalSource :: ScopedName
provhadOriginalSource = LName -> ScopedName
toS LName
"hadOriginalSource"

-- | @prov:hadParticipant@ from <http://www.w3.org/TR/prov-o/#hadparticipant>.
provhadParticipant :: ScopedName
provhadParticipant :: ScopedName
provhadParticipant = LName -> ScopedName
toS LName
"hadParticipant"

-- | @prov:hadQualifiedControl@ from <http://www.w3.org/TR/prov-o/#hadqualifiedcontrol>.
provhadQualifiedControl :: ScopedName
provhadQualifiedControl :: ScopedName
provhadQualifiedControl = LName -> ScopedName
toS LName
"hadQualifiedControl"

-- | @prov:hadQualifiedEntity@ from <http://www.w3.org/TR/prov-o/#hadqualifiedentity>.
provhadQualifiedEntity :: ScopedName
provhadQualifiedEntity :: ScopedName
provhadQualifiedEntity = LName -> ScopedName
toS LName
"hadQualifiedEntity"

-- | @prov:hadQualifiedGeneration@ from <http://www.w3.org/TR/prov-o/#hadqualifiedgeneration>.
provhadQualifiedGeneration :: ScopedName
provhadQualifiedGeneration :: ScopedName
provhadQualifiedGeneration = LName -> ScopedName
toS LName
"hadQualifiedGeneration"

-- | @prov:hadQualifiedParticipation@ from <http://www.w3.org/TR/prov-o/#hadqualifiedparticipation>.
provhadQualifiedParticipation :: ScopedName
provhadQualifiedParticipation :: ScopedName
provhadQualifiedParticipation = LName -> ScopedName
toS LName
"hadQualifiedParticipation"

-- | @prov:hadQualifiedUsage@ from <http://www.w3.org/TR/prov-o/#hadqualifiedusage>.
provhadQualifiedUsage :: ScopedName
provhadQualifiedUsage :: ScopedName
provhadQualifiedUsage = LName -> ScopedName
toS LName
"hadQualifiedUsage"

-- | @prov:hadRecipe@ from <http://www.w3.org/TR/prov-o/#hadrecipe>.
provhadRecipe :: ScopedName
provhadRecipe :: ScopedName
provhadRecipe = LName -> ScopedName
toS LName
"hadRecipe"

-- | @prov:hadRole@ from <http://www.w3.org/TR/prov-o/#hadrole>.
provhadRole :: ScopedName
provhadRole :: ScopedName
provhadRole = LName -> ScopedName
toS LName
"hadRole"

-- | @prov:hadTemporalValue@ from <http://www.w3.org/TR/prov-o/#hadtemporalvalue>.
provhadTemporalValue :: ScopedName
provhadTemporalValue :: ScopedName
provhadTemporalValue = LName -> ScopedName
toS LName
"hadTemporalValue"

-- | @prov:startedAt@ from <http://www.w3.org/TR/prov-o/#startedat>.
provstartedAt :: ScopedName
provstartedAt :: ScopedName
provstartedAt = LName -> ScopedName
toS LName
"startedAt"

-- | @prov:used@ from <http://www.w3.org/TR/prov-o/#used>.
provused :: ScopedName
provused :: ScopedName
provused = LName -> ScopedName
toS LName
"used"

-- | @prov:wasAttributedTo@ from <http://www.w3.org/TR/prov-o/#wasattributedto>.
provwasAttributedTo :: ScopedName
provwasAttributedTo :: ScopedName
provwasAttributedTo = LName -> ScopedName
toS LName
"wasAttributedTo"

-- | @prov:wasComplementOf@ from <http://www.w3.org/TR/prov-o/#wascomplementof>.
provwasComplementOf :: ScopedName
provwasComplementOf :: ScopedName
provwasComplementOf = LName -> ScopedName
toS LName
"wasComplementOf"

-- | @prov:wasControlledBy@ from <http://www.w3.org/TR/prov-o/#wascontrolledby>.
provwasControlledBy :: ScopedName
provwasControlledBy :: ScopedName
provwasControlledBy = LName -> ScopedName
toS LName
"wasControlledBy"

-- | @prov:wasDerivedFrom@ from <http://www.w3.org/TR/prov-o/#wasderivedfrom>.
provwasDerivedFrom :: ScopedName
provwasDerivedFrom :: ScopedName
provwasDerivedFrom = LName -> ScopedName
toS LName
"wasDerivedFrom"

-- | @prov:wasEventuallyDerivedFrom@ from <http://www.w3.org/TR/prov-o/#waseventuallyderivedfrom>.
provwasEventuallyDerivedFrom :: ScopedName
provwasEventuallyDerivedFrom :: ScopedName
provwasEventuallyDerivedFrom = LName -> ScopedName
toS LName
"wasEventuallyDerivedFrom"

-- | @prov:wasGeneratedAt@ from <http://www.w3.org/TR/prov-o/#wasgeneratedat>.
provwasGeneratedAt :: ScopedName
provwasGeneratedAt :: ScopedName
provwasGeneratedAt = LName -> ScopedName
toS LName
"wasGeneratedAt"

-- | @prov:wasGeneratedBy@ from <http://www.w3.org/TR/prov-o/#wasgeneratedby>.
provwasGeneratedBy :: ScopedName
provwasGeneratedBy :: ScopedName
provwasGeneratedBy = LName -> ScopedName
toS LName
"wasGeneratedBy"

-- | @prov:wasInformedBy@ from <http://www.w3.org/TR/prov-o/#wasinformedby>.
provwasInformedBy :: ScopedName
provwasInformedBy :: ScopedName
provwasInformedBy = LName -> ScopedName
toS LName
"wasInformedBy"

-- | @prov:wasQuoteOf@ from <http://www.w3.org/TR/prov-o/#wasquoteof>.
provwasQuoteOf :: ScopedName
provwasQuoteOf :: ScopedName
provwasQuoteOf = LName -> ScopedName
toS LName
"wasQuoteOf"

-- | @prov:wasRevisionOf@ from <http://www.w3.org/TR/prov-o/#wasrevisionof>.
provwasRevisionOf :: ScopedName
provwasRevisionOf :: ScopedName
provwasRevisionOf = LName -> ScopedName
toS LName
"wasRevisionOf"

-- | @prov:wasScheduledAfter@ from <http://www.w3.org/TR/prov-o/#wasscheduledafter>.
provwasScheduledAfter :: ScopedName
provwasScheduledAfter :: ScopedName
provwasScheduledAfter = LName -> ScopedName
toS LName
"wasScheduledAfter"

-- | @prov:wasSummaryOf@ from <http://www.w3.org/TR/prov-o/#wassummaryof>.
provwasSummaryOf :: ScopedName
provwasSummaryOf :: ScopedName
provwasSummaryOf = LName -> ScopedName
toS LName
"wasSummaryOf"

--------------------------------------------------------------------------------
--
--  Copyright (c) 2012 Douglas Burke
--  All rights reserved.
--
--  This file is part of Swish.
--
--  Swish is free software; you can redistribute it and/or modify
--  it under the terms of the GNU General Public License as published by
--  the Free Software Foundation; either version 2 of the License, or
--  (at your option) any later version.
--
--  Swish is distributed in the hope that it will be useful,
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--  GNU General Public License for more details.
--
--  You should have received a copy of the GNU General Public License
--  along with Swish; if not, write to:
--    The Free Software Foundation, Inc.,
--    59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--
--------------------------------------------------------------------------------