backing out previous list view change -- list view and template

This commit is contained in:
Tim Worrall 2015-02-09 17:34:12 -05:00
parent a7541643f4
commit fe8dc7bac3
2 changed files with 13 additions and 14 deletions

View file

@ -31,10 +31,11 @@
OPTIONAL { OPTIONAL {
# Get mostSpecificType only for Persons # Get mostSpecificType only for Persons
?object vitro:mostSpecificType ?subclass . ?object a foaf:Person .
?subclass rdfs:label ?type . ?object vitro:mostSpecificType ?typeUri .
?typeUri rdfs:label ?type .
# Display only a mostSpecificType that belongs to a classgroup. # Display only a mostSpecificType that belongs to a classgroup.
?subclass vitro:inClassGroup ?classGroup . ?typeUri vitro:inClassGroup ?classGroup .
?classGroup a vitro:ClassGroup ?classGroup a vitro:ClassGroup
} }
@ -44,6 +45,7 @@
} }
<collated> <collated>
OPTIONAL { ?object a ?subclass }
FILTER ( afn:namespace(?subclass) != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" ) FILTER ( afn:namespace(?subclass) != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" )
</collated> </collated>
@ -60,6 +62,7 @@
CONSTRUCT { CONSTRUCT {
?subject ?property ?object . ?subject ?property ?object .
?object a ?objectType . ?object a ?objectType .
?object a ?subclass .
?object rdfs:label ?label . ?object rdfs:label ?label .
} WHERE { } WHERE {
{ {
@ -83,10 +86,10 @@
CONSTRUCT { CONSTRUCT {
?subject ?property ?object . ?subject ?property ?object .
?object a ?objectType . ?object a ?objectType .
?object vitro:mostSpecificType ?subclass . ?object vitro:mostSpecificType ?typeUri .
?subclass vitro:inClassGroup ?classGroup . ?typeUri vitro:inClassGroup ?classGroup .
?classGroup a vitro:ClassGroup . ?classGroup a vitro:ClassGroup .
?subclass rdfs:label ?type . ?typeUri rdfs:label ?type .
?object obo:ARG_2000028 ?vcard . ?object obo:ARG_2000028 ?vcard .
?vcard vcard:hasTitle ?titleObj . ?vcard vcard:hasTitle ?titleObj .
?titleObj vcard:title ?title ?titleObj vcard:title ?title
@ -97,9 +100,9 @@
} UNION { } UNION {
?subject ?property ?object . ?subject ?property ?object .
?object a ?objectType . ?object a ?objectType .
?object vitro:mostSpecificType ?subclass . ?object vitro:mostSpecificType ?typeUri .
?subclass rdfs:label ?type . ?typeUri rdfs:label ?type .
?subclass vitro:inClassGroup ?classGroup . ?typeUri vitro:inClassGroup ?classGroup .
?classGroup a vitro:ClassGroup ?classGroup a vitro:ClassGroup
} UNION { } UNION {
?subject ?property ?object . ?subject ?property ?object .

View file

@ -10,11 +10,7 @@
<#macro showStatement statement> <#macro showStatement statement>
<#-- The query retrieves a type only for Persons. Post-processing will remove all but one. --> <#-- The query retrieves a type only for Persons. Post-processing will remove all but one. -->
<#if statement.subclass??>
<a href="${profileUrl(statement.uri("object"))}" title="${i18n().name}">${statement.label!statement.localName!}</a>
<#else>
<a href="${profileUrl(statement.uri("object"))}" title="${i18n().name}">${statement.label!statement.localName!}</a>&nbsp; ${statement.title!statement.type!} <a href="${profileUrl(statement.uri("object"))}" title="${i18n().name}">${statement.label!statement.localName!}</a>&nbsp; ${statement.title!statement.type!}
</#if>
</#macro> </#macro>