(*********************************************************************************)
(*                OCaml-RDF                                                      *)
(*                                                                               *)
(*    Copyright (C) 2012-2024 Institut National de Recherche en Informatique     *)
(*    et en Automatique. All rights reserved.                                    *)
(*                                                                               *)
(*    This program is free software; you can redistribute it and/or modify       *)
(*    it under the terms of the GNU Lesser General Public License version        *)
(*    3 as published by the Free Software Foundation.                            *)
(*                                                                               *)
(*    This program 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 this program; if not, write to the Free Software                *)
(*    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA                   *)
(*    02111-1307  USA                                                            *)
(*                                                                               *)
(*    Contact: Maxence.Guesdon@inria.fr                                          *)
(*                                                                               *)
(*********************************************************************************)

let prov_str = "http://www.w3.org/ns/prov#";;
let prov = Iri.of_string prov_str ;;
let prov_ s = Iri.of_string (prov_str ^ s);;

let c_Accept = prov_ "Accept" ;;
let c_Activity = prov_ "Activity" ;;
let c_ActivityInfluence = prov_ "ActivityInfluence" ;;
let c_Agent = prov_ "Agent" ;;
let c_AgentInfluence = prov_ "AgentInfluence" ;;
let c_Association = prov_ "Association" ;;
let c_Attribution = prov_ "Attribution" ;;
let c_Bundle = prov_ "Bundle" ;;
let c_Collection = prov_ "Collection" ;;
let c_Communication = prov_ "Communication" ;;
let c_Contribute = prov_ "Contribute" ;;
let c_Contributor = prov_ "Contributor" ;;
let c_Copyright = prov_ "Copyright" ;;
let c_Create = prov_ "Create" ;;
let c_Creator = prov_ "Creator" ;;
let c_Delegation = prov_ "Delegation" ;;
let c_Derivation = prov_ "Derivation" ;;
let c_Dictionary = prov_ "Dictionary" ;;
let c_DirectQueryService = prov_ "DirectQueryService" ;;
let c_EmptyCollection = prov_ "EmptyCollection" ;;
let c_EmptyDictionary = prov_ "EmptyDictionary" ;;
let c_End = prov_ "End" ;;
let c_Entity = prov_ "Entity" ;;
let c_EntityInfluence = prov_ "EntityInfluence" ;;
let c_Generation = prov_ "Generation" ;;
let c_Influence = prov_ "Influence" ;;
let c_Insertion = prov_ "Insertion" ;;
let c_InstantaneousEvent = prov_ "InstantaneousEvent" ;;
let c_Invalidation = prov_ "Invalidation" ;;
let c_KeyEntityPair = prov_ "KeyEntityPair" ;;
let c_Location = prov_ "Location" ;;
let c_Modify = prov_ "Modify" ;;
let c_Organization = prov_ "Organization" ;;
let c_Person = prov_ "Person" ;;
let c_Plan = prov_ "Plan" ;;
let c_PrimarySource = prov_ "PrimarySource" ;;
let c_Publish = prov_ "Publish" ;;
let c_Publisher = prov_ "Publisher" ;;
let c_Quotation = prov_ "Quotation" ;;
let c_Removal = prov_ "Removal" ;;
let c_Replace = prov_ "Replace" ;;
let c_Revision = prov_ "Revision" ;;
let c_RightsAssignment = prov_ "RightsAssignment" ;;
let c_RightsHolder = prov_ "RightsHolder" ;;
let c_Role = prov_ "Role" ;;
let c_ServiceDescription = prov_ "ServiceDescription" ;;
let c_SoftwareAgent = prov_ "SoftwareAgent" ;;
let c_Start = prov_ "Start" ;;
let c_Submit = prov_ "Submit" ;;
let c_Usage = prov_ "Usage" ;;
let actedOnBehalfOf = prov_ "actedOnBehalfOf" ;;
let activity = prov_ "activity" ;;
let agent = prov_ "agent" ;;
let alternateOf = prov_ "alternateOf" ;;
let aq = prov_ "aq" ;;
let asInBundle = prov_ "asInBundle" ;;
let atLocation = prov_ "atLocation" ;;
let atTime = prov_ "atTime" ;;
let category = prov_ "category" ;;
let component = prov_ "component" ;;
let constraints = prov_ "constraints" ;;
let definition = prov_ "definition" ;;
let derivedByInsertionFrom = prov_ "derivedByInsertionFrom" ;;
let derivedByRemovalFrom = prov_ "derivedByRemovalFrom" ;;
let describesService = prov_ "describesService" ;;
let dictionary = prov_ "dictionary" ;;
let dm = prov_ "dm" ;;
let editorialNote = prov_ "editorialNote" ;;
let editorsDefinition = prov_ "editorsDefinition" ;;
let endedAtTime = prov_ "endedAtTime" ;;
let entity = prov_ "entity" ;;
let generated = prov_ "generated" ;;
let generatedAtTime = prov_ "generatedAtTime" ;;
let hadActivity = prov_ "hadActivity" ;;
let hadDictionaryMember = prov_ "hadDictionaryMember" ;;
let hadGeneration = prov_ "hadGeneration" ;;
let hadMember = prov_ "hadMember" ;;
let hadPlan = prov_ "hadPlan" ;;
let hadPrimarySource = prov_ "hadPrimarySource" ;;
let hadRole = prov_ "hadRole" ;;
let hadUsage = prov_ "hadUsage" ;;
let has_anchor = prov_ "has_anchor" ;;
let has_provenance = prov_ "has_provenance" ;;
let has_query_service = prov_ "has_query_service" ;;
let influenced = prov_ "influenced" ;;
let influencer = prov_ "influencer" ;;
let insertedKeyEntityPair = prov_ "insertedKeyEntityPair" ;;
let invalidated = prov_ "invalidated" ;;
let invalidatedAtTime = prov_ "invalidatedAtTime" ;;
let inverse = prov_ "inverse" ;;
let mentionOf = prov_ "mentionOf" ;;
let n = prov_ "n" ;;
let order = prov_ "order" ;;
let pairEntity = prov_ "pairEntity" ;;
let pairKey = prov_ "pairKey" ;;
let pingback = prov_ "pingback" ;;
let provenanceUriTemplate = prov_ "provenanceUriTemplate" ;;
let qualifiedAssociation = prov_ "qualifiedAssociation" ;;
let qualifiedAttribution = prov_ "qualifiedAttribution" ;;
let qualifiedCommunication = prov_ "qualifiedCommunication" ;;
let qualifiedDelegation = prov_ "qualifiedDelegation" ;;
let qualifiedDerivation = prov_ "qualifiedDerivation" ;;
let qualifiedEnd = prov_ "qualifiedEnd" ;;
let qualifiedForm = prov_ "qualifiedForm" ;;
let qualifiedGeneration = prov_ "qualifiedGeneration" ;;
let qualifiedInfluence = prov_ "qualifiedInfluence" ;;
let qualifiedInsertion = prov_ "qualifiedInsertion" ;;
let qualifiedInvalidation = prov_ "qualifiedInvalidation" ;;
let qualifiedPrimarySource = prov_ "qualifiedPrimarySource" ;;
let qualifiedQuotation = prov_ "qualifiedQuotation" ;;
let qualifiedRemoval = prov_ "qualifiedRemoval" ;;
let qualifiedRevision = prov_ "qualifiedRevision" ;;
let qualifiedStart = prov_ "qualifiedStart" ;;
let qualifiedUsage = prov_ "qualifiedUsage" ;;
let removedKey = prov_ "removedKey" ;;
let sharesDefinitionWith = prov_ "sharesDefinitionWith" ;;
let specializationOf = prov_ "specializationOf" ;;
let startedAtTime = prov_ "startedAtTime" ;;
let todo = prov_ "todo" ;;
let unqualifiedForm = prov_ "unqualifiedForm" ;;
let used = prov_ "used" ;;
let value = prov_ "value" ;;
let wasAssociatedWith = prov_ "wasAssociatedWith" ;;
let wasAttributedTo = prov_ "wasAttributedTo" ;;
let wasDerivedFrom = prov_ "wasDerivedFrom" ;;
let wasEndedBy = prov_ "wasEndedBy" ;;
let wasGeneratedBy = prov_ "wasGeneratedBy" ;;
let wasInfluencedBy = prov_ "wasInfluencedBy" ;;
let wasInformedBy = prov_ "wasInformedBy" ;;
let wasInvalidatedBy = prov_ "wasInvalidatedBy" ;;
let wasQuotedFrom = prov_ "wasQuotedFrom" ;;
let wasRevisionOf = prov_ "wasRevisionOf" ;;
let wasStartedBy = prov_ "wasStartedBy" ;;

