# ****** Tracing system comments start **** # Current date and time 04 March 2022 10:54:07 # parameter id=https://id.parliament.uk/yxrXHdd7 # parameter commonsDateLaid=https://id.parliament.uk/cspzmb6w # parameter lordsDateLaid=https://id.parliament.uk/puVMaN7t # parameter commonsDatePublished=https://id.parliament.uk/isWn7s3K # parameter lordsDatePublished=https://id.parliament.uk/Wt0ewA6R # ****** Tracing system comments end **** PREFIX : PREFIX id: PREFIX rdfs: SELECT DISTINCT ?laidPaper ?timeLines ?enablingActs ?laidPaperName ?departmentId ?layingBodyId ?layingBodyName ?paperNumber ?paperYear ?paperPrefix ?paperMadeDate ?paperComingIntoForceDate ?paperComingIntoForceNote ?procedure ?procedureName ?workPackagedPaperWebLink ?commonsLayingDate ?lordsLayingDate ?precededByInstrumentId ?precededByInstrumentName ?precededByProcedure ?precededByProcedureName ?followedByInstrumentId ?followedByInstrumentName ?followedByProcedure ?followedByProcedureName ?commonsPublishedDate ?lordsPublishedDate WHERE { BIND ( as ?laidPaper) ?laidPaper a :EnabledThing . { SELECT (GROUP_CONCAT(DISTINCT(?timeLine); SEPARATOR =",") AS ?timeLines) WHERE { BIND ( as ?timeLinePaper) ?timeLinePaper:workPackagedThingHasWorkPackage ?timeLineWorkPackage . ?timeLineWorkPackage :workPackageHasBusinessItem ?timeLineBusinessItem. ?timeLineBusinessItem :businessItemHasProcedureStep ?timeLineProcedureStep. FILTER (?timeLineProcedureStep IN (id:cspzmb6w,id:AexX3QoA,id:isWn7s3K,id:Wt0ewA6R)) ?timeLineWorkPackage :workPackageHasProcedure/rdfs:label ?timeLineProcedure. ?timeLineBusinessItem :businessItemDate ?timeLineDate. BIND ( CONCAT("{{", STR(?timeLineWorkPackage), "}}{{", STR(?timeLineDate), "}}{{", ?timeLineProcedure, "}}") as ?timeLine) } } OPTIONAL { SELECT (GROUP_CONCAT(DISTINCT(?enablingAct); SEPARATOR =",") AS ?enablingActs) WHERE { BIND ( as ?instrument) ?instrument :enabledBy ?actUri . ?actUri :actOfParliamentName ?actName . BIND ( CONCAT("{{", STR(?actUri), "}}{{", STR(?actName), "}}") as ?enablingAct) } } OPTIONAL { ?laidPaper :workPackagedThingHasWorkPackagedThingWebLink ?workPackagedPaperWebLink . } OPTIONAL { ?laidPaper :statutoryInstrumentPaperYear ?paperYear . } OPTIONAL { ?laidPaper :statutoryInstrumentPaperPrefix ?paperPrefix . } OPTIONAL { ?laidPaper :statutoryInstrumentPaperNumber ?paperNumber . } OPTIONAL { ?laidPaper :workPackagedThingName ?laidPaperName . } OPTIONAL { ?laidPaper :statutoryInstrumentPaperComingIntoForceNote ?paperComingIntoForceNote . } OPTIONAL { ?laidPaper :statutoryInstrumentPaperComingIntoForceDate ?paperComingIntoForceDate . } OPTIONAL { ?laidPaper :statutoryInstrumentPaperMadeDate ?paperMadeDate . } OPTIONAL { ?laidPaper :laidThingHasLaying ?laying . ?laying :layingHasLayingBody ?layingBodyId . OPTIONAL { ?layingBodyId :groupName ?layingBodyName . } OPTIONAL { ?layingBodyId :mnisDepartmentId ?departmentId .} } OPTIONAL { ?laidPaper :laidThingHasLaying ?commonsLaidThingHasLaying . ?commonsLaidThingHasLaying :businessItemHasProcedureStep ?commonsProcedureStep . filter( ?commonsProcedureStep in (, )) ?commonsLaidThingHasLaying :businessItemDate ?commonsLayingDate } OPTIONAL { ?laidPaper :laidThingHasLaying ?lordsLaidThingHasLaying . ?lordsLaidThingHasLaying :businessItemHasProcedureStep ?lordsProcedureStep . filter( ?lordsProcedureStep in( , )) ?lordsLaidThingHasLaying :businessItemDate ?lordsLayingDate } ?laidPaper :workPackagedThingHasWorkPackage ?workPackage . ?workPackage :workPackageHasProcedure ?procedure . ?procedure :procedureName ?procedureName . OPTIONAL { ?laidPaper :precededBy ?precededByInstrumentId . ?precededByInstrumentId :workPackagedThingName ?precededByInstrumentName . OPTIONAL { ?precededByInstrumentId :workPackagedThingHasWorkPackage ?precededByWorkPackage . OPTIONAL { ?precededByWorkPackage :workPackageHasProcedure ?precededByProcedure . OPTIONAL { ?precededByProcedure :procedureName ?precededByProcedureName . } } } } OPTIONAL { ?laidPaper :followedBy ?followedByInstrumentId . ?followedByInstrumentId :workPackagedThingName ?followedByInstrumentName . OPTIONAL { ?followedByInstrumentId :workPackagedThingHasWorkPackage ?followedByWorkPackage . OPTIONAL { ?followedByWorkPackage :workPackageHasProcedure ?followedByProcedure . OPTIONAL { ?followedByProcedure :procedureName ?followedByProcedureName . } } } } OPTIONAL { ?laidPaper :workPackagedThingHasWorkPackage ?commonsPublishedDateWorkPackage . ?commonsPublishedDateWorkPackage :workPackageHasBusinessItem ?commonsPublishedDatebusinessItem . ?commonsPublishedDatebusinessItem :businessItemHasProcedureStep ?commonsPublishedDateprocedureStep . filter( ?commonsPublishedDateprocedureStep = ) ?commonsPublishedDatebusinessItem :date ?commonsPublishedDate } OPTIONAL { ?laidPaper :workPackagedThingHasWorkPackage ?lordsPublishedDateWorkPackage . ?lordsPublishedDateWorkPackage :workPackageHasBusinessItem ?lordsPublishedDatebusinessItem . ?lordsPublishedDatebusinessItem :businessItemHasProcedureStep ?lordsPublishedDateprocedureStep . filter( ?lordsPublishedDateprocedureStep = ) ?lordsPublishedDatebusinessItem :date ?lordsPublishedDate } } LIMIT 1