diff --git a/productMods/config/listViewConfig-mailingAddress.xml b/productMods/config/listViewConfig-mailingAddress.xml
index 42412962..13c51600 100644
--- a/productMods/config/listViewConfig-mailingAddress.xml
+++ b/productMods/config/listViewConfig-mailingAddress.xml
@@ -6,15 +6,17 @@
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 ?subclass ?label
+ } ORDER BY ?country ?label
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
}
- 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 .
@@ -63,6 +66,21 @@
}
}
+
+
+ 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
+ }
+
propStatement-mailingAddress.ftl
diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-mailingAddress.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-mailingAddress.ftl
index ca951c01..8ca8f582 100644
--- a/productMods/templates/freemarker/body/partials/individual/propStatement-mailingAddress.ftl
+++ b/productMods/templates/freemarker/body/partials/individual/propStatement-mailingAddress.ftl
@@ -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 )>
- <#if statement.dept?has_content>
-
${statement.dept}
+ <#if statement.street1?has_content>
+
${statement.street1}
#if>
- <#if statement.street?has_content>
-
${statement.street}
+ <#if statement.street2?has_content>
+
${statement.street2}
#if>
- <#-- If the subclass is core:US Postal Address, or if the country is
+ <#if statement.street3?has_content>
+
${statement.street3}
+ #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") ||
@@ -56,5 +60,5 @@
<#else>
${statement.label!}
#if>
-
+
#macro>
\ No newline at end of file