module Open = struct
  let prov_c_Accept = c_Accept
  let prov_c_Activity = c_Activity
  let prov_c_ActivityInfluence = c_ActivityInfluence
  let prov_c_Agent = c_Agent
  let prov_c_AgentInfluence = c_AgentInfluence
  let prov_c_Association = c_Association
  let prov_c_Attribution = c_Attribution
  let prov_c_Bundle = c_Bundle
  let prov_c_Collection = c_Collection
  let prov_c_Communication = c_Communication
  let prov_c_Contribute = c_Contribute
  let prov_c_Contributor = c_Contributor
  let prov_c_Copyright = c_Copyright
  let prov_c_Create = c_Create
  let prov_c_Creator = c_Creator
  let prov_c_Delegation = c_Delegation
  let prov_c_Derivation = c_Derivation
  let prov_c_Dictionary = c_Dictionary
  let prov_c_DirectQueryService = c_DirectQueryService
  let prov_c_EmptyCollection = c_EmptyCollection
  let prov_c_EmptyDictionary = c_EmptyDictionary
  let prov_c_End = c_End
  let prov_c_Entity = c_Entity
  let prov_c_EntityInfluence = c_EntityInfluence
  let prov_c_Generation = c_Generation
  let prov_c_Influence = c_Influence
  let prov_c_Insertion = c_Insertion
  let prov_c_InstantaneousEvent = c_InstantaneousEvent
  let prov_c_Invalidation = c_Invalidation
  let prov_c_KeyEntityPair = c_KeyEntityPair
  let prov_c_Location = c_Location
  let prov_c_Modify = c_Modify
  let prov_c_Organization = c_Organization
  let prov_c_Person = c_Person
  let prov_c_Plan = c_Plan
  let prov_c_PrimarySource = c_PrimarySource
  let prov_c_Publish = c_Publish
  let prov_c_Publisher = c_Publisher
  let prov_c_Quotation = c_Quotation
  let prov_c_Removal = c_Removal
  let prov_c_Replace = c_Replace
  let prov_c_Revision = c_Revision
  let prov_c_RightsAssignment = c_RightsAssignment
  let prov_c_RightsHolder = c_RightsHolder
  let prov_c_Role = c_Role
  let prov_c_ServiceDescription = c_ServiceDescription
  let prov_c_SoftwareAgent = c_SoftwareAgent
  let prov_c_Start = c_Start
  let prov_c_Submit = c_Submit
  let prov_c_Usage = c_Usage
  let prov_actedOnBehalfOf = actedOnBehalfOf
  let prov_activity = activity
  let prov_agent = agent
  let prov_alternateOf = alternateOf
  let prov_aq = aq
  let prov_asInBundle = asInBundle
  let prov_atLocation = atLocation
  let prov_atTime = atTime
  let prov_category = category
  let prov_component = component
  let prov_constraints = constraints
  let prov_definition = definition
  let prov_derivedByInsertionFrom = derivedByInsertionFrom
  let prov_derivedByRemovalFrom = derivedByRemovalFrom
  let prov_describesService = describesService
  let prov_dictionary = dictionary
  let prov_dm = dm
  let prov_editorialNote = editorialNote
  let prov_editorsDefinition = editorsDefinition
  let prov_endedAtTime = endedAtTime
  let prov_entity = entity
  let prov_generated = generated
  let prov_generatedAtTime = generatedAtTime
  let prov_hadActivity = hadActivity
  let prov_hadDictionaryMember = hadDictionaryMember
  let prov_hadGeneration = hadGeneration
  let prov_hadMember = hadMember
  let prov_hadPlan = hadPlan
  let prov_hadPrimarySource = hadPrimarySource
  let prov_hadRole = hadRole
  let prov_hadUsage = hadUsage
  let prov_has_anchor = has_anchor
  let prov_has_provenance = has_provenance
  let prov_has_query_service = has_query_service
  let prov_influenced = influenced
  let prov_influencer = influencer
  let prov_insertedKeyEntityPair = insertedKeyEntityPair
  let prov_invalidated = invalidated
  let prov_invalidatedAtTime = invalidatedAtTime
  let prov_inverse = inverse
  let prov_mentionOf = mentionOf
  let prov_n = n
  let prov_order = order
  let prov_pairEntity = pairEntity
  let prov_pairKey = pairKey
  let prov_pingback = pingback
  let prov_provenanceUriTemplate = provenanceUriTemplate
  let prov_qualifiedAssociation = qualifiedAssociation
  let prov_qualifiedAttribution = qualifiedAttribution
  let prov_qualifiedCommunication = qualifiedCommunication
  let prov_qualifiedDelegation = qualifiedDelegation
  let prov_qualifiedDerivation = qualifiedDerivation
  let prov_qualifiedEnd = qualifiedEnd
  let prov_qualifiedForm = qualifiedForm
  let prov_qualifiedGeneration = qualifiedGeneration
  let prov_qualifiedInfluence = qualifiedInfluence
  let prov_qualifiedInsertion = qualifiedInsertion
  let prov_qualifiedInvalidation = qualifiedInvalidation
  let prov_qualifiedPrimarySource = qualifiedPrimarySource
  let prov_qualifiedQuotation = qualifiedQuotation
  let prov_qualifiedRemoval = qualifiedRemoval
  let prov_qualifiedRevision = qualifiedRevision
  let prov_qualifiedStart = qualifiedStart
  let prov_qualifiedUsage = qualifiedUsage
  let prov_removedKey = removedKey
  let prov_sharesDefinitionWith = sharesDefinitionWith
  let prov_specializationOf = specializationOf
  let prov_startedAtTime = startedAtTime
  let prov_todo = todo
  let prov_unqualifiedForm = unqualifiedForm
  let prov_used = used
  let prov_value = value
  let prov_wasAssociatedWith = wasAssociatedWith
  let prov_wasAttributedTo = wasAttributedTo
  let prov_wasDerivedFrom = wasDerivedFrom
  let prov_wasEndedBy = wasEndedBy
  let prov_wasGeneratedBy = wasGeneratedBy
  let prov_wasInfluencedBy = wasInfluencedBy
  let prov_wasInformedBy = wasInformedBy
  let prov_wasInvalidatedBy = wasInvalidatedBy
  let prov_wasQuotedFrom = wasQuotedFrom
  let prov_wasRevisionOf = wasRevisionOf
  let prov_wasStartedBy = wasStartedBy
end

class from ?sub g =
  let sub = match sub with None -> Term.Iri (g.Graph.name()) | Some t -> t in
  object(self)
  method actedOnBehalfOf = g.Graph.objects_of ~sub ~pred: actedOnBehalfOf
  method actedOnBehalfOf_opt = match self#actedOnBehalfOf with [] -> None | x::_ -> Some x
  method actedOnBehalfOf_iris = Graph.only_iris (self#actedOnBehalfOf)
  method actedOnBehalfOf_opt_iri = match self#actedOnBehalfOf_iris with [] -> None | x::_ -> Some x
  method activity = g.Graph.objects_of ~sub ~pred: activity
  method activity_opt = match self#activity with [] -> None | x::_ -> Some x
  method activity_iris = Graph.only_iris (self#activity)
  method activity_opt_iri = match self#activity_iris with [] -> None | x::_ -> Some x
  method agent = g.Graph.objects_of ~sub ~pred: agent
  method agent_opt = match self#agent with [] -> None | x::_ -> Some x
  method agent_iris = Graph.only_iris (self#agent)
  method agent_opt_iri = match self#agent_iris with [] -> None | x::_ -> Some x
  method alternateOf = g.Graph.objects_of ~sub ~pred: alternateOf
  method alternateOf_opt = match self#alternateOf with [] -> None | x::_ -> Some x
  method alternateOf_iris = Graph.only_iris (self#alternateOf)
  method alternateOf_opt_iri = match self#alternateOf_iris with [] -> None | x::_ -> Some x
  method aq = g.Graph.objects_of ~sub ~pred: aq
  method aq_opt = match self#aq with [] -> None | x::_ -> Some x
  method aq_iris = Graph.only_iris (self#aq)
  method aq_opt_iri = match self#aq_iris with [] -> None | x::_ -> Some x
  method asInBundle = g.Graph.objects_of ~sub ~pred: asInBundle
  method asInBundle_opt = match self#asInBundle with [] -> None | x::_ -> Some x
  method asInBundle_iris = Graph.only_iris (self#asInBundle)
  method asInBundle_opt_iri = match self#asInBundle_iris with [] -> None | x::_ -> Some x
  method atLocation = g.Graph.objects_of ~sub ~pred: atLocation
  method atLocation_opt = match self#atLocation with [] -> None | x::_ -> Some x
  method atLocation_iris = Graph.only_iris (self#atLocation)
  method atLocation_opt_iri = match self#atLocation_iris with [] -> None | x::_ -> Some x
  method atTime = Graph.literal_objects_of g ~sub ~pred: atTime
  method atTime_opt = match self#atTime with [] -> None | x::_ -> Some x
  method category = g.Graph.objects_of ~sub ~pred: category
  method category_opt = match self#category with [] -> None | x::_ -> Some x
  method category_iris = Graph.only_iris (self#category)
  method category_opt_iri = match self#category_iris with [] -> None | x::_ -> Some x
  method component = g.Graph.objects_of ~sub ~pred: component
  method component_opt = match self#component with [] -> None | x::_ -> Some x
  method component_iris = Graph.only_iris (self#component)
  method component_opt_iri = match self#component_iris with [] -> None | x::_ -> Some x
  method constraints = g.Graph.objects_of ~sub ~pred: constraints
  method constraints_opt = match self#constraints with [] -> None | x::_ -> Some x
  method constraints_iris = Graph.only_iris (self#constraints)
  method constraints_opt_iri = match self#constraints_iris with [] -> None | x::_ -> Some x
  method definition = g.Graph.objects_of ~sub ~pred: definition
  method definition_opt = match self#definition with [] -> None | x::_ -> Some x
  method definition_iris = Graph.only_iris (self#definition)
  method definition_opt_iri = match self#definition_iris with [] -> None | x::_ -> Some x
  method derivedByInsertionFrom = g.Graph.objects_of ~sub ~pred: derivedByInsertionFrom
  method derivedByInsertionFrom_opt = match self#derivedByInsertionFrom with [] -> None | x::_ -> Some x
  method derivedByInsertionFrom_iris = Graph.only_iris (self#derivedByInsertionFrom)
  method derivedByInsertionFrom_opt_iri = match self#derivedByInsertionFrom_iris with [] -> None | x::_ -> Some x
  method derivedByRemovalFrom = g.Graph.objects_of ~sub ~pred: derivedByRemovalFrom
  method derivedByRemovalFrom_opt = match self#derivedByRemovalFrom with [] -> None | x::_ -> Some x
  method derivedByRemovalFrom_iris = Graph.only_iris (self#derivedByRemovalFrom)
  method derivedByRemovalFrom_opt_iri = match self#derivedByRemovalFrom_iris with [] -> None | x::_ -> Some x
  method describesService = g.Graph.objects_of ~sub ~pred: describesService
  method describesService_opt = match self#describesService with [] -> None | x::_ -> Some x
  method describesService_iris = Graph.only_iris (self#describesService)
  method describesService_opt_iri = match self#describesService_iris with [] -> None | x::_ -> Some x
  method dictionary = g.Graph.objects_of ~sub ~pred: dictionary
  method dictionary_opt = match self#dictionary with [] -> None | x::_ -> Some x
  method dictionary_iris = Graph.only_iris (self#dictionary)
  method dictionary_opt_iri = match self#dictionary_iris with [] -> None | x::_ -> Some x
  method dm = g.Graph.objects_of ~sub ~pred: dm
  method dm_opt = match self#dm with [] -> None | x::_ -> Some x
  method dm_iris = Graph.only_iris (self#dm)
  method dm_opt_iri = match self#dm_iris with [] -> None | x::_ -> Some x
  method editorialNote = g.Graph.objects_of ~sub ~pred: editorialNote
  method editorialNote_opt = match self#editorialNote with [] -> None | x::_ -> Some x
  method editorialNote_iris = Graph.only_iris (self#editorialNote)
  method editorialNote_opt_iri = match self#editorialNote_iris with [] -> None | x::_ -> Some x
  method editorsDefinition = g.Graph.objects_of ~sub ~pred: editorsDefinition
  method editorsDefinition_opt = match self#editorsDefinition with [] -> None | x::_ -> Some x
  method editorsDefinition_iris = Graph.only_iris (self#editorsDefinition)
  method editorsDefinition_opt_iri = match self#editorsDefinition_iris with [] -> None | x::_ -> Some x
  method endedAtTime = Graph.literal_objects_of g ~sub ~pred: endedAtTime
  method endedAtTime_opt = match self#endedAtTime with [] -> None | x::_ -> Some x
  method entity = g.Graph.objects_of ~sub ~pred: entity
  method entity_opt = match self#entity with [] -> None | x::_ -> Some x
  method entity_iris = Graph.only_iris (self#entity)
  method entity_opt_iri = match self#entity_iris with [] -> None | x::_ -> Some x
  method generated = g.Graph.objects_of ~sub ~pred: generated
  method generated_opt = match self#generated with [] -> None | x::_ -> Some x
  method generated_iris = Graph.only_iris (self#generated)
  method generated_opt_iri = match self#generated_iris with [] -> None | x::_ -> Some x
  method generatedAtTime = Graph.literal_objects_of g ~sub ~pred: generatedAtTime
  method generatedAtTime_opt = match self#generatedAtTime with [] -> None | x::_ -> Some x
  method hadActivity = g.Graph.objects_of ~sub ~pred: hadActivity
  method hadActivity_opt = match self#hadActivity with [] -> None | x::_ -> Some x
  method hadActivity_iris = Graph.only_iris (self#hadActivity)
  method hadActivity_opt_iri = match self#hadActivity_iris with [] -> None | x::_ -> Some x
  method hadDictionaryMember = g.Graph.objects_of ~sub ~pred: hadDictionaryMember
  method hadDictionaryMember_opt = match self#hadDictionaryMember with [] -> None | x::_ -> Some x
  method hadDictionaryMember_iris = Graph.only_iris (self#hadDictionaryMember)
  method hadDictionaryMember_opt_iri = match self#hadDictionaryMember_iris with [] -> None | x::_ -> Some x
  method hadGeneration = g.Graph.objects_of ~sub ~pred: hadGeneration
  method hadGeneration_opt = match self#hadGeneration with [] -> None | x::_ -> Some x
  method hadGeneration_iris = Graph.only_iris (self#hadGeneration)
  method hadGeneration_opt_iri = match self#hadGeneration_iris with [] -> None | x::_ -> Some x
  method hadMember = g.Graph.objects_of ~sub ~pred: hadMember
  method hadMember_opt = match self#hadMember with [] -> None | x::_ -> Some x
  method hadMember_iris = Graph.only_iris (self#hadMember)
  method hadMember_opt_iri = match self#hadMember_iris with [] -> None | x::_ -> Some x
  method hadPlan = g.Graph.objects_of ~sub ~pred: hadPlan
  method hadPlan_opt = match self#hadPlan with [] -> None | x::_ -> Some x
  method hadPlan_iris = Graph.only_iris (self#hadPlan)
  method hadPlan_opt_iri = match self#hadPlan_iris with [] -> None | x::_ -> Some x
  method hadPrimarySource = g.Graph.objects_of ~sub ~pred: hadPrimarySource
  method hadPrimarySource_opt = match self#hadPrimarySource with [] -> None | x::_ -> Some x
  method hadPrimarySource_iris = Graph.only_iris (self#hadPrimarySource)
  method hadPrimarySource_opt_iri = match self#hadPrimarySource_iris with [] -> None | x::_ -> Some x
  method hadRole = g.Graph.objects_of ~sub ~pred: hadRole
  method hadRole_opt = match self#hadRole with [] -> None | x::_ -> Some x
  method hadRole_iris = Graph.only_iris (self#hadRole)
  method hadRole_opt_iri = match self#hadRole_iris with [] -> None | x::_ -> Some x
  method hadUsage = g.Graph.objects_of ~sub ~pred: hadUsage
  method hadUsage_opt = match self#hadUsage with [] -> None | x::_ -> Some x
  method hadUsage_iris = Graph.only_iris (self#hadUsage)
  method hadUsage_opt_iri = match self#hadUsage_iris with [] -> None | x::_ -> Some x
  method has_anchor = g.Graph.objects_of ~sub ~pred: has_anchor
  method has_anchor_opt = match self#has_anchor with [] -> None | x::_ -> Some x
  method has_anchor_iris = Graph.only_iris (self#has_anchor)
  method has_anchor_opt_iri = match self#has_anchor_iris with [] -> None | x::_ -> Some x
  method has_provenance = g.Graph.objects_of ~sub ~pred: has_provenance
  method has_provenance_opt = match self#has_provenance with [] -> None | x::_ -> Some x
  method has_provenance_iris = Graph.only_iris (self#has_provenance)
  method has_provenance_opt_iri = match self#has_provenance_iris with [] -> None | x::_ -> Some x
  method has_query_service = g.Graph.objects_of ~sub ~pred: has_query_service
  method has_query_service_opt = match self#has_query_service with [] -> None | x::_ -> Some x
  method has_query_service_iris = Graph.only_iris (self#has_query_service)
  method has_query_service_opt_iri = match self#has_query_service_iris with [] -> None | x::_ -> Some x
  method influenced = g.Graph.objects_of ~sub ~pred: influenced
  method influenced_opt = match self#influenced with [] -> None | x::_ -> Some x
  method influenced_iris = Graph.only_iris (self#influenced)
  method influenced_opt_iri = match self#influenced_iris with [] -> None | x::_ -> Some x
  method influencer = g.Graph.objects_of ~sub ~pred: influencer
  method influencer_opt = match self#influencer with [] -> None | x::_ -> Some x
  method influencer_iris = Graph.only_iris (self#influencer)
  method influencer_opt_iri = match self#influencer_iris with [] -> None | x::_ -> Some x
  method insertedKeyEntityPair = g.Graph.objects_of ~sub ~pred: insertedKeyEntityPair
  method insertedKeyEntityPair_opt = match self#insertedKeyEntityPair with [] -> None | x::_ -> Some x
  method insertedKeyEntityPair_iris = Graph.only_iris (self#insertedKeyEntityPair)
  method insertedKeyEntityPair_opt_iri = match self#insertedKeyEntityPair_iris with [] -> None | x::_ -> Some x
  method invalidated = g.Graph.objects_of ~sub ~pred: invalidated
  method invalidated_opt = match self#invalidated with [] -> None | x::_ -> Some x
  method invalidated_iris = Graph.only_iris (self#invalidated)
  method invalidated_opt_iri = match self#invalidated_iris with [] -> None | x::_ -> Some x
  method invalidatedAtTime = Graph.literal_objects_of g ~sub ~pred: invalidatedAtTime
  method invalidatedAtTime_opt = match self#invalidatedAtTime with [] -> None | x::_ -> Some x
  method inverse = g.Graph.objects_of ~sub ~pred: inverse
  method inverse_opt = match self#inverse with [] -> None | x::_ -> Some x
  method inverse_iris = Graph.only_iris (self#inverse)
  method inverse_opt_iri = match self#inverse_iris with [] -> None | x::_ -> Some x
  method mentionOf = g.Graph.objects_of ~sub ~pred: mentionOf
  method mentionOf_opt = match self#mentionOf with [] -> None | x::_ -> Some x
  method mentionOf_iris = Graph.only_iris (self#mentionOf)
  method mentionOf_opt_iri = match self#mentionOf_iris with [] -> None | x::_ -> Some x
  method n = g.Graph.objects_of ~sub ~pred: n
  method n_opt = match self#n with [] -> None | x::_ -> Some x
  method n_iris = Graph.only_iris (self#n)
  method n_opt_iri = match self#n_iris with [] -> None | x::_ -> Some x
  method order = g.Graph.objects_of ~sub ~pred: order
  method order_opt = match self#order with [] -> None | x::_ -> Some x
  method order_iris = Graph.only_iris (self#order)
  method order_opt_iri = match self#order_iris with [] -> None | x::_ -> Some x
  method pairEntity = g.Graph.objects_of ~sub ~pred: pairEntity
  method pairEntity_opt = match self#pairEntity with [] -> None | x::_ -> Some x
  method pairEntity_iris = Graph.only_iris (self#pairEntity)
  method pairEntity_opt_iri = match self#pairEntity_iris with [] -> None | x::_ -> Some x
  method pairKey = Graph.literal_objects_of g ~sub ~pred: pairKey
  method pairKey_opt = match self#pairKey with [] -> None | x::_ -> Some x
  method pingback = g.Graph.objects_of ~sub ~pred: pingback
  method pingback_opt = match self#pingback with [] -> None | x::_ -> Some x
  method pingback_iris = Graph.only_iris (self#pingback)
  method pingback_opt_iri = match self#pingback_iris with [] -> None | x::_ -> Some x
  method provenanceUriTemplate = Graph.literal_objects_of g ~sub ~pred: provenanceUriTemplate
  method provenanceUriTemplate_opt = match self#provenanceUriTemplate with [] -> None | x::_ -> Some x
  method qualifiedAssociation = g.Graph.objects_of ~sub ~pred: qualifiedAssociation
  method qualifiedAssociation_opt = match self#qualifiedAssociation with [] -> None | x::_ -> Some x
  method qualifiedAssociation_iris = Graph.only_iris (self#qualifiedAssociation)
  method qualifiedAssociation_opt_iri = match self#qualifiedAssociation_iris with [] -> None | x::_ -> Some x
  method qualifiedAttribution = g.Graph.objects_of ~sub ~pred: qualifiedAttribution
  method qualifiedAttribution_opt = match self#qualifiedAttribution with [] -> None | x::_ -> Some x
  method qualifiedAttribution_iris = Graph.only_iris (self#qualifiedAttribution)
  method qualifiedAttribution_opt_iri = match self#qualifiedAttribution_iris with [] -> None | x::_ -> Some x
  method qualifiedCommunication = g.Graph.objects_of ~sub ~pred: qualifiedCommunication
  method qualifiedCommunication_opt = match self#qualifiedCommunication with [] -> None | x::_ -> Some x
  method qualifiedCommunication_iris = Graph.only_iris (self#qualifiedCommunication)
  method qualifiedCommunication_opt_iri = match self#qualifiedCommunication_iris with [] -> None | x::_ -> Some x
  method qualifiedDelegation = g.Graph.objects_of ~sub ~pred: qualifiedDelegation
  method qualifiedDelegation_opt = match self#qualifiedDelegation with [] -> None | x::_ -> Some x
  method qualifiedDelegation_iris = Graph.only_iris (self#qualifiedDelegation)
  method qualifiedDelegation_opt_iri = match self#qualifiedDelegation_iris with [] -> None | x::_ -> Some x
  method qualifiedDerivation = g.Graph.objects_of ~sub ~pred: qualifiedDerivation
  method qualifiedDerivation_opt = match self#qualifiedDerivation with [] -> None | x::_ -> Some x
  method qualifiedDerivation_iris = Graph.only_iris (self#qualifiedDerivation)
  method qualifiedDerivation_opt_iri = match self#qualifiedDerivation_iris with [] -> None | x::_ -> Some x
  method qualifiedEnd = g.Graph.objects_of ~sub ~pred: qualifiedEnd
  method qualifiedEnd_opt = match self#qualifiedEnd with [] -> None | x::_ -> Some x
  method qualifiedEnd_iris = Graph.only_iris (self#qualifiedEnd)
  method qualifiedEnd_opt_iri = match self#qualifiedEnd_iris with [] -> None | x::_ -> Some x
  method qualifiedForm = g.Graph.objects_of ~sub ~pred: qualifiedForm
  method qualifiedForm_opt = match self#qualifiedForm with [] -> None | x::_ -> Some x
  method qualifiedForm_iris = Graph.only_iris (self#qualifiedForm)
  method qualifiedForm_opt_iri = match self#qualifiedForm_iris with [] -> None | x::_ -> Some x
  method qualifiedGeneration = g.Graph.objects_of ~sub ~pred: qualifiedGeneration
  method qualifiedGeneration_opt = match self#qualifiedGeneration with [] -> None | x::_ -> Some x
  method qualifiedGeneration_iris = Graph.only_iris (self#qualifiedGeneration)
  method qualifiedGeneration_opt_iri = match self#qualifiedGeneration_iris with [] -> None | x::_ -> Some x
  method qualifiedInfluence = g.Graph.objects_of ~sub ~pred: qualifiedInfluence
  method qualifiedInfluence_opt = match self#qualifiedInfluence with [] -> None | x::_ -> Some x
  method qualifiedInfluence_iris = Graph.only_iris (self#qualifiedInfluence)
  method qualifiedInfluence_opt_iri = match self#qualifiedInfluence_iris with [] -> None | x::_ -> Some x
  method qualifiedInsertion = g.Graph.objects_of ~sub ~pred: qualifiedInsertion
  method qualifiedInsertion_opt = match self#qualifiedInsertion with [] -> None | x::_ -> Some x
  method qualifiedInsertion_iris = Graph.only_iris (self#qualifiedInsertion)
  method qualifiedInsertion_opt_iri = match self#qualifiedInsertion_iris with [] -> None | x::_ -> Some x
  method qualifiedInvalidation = g.Graph.objects_of ~sub ~pred: qualifiedInvalidation
  method qualifiedInvalidation_opt = match self#qualifiedInvalidation with [] -> None | x::_ -> Some x
  method qualifiedInvalidation_iris = Graph.only_iris (self#qualifiedInvalidation)
  method qualifiedInvalidation_opt_iri = match self#qualifiedInvalidation_iris with [] -> None | x::_ -> Some x
  method qualifiedPrimarySource = g.Graph.objects_of ~sub ~pred: qualifiedPrimarySource
  method qualifiedPrimarySource_opt = match self#qualifiedPrimarySource with [] -> None | x::_ -> Some x
  method qualifiedPrimarySource_iris = Graph.only_iris (self#qualifiedPrimarySource)
  method qualifiedPrimarySource_opt_iri = match self#qualifiedPrimarySource_iris with [] -> None | x::_ -> Some x
  method qualifiedQuotation = g.Graph.objects_of ~sub ~pred: qualifiedQuotation
  method qualifiedQuotation_opt = match self#qualifiedQuotation with [] -> None | x::_ -> Some x
  method qualifiedQuotation_iris = Graph.only_iris (self#qualifiedQuotation)
  method qualifiedQuotation_opt_iri = match self#qualifiedQuotation_iris with [] -> None | x::_ -> Some x
  method qualifiedRemoval = g.Graph.objects_of ~sub ~pred: qualifiedRemoval
  method qualifiedRemoval_opt = match self#qualifiedRemoval with [] -> None | x::_ -> Some x
  method qualifiedRemoval_iris = Graph.only_iris (self#qualifiedRemoval)
  method qualifiedRemoval_opt_iri = match self#qualifiedRemoval_iris with [] -> None | x::_ -> Some x
  method qualifiedRevision = g.Graph.objects_of ~sub ~pred: qualifiedRevision
  method qualifiedRevision_opt = match self#qualifiedRevision with [] -> None | x::_ -> Some x
  method qualifiedRevision_iris = Graph.only_iris (self#qualifiedRevision)
  method qualifiedRevision_opt_iri = match self#qualifiedRevision_iris with [] -> None | x::_ -> Some x
  method qualifiedStart = g.Graph.objects_of ~sub ~pred: qualifiedStart
  method qualifiedStart_opt = match self#qualifiedStart with [] -> None | x::_ -> Some x
  method qualifiedStart_iris = Graph.only_iris (self#qualifiedStart)
  method qualifiedStart_opt_iri = match self#qualifiedStart_iris with [] -> None | x::_ -> Some x
  method qualifiedUsage = g.Graph.objects_of ~sub ~pred: qualifiedUsage
  method qualifiedUsage_opt = match self#qualifiedUsage with [] -> None | x::_ -> Some x
  method qualifiedUsage_iris = Graph.only_iris (self#qualifiedUsage)
  method qualifiedUsage_opt_iri = match self#qualifiedUsage_iris with [] -> None | x::_ -> Some x
  method removedKey = Graph.literal_objects_of g ~sub ~pred: removedKey
  method removedKey_opt = match self#removedKey with [] -> None | x::_ -> Some x
  method sharesDefinitionWith = g.Graph.objects_of ~sub ~pred: sharesDefinitionWith
  method sharesDefinitionWith_opt = match self#sharesDefinitionWith with [] -> None | x::_ -> Some x
  method sharesDefinitionWith_iris = Graph.only_iris (self#sharesDefinitionWith)
  method sharesDefinitionWith_opt_iri = match self#sharesDefinitionWith_iris with [] -> None | x::_ -> Some x
  method specializationOf = g.Graph.objects_of ~sub ~pred: specializationOf
  method specializationOf_opt = match self#specializationOf with [] -> None | x::_ -> Some x
  method specializationOf_iris = Graph.only_iris (self#specializationOf)
  method specializationOf_opt_iri = match self#specializationOf_iris with [] -> None | x::_ -> Some x
  method startedAtTime = Graph.literal_objects_of g ~sub ~pred: startedAtTime
  method startedAtTime_opt = match self#startedAtTime with [] -> None | x::_ -> Some x
  method todo = g.Graph.objects_of ~sub ~pred: todo
  method todo_opt = match self#todo with [] -> None | x::_ -> Some x
  method todo_iris = Graph.only_iris (self#todo)
  method todo_opt_iri = match self#todo_iris with [] -> None | x::_ -> Some x
  method unqualifiedForm = g.Graph.objects_of ~sub ~pred: unqualifiedForm
  method unqualifiedForm_opt = match self#unqualifiedForm with [] -> None | x::_ -> Some x
  method unqualifiedForm_iris = Graph.only_iris (self#unqualifiedForm)
  method unqualifiedForm_opt_iri = match self#unqualifiedForm_iris with [] -> None | x::_ -> Some x
  method used = g.Graph.objects_of ~sub ~pred: used
  method used_opt = match self#used with [] -> None | x::_ -> Some x
  method used_iris = Graph.only_iris (self#used)
  method used_opt_iri = match self#used_iris with [] -> None | x::_ -> Some x
  method value = Graph.literal_objects_of g ~sub ~pred: value
  method value_opt = match self#value with [] -> None | x::_ -> Some x
  method wasAssociatedWith = g.Graph.objects_of ~sub ~pred: wasAssociatedWith
  method wasAssociatedWith_opt = match self#wasAssociatedWith with [] -> None | x::_ -> Some x
  method wasAssociatedWith_iris = Graph.only_iris (self#wasAssociatedWith)
  method wasAssociatedWith_opt_iri = match self#wasAssociatedWith_iris with [] -> None | x::_ -> Some x
  method wasAttributedTo = g.Graph.objects_of ~sub ~pred: wasAttributedTo
  method wasAttributedTo_opt = match self#wasAttributedTo with [] -> None | x::_ -> Some x
  method wasAttributedTo_iris = Graph.only_iris (self#wasAttributedTo)
  method wasAttributedTo_opt_iri = match self#wasAttributedTo_iris with [] -> None | x::_ -> Some x
  method wasDerivedFrom = g.Graph.objects_of ~sub ~pred: wasDerivedFrom
  method wasDerivedFrom_opt = match self#wasDerivedFrom with [] -> None | x::_ -> Some x
  method wasDerivedFrom_iris = Graph.only_iris (self#wasDerivedFrom)
  method wasDerivedFrom_opt_iri = match self#wasDerivedFrom_iris with [] -> None | x::_ -> Some x
  method wasEndedBy = g.Graph.objects_of ~sub ~pred: wasEndedBy
  method wasEndedBy_opt = match self#wasEndedBy with [] -> None | x::_ -> Some x
  method wasEndedBy_iris = Graph.only_iris (self#wasEndedBy)
  method wasEndedBy_opt_iri = match self#wasEndedBy_iris with [] -> None | x::_ -> Some x
  method wasGeneratedBy = g.Graph.objects_of ~sub ~pred: wasGeneratedBy
  method wasGeneratedBy_opt = match self#wasGeneratedBy with [] -> None | x::_ -> Some x
  method wasGeneratedBy_iris = Graph.only_iris (self#wasGeneratedBy)
  method wasGeneratedBy_opt_iri = match self#wasGeneratedBy_iris with [] -> None | x::_ -> Some x
  method wasInfluencedBy = g.Graph.objects_of ~sub ~pred: wasInfluencedBy
  method wasInfluencedBy_opt = match self#wasInfluencedBy with [] -> None | x::_ -> Some x
  method wasInfluencedBy_iris = Graph.only_iris (self#wasInfluencedBy)
  method wasInfluencedBy_opt_iri = match self#wasInfluencedBy_iris with [] -> None | x::_ -> Some x
  method wasInformedBy = g.Graph.objects_of ~sub ~pred: wasInformedBy
  method wasInformedBy_opt = match self#wasInformedBy with [] -> None | x::_ -> Some x
  method wasInformedBy_iris = Graph.only_iris (self#wasInformedBy)
  method wasInformedBy_opt_iri = match self#wasInformedBy_iris with [] -> None | x::_ -> Some x
  method wasInvalidatedBy = g.Graph.objects_of ~sub ~pred: wasInvalidatedBy
  method wasInvalidatedBy_opt = match self#wasInvalidatedBy with [] -> None | x::_ -> Some x
  method wasInvalidatedBy_iris = Graph.only_iris (self#wasInvalidatedBy)
  method wasInvalidatedBy_opt_iri = match self#wasInvalidatedBy_iris with [] -> None | x::_ -> Some x
  method wasQuotedFrom = g.Graph.objects_of ~sub ~pred: wasQuotedFrom
  method wasQuotedFrom_opt = match self#wasQuotedFrom with [] -> None | x::_ -> Some x
  method wasQuotedFrom_iris = Graph.only_iris (self#wasQuotedFrom)
  method wasQuotedFrom_opt_iri = match self#wasQuotedFrom_iris with [] -> None | x::_ -> Some x
  method wasRevisionOf = g.Graph.objects_of ~sub ~pred: wasRevisionOf
  method wasRevisionOf_opt = match self#wasRevisionOf with [] -> None | x::_ -> Some x
  method wasRevisionOf_iris = Graph.only_iris (self#wasRevisionOf)
  method wasRevisionOf_opt_iri = match self#wasRevisionOf_iris with [] -> None | x::_ -> Some x
  method wasStartedBy = g.Graph.objects_of ~sub ~pred: wasStartedBy
  method wasStartedBy_opt = match self#wasStartedBy with [] -> None | x::_ -> Some x
  method wasStartedBy_iris = Graph.only_iris (self#wasStartedBy)
  method wasStartedBy_opt_iri = match self#wasStartedBy_iris with [] -> None | x::_ -> Some x
  end
