VIVO-644
This commit is contained in:
parent
d840c08d27
commit
0986361e77
3 changed files with 150 additions and 46 deletions
|
@ -24,7 +24,6 @@
|
|||
?title WHERE {
|
||||
|
||||
?subject ?property ?object .
|
||||
?object a ?objectType
|
||||
LET (?localName := afn:localname(?object))
|
||||
|
||||
OPTIONAL { ?object rdfs:label ?label }
|
||||
|
@ -58,7 +57,6 @@
|
|||
|
||||
CONSTRUCT {
|
||||
?subject ?property ?object .
|
||||
?object a ?objectType .
|
||||
?object a ?subclass .
|
||||
?object rdfs:label ?label .
|
||||
} WHERE {
|
||||
|
@ -66,7 +64,6 @@
|
|||
?subject ?property ?object .
|
||||
} UNION {
|
||||
?subject ?property ?object .
|
||||
?object a ?objectType .
|
||||
?object a ?subclass .
|
||||
} UNION {
|
||||
?subject ?property ?object .
|
||||
|
|
107
productMods/config/listViewConfig-fauxPropertyDefault.xml
Normal file
107
productMods/config/listViewConfig-fauxPropertyDefault.xml
Normal file
|
@ -0,0 +1,107 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<!-- VIVO-specific default list view config file for object properties
|
||||
|
||||
See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
PREFIX obo: <http://purl.obolibrary.org/obo/>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
|
||||
SELECT <collated> ?subclass </collated>
|
||||
?object
|
||||
?label
|
||||
?localName
|
||||
?type
|
||||
?objectType
|
||||
?title WHERE {
|
||||
|
||||
?subject ?property ?object .
|
||||
?object a ?objectType
|
||||
LET (?localName := afn:localname(?object))
|
||||
|
||||
OPTIONAL { ?object rdfs:label ?label }
|
||||
|
||||
OPTIONAL {
|
||||
# Get mostSpecificType only for Persons
|
||||
?object a foaf:Person .
|
||||
?object vitro:mostSpecificType ?typeUri .
|
||||
?typeUri rdfs:label ?type .
|
||||
}
|
||||
|
||||
OPTIONAL { ?object obo:ARG_2000028 ?vcard .
|
||||
?vcard vcard:hasTitle ?titleObj .
|
||||
?titleObj vcard:title ?title
|
||||
}
|
||||
|
||||
<collated>
|
||||
OPTIONAL { ?object a ?subclass }
|
||||
FILTER ( afn:namespace(?subclass) != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" )
|
||||
</collated>
|
||||
|
||||
# Order by ?type is important, because if the object has more than one mostSpecificType,
|
||||
# they all get returned, but postprocessing culls out all but one. Ordering by ?type
|
||||
# will ensure that at least we'll get the same one every time.
|
||||
} ORDER BY <collated> ?subclass </collated> ASC( ?label ) ASC( ?localName ) ?type
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
|
||||
CONSTRUCT {
|
||||
?subject ?property ?object .
|
||||
?object a ?subclass .
|
||||
?object rdfs:label ?label .
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?object .
|
||||
} UNION {
|
||||
?subject ?property ?object .
|
||||
?object a ?subclass .
|
||||
} UNION {
|
||||
?subject ?property ?object .
|
||||
?object rdfs:label ?label .
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
PREFIX obo: <http://purl.obolibrary.org/obo/>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
|
||||
CONSTRUCT {
|
||||
?subject ?property ?object .
|
||||
?object vitro:mostSpecificType ?typeUri .
|
||||
?typeUri rdfs:label ?type .
|
||||
?object obo:ARG_2000028 ?vcard .
|
||||
?vcard vcard:hasTitle ?titleObj .
|
||||
?titleObj vcard:title ?title
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?object .
|
||||
} UNION {
|
||||
?subject ?property ?object .
|
||||
?object vitro:mostSpecificType ?typeUri .
|
||||
?typeUri rdfs:label ?type .
|
||||
} UNION {
|
||||
?subject ?property ?object .
|
||||
?object obo:ARG_2000028 ?vcard .
|
||||
?vcard vcard:hasTitle ?titleObj .
|
||||
?titleObj vcard:title ?title
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<template>propStatement-default.ftl</template>
|
||||
</list-view-config>
|
Loading…
Add table
Add a link
Reference in a new issue