PREFIX st: PREFIX rdf: PREFIX owl: PREFIX dcterms: PREFIX dc: PREFIX fun: PREFIX rdfs: PREFIX skos: PREFIX obo: PREFIX swrl: PREFIX prov: BASE # See https://www.w3.org/TR/owl2-quick-reference/#Properties TEMPLATE ( ?property ) { # named object property TEMPLATE { "{fun:prefixedIRI(?property)}" "op" } WHERE { FILTER(ISURI(?property)) ?property a owl:ObjectProperty ; OPTIONAL { ?property rdfs:comment ?comment } FILTER (?property != owl:topObjectProperty) FILTER (?property != owl:bottomObjectProperty) BIND( IF(BOUND(?comment), ?comment, "<>") AS ?commentStr ) } . # universal object property TEMPLATE { "{fun:prefixedIRI(?property)}" "op" } WHERE { FILTER (?property = owl:topObjectProperty) } . # empty object property TEMPLATE { "{fun:prefixedIRI(?property)}" "op" } WHERE { FILTER (?property = owl:bottomObjectProperty) } . # inverse property TEMPLATE { "(inverse of " TEMPLATE ( ?inverse ) . ")" } WHERE { FILTER(ISBLANK(?property)) ?property owl:inverseOf ?inverse . } . # named data property TEMPLATE { "{fun:prefixedIRI(?property)}" "dp" } WHERE { FILTER(ISURI(?property)) ?property a owl:DatatypeProperty FILTER (?property != owl:topDataProperty) FILTER (?property != owl:bottomDataProperty) } . # universal data property TEMPLATE { "{fun:prefixedIRI(?property)}" "dp" } WHERE { FILTER (?property = owl:topDataProperty) } . # empty data property TEMPLATE { "{fun:prefixedIRI(?property)}" "dp" } WHERE { FILTER (?property = owl:bottomDataProperty) } . # fallback TEMPLATE { "{fun:prefixedIRI(?property)}Warning: property not declared" } WHERE { FILTER(ISURI(?property)) FILTER( NOT EXISTS {?property a owl:ObjectProperty } ) . FILTER( NOT EXISTS {?property a owl:DatatypeProperty } ) . FILTER (?property != owl:topObjectProperty) FILTER (?property != owl:bottomObjectProperty) FILTER (?property != owl:topDataProperty) FILTER (?property != owl:bottomDataProperty) } . }