updated mailingAddress list view because of changes to the ontology
This commit is contained in:
parent
e2e7574e1b
commit
90bdb9acfa
2 changed files with 45 additions and 23 deletions
|
@ -6,15 +6,17 @@
|
|||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||
|
||||
SELECT DISTINCT ?subclass
|
||||
?address
|
||||
?localName
|
||||
?label
|
||||
?dept
|
||||
?street
|
||||
?street1
|
||||
?street2
|
||||
?street3
|
||||
?city
|
||||
?state
|
||||
?postalCode
|
||||
|
@ -24,32 +26,33 @@
|
|||
?subject ?property ?address
|
||||
LET ( ?localName := afn:localname(?address) )
|
||||
OPTIONAL { ?address rdfs:label ?label }
|
||||
OPTIONAL { ?address core:addressDepartment ?dept }
|
||||
OPTIONAL { ?address core:addressStreet ?street }
|
||||
OPTIONAL { ?address core:addressCity ?city }
|
||||
OPTIONAL { ?address core:addressState ?state }
|
||||
OPTIONAL { ?address core:addressPostalCode ?postalCode }
|
||||
OPTIONAL { ?address core:addressCountry ?country }
|
||||
OPTIONAL { ?address vivo:address1 ?street1 }
|
||||
OPTIONAL { ?address vivo:address2 ?street2 }
|
||||
OPTIONAL { ?address vivo:address3 ?street3 }
|
||||
OPTIONAL { ?address vivo:addressCity ?city }
|
||||
OPTIONAL { ?address vivo:addressState ?state }
|
||||
OPTIONAL { ?address vivo:addressPostalCode ?postalCode }
|
||||
OPTIONAL { ?address vivo:addressCountry ?country }
|
||||
|
||||
OPTIONAL { ?address a ?subclass .
|
||||
?subclass rdfs:subClassOf core:Address
|
||||
OPTIONAL { ?address vitro:mostSpecificType ?subclass .
|
||||
?subclass rdfs:subClassOf vivo:Address
|
||||
}
|
||||
|
||||
} ORDER BY <collated>?subclass</collated> ?label
|
||||
} ORDER BY ?country ?label
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||
CONSTRUCT {
|
||||
?subclass rdfs:subClassOf core:Address
|
||||
?subclass rdfs:subClassOf vivo:Address
|
||||
} WHERE {
|
||||
?subclass rdfs:subClassOf core:Address
|
||||
?subclass rdfs:subClassOf vivo:Address
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?address .
|
||||
|
@ -64,5 +67,20 @@
|
|||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX vivo: <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#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?address .
|
||||
?address vitro:mostSpecificType ?subclass .
|
||||
?subclass rdfs:subClassOf vivo:Address
|
||||
} WHERE {
|
||||
?subject ?property ?address .
|
||||
?address vitro:mostSpecificType ?subclass .
|
||||
?subclass rdfs:subClassOf vivo:Address
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<template>propStatement-mailingAddress.ftl</template>
|
||||
</list-view-config>
|
||||
|
|
|
@ -12,19 +12,23 @@
|
|||
next statement -->
|
||||
<#macro showAddress statement>
|
||||
|
||||
<#if ( statement.dept?has_content || statement.street?has_content || statement.city?has_content ||
|
||||
<#if ( statement.street1?has_content || statement.street2?has_content || statement.street3?has_content || statement.city?has_content ||
|
||||
statement.state?has_content ||statement.postalCode?has_content || statement.country?has_content )>
|
||||
|
||||
<div class="adr">
|
||||
<#if statement.dept?has_content>
|
||||
<div class="address-dept">${statement.dept}</div>
|
||||
<#if statement.street1?has_content>
|
||||
<div class="address-street1">${statement.street1}</div>
|
||||
</#if>
|
||||
|
||||
<#if statement.street?has_content>
|
||||
<div class="street-address">${statement.street}</div>
|
||||
<#if statement.street2?has_content>
|
||||
<div class="address-street2">${statement.street2}</div>
|
||||
</#if>
|
||||
|
||||
<#-- If the subclass is core:US Postal Address, or if the country is
|
||||
<#if statement.street3?has_content>
|
||||
<div class="address-street3">${statement.street3}</div>
|
||||
</#if>
|
||||
|
||||
<#-- If the subclass is vivo:US Postal Address, or if the country is
|
||||
the US, display the city, state, and postal code on a single line. -->
|
||||
<#if ( statement.subclass?? && statement.subclass?contains("USPostalAddress") ) ||
|
||||
( statement.country?? && ( statement.country?contains("United States") ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue