Skip to content

Instantly share code, notes, and snippets.

@ocorcho
Created March 4, 2016 16:33
Show Gist options
  • Save ocorcho/6542c46d11d7636cf2a7 to your computer and use it in GitHub Desktop.
Save ocorcho/6542c46d11d7636cf2a7 to your computer and use it in GitHub Desktop.
Consulta para evitar que se generen duplicados cuando los criterios son de varios tipos
PREFIX pproc: <http://contsem.unizar.es/def/sector-publico/pproc#>
PREFIX s: <http://schema.org/>
PREFIX pc: <http://purl.org/procurement/public-contracts#>
PREFIX gr: <http://purl.org/goodrelations/v1#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT DISTINCT ?contrato ?criterios ?tipo ?nombreCriterio ?pesoCriterio
WHERE {
?contrato a pproc:Contract;
dcterms:identifier "CUL07-14"^^xsd:string.
?contrato pc:awardCriteriaCombination/pc:awardCriterion ?criterios.
?criterios rdf:type ?tipo1.
OPTIONAL {?criterios rdf:type ?tipo2 . FILTER (?tipo2 != pc:AwardCriteria)}
OPTIONAL{?criterios pproc:criterionEvaluationMode ?formaValoracion}.
?criterios pc:criterionName ?nombreCriterio;
pc:criterionWeight ?pesoCriterio.
BIND (COALESCE(?tipo2,?tipo1) AS ?tipo)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment