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>
|
<list-view-config>
|
||||||
<query-select>
|
<query-select>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
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 afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||||
|
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||||
|
|
||||||
SELECT DISTINCT ?subclass
|
SELECT DISTINCT ?subclass
|
||||||
?address
|
?address
|
||||||
?localName
|
?localName
|
||||||
?label
|
?label
|
||||||
?dept
|
?street1
|
||||||
?street
|
?street2
|
||||||
|
?street3
|
||||||
?city
|
?city
|
||||||
?state
|
?state
|
||||||
?postalCode
|
?postalCode
|
||||||
|
@ -24,32 +26,33 @@
|
||||||
?subject ?property ?address
|
?subject ?property ?address
|
||||||
LET ( ?localName := afn:localname(?address) )
|
LET ( ?localName := afn:localname(?address) )
|
||||||
OPTIONAL { ?address rdfs:label ?label }
|
OPTIONAL { ?address rdfs:label ?label }
|
||||||
OPTIONAL { ?address core:addressDepartment ?dept }
|
OPTIONAL { ?address vivo:address1 ?street1 }
|
||||||
OPTIONAL { ?address core:addressStreet ?street }
|
OPTIONAL { ?address vivo:address2 ?street2 }
|
||||||
OPTIONAL { ?address core:addressCity ?city }
|
OPTIONAL { ?address vivo:address3 ?street3 }
|
||||||
OPTIONAL { ?address core:addressState ?state }
|
OPTIONAL { ?address vivo:addressCity ?city }
|
||||||
OPTIONAL { ?address core:addressPostalCode ?postalCode }
|
OPTIONAL { ?address vivo:addressState ?state }
|
||||||
OPTIONAL { ?address core:addressCountry ?country }
|
OPTIONAL { ?address vivo:addressPostalCode ?postalCode }
|
||||||
|
OPTIONAL { ?address vivo:addressCountry ?country }
|
||||||
|
|
||||||
OPTIONAL { ?address a ?subclass .
|
OPTIONAL { ?address vitro:mostSpecificType ?subclass .
|
||||||
?subclass rdfs:subClassOf core:Address
|
?subclass rdfs:subClassOf vivo:Address
|
||||||
}
|
}
|
||||||
|
|
||||||
} ORDER BY <collated>?subclass</collated> ?label
|
} ORDER BY ?country ?label
|
||||||
</query-select>
|
</query-select>
|
||||||
|
|
||||||
<query-construct>
|
<query-construct>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
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 {
|
CONSTRUCT {
|
||||||
?subclass rdfs:subClassOf core:Address
|
?subclass rdfs:subClassOf vivo:Address
|
||||||
} WHERE {
|
} WHERE {
|
||||||
?subclass rdfs:subClassOf core:Address
|
?subclass rdfs:subClassOf vivo:Address
|
||||||
}
|
}
|
||||||
</query-construct>
|
</query-construct>
|
||||||
|
|
||||||
<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#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
CONSTRUCT {
|
CONSTRUCT {
|
||||||
?subject ?property ?address .
|
?subject ?property ?address .
|
||||||
|
@ -63,6 +66,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</query-construct>
|
</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>
|
<template>propStatement-mailingAddress.ftl</template>
|
||||||
</list-view-config>
|
</list-view-config>
|
||||||
|
|
|
@ -12,19 +12,23 @@
|
||||||
next statement -->
|
next statement -->
|
||||||
<#macro showAddress 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 )>
|
statement.state?has_content ||statement.postalCode?has_content || statement.country?has_content )>
|
||||||
|
|
||||||
<div class="adr">
|
<div class="adr">
|
||||||
<#if statement.dept?has_content>
|
<#if statement.street1?has_content>
|
||||||
<div class="address-dept">${statement.dept}</div>
|
<div class="address-street1">${statement.street1}</div>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#if statement.street?has_content>
|
<#if statement.street2?has_content>
|
||||||
<div class="street-address">${statement.street}</div>
|
<div class="address-street2">${statement.street2}</div>
|
||||||
</#if>
|
</#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. -->
|
the US, display the city, state, and postal code on a single line. -->
|
||||||
<#if ( statement.subclass?? && statement.subclass?contains("USPostalAddress") ) ||
|
<#if ( statement.subclass?? && statement.subclass?contains("USPostalAddress") ) ||
|
||||||
( statement.country?? && ( statement.country?contains("United States") ||
|
( statement.country?? && ( statement.country?contains("United States") ||
|
||||||
|
@ -56,5 +60,5 @@
|
||||||
<#else>
|
<#else>
|
||||||
${statement.label!}
|
${statement.label!}
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
</#macro>
|
</#macro>
|
Loading…
Add table
Add a link
Reference in a new issue