VIVO-112: ISF changes relating to vcard classes

This commit is contained in:
tworrall 2013-09-18 11:33:31 -04:00
parent 80ff85385e
commit c5d0bc21e8
39 changed files with 1611 additions and 831 deletions

View file

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query-select>
PREFIX vcard: &lt;http://www.w3.org/2006/vcard/ns#&gt;
SELECT DISTINCT ?vcard ?email
?emailAddress
WHERE {
?subject ?property ?vcard .
?vcard vcard:hasEmail ?email
OPTIONAL { ?email vcard:email ?emailAddress }
MINUS {?email a vcard:Work}
}
</query-select>
<query-construct>
PREFIX vcard: &lt;http://www.w3.org/2006/vcard/ns#&gt;
CONSTRUCT {
?subject ?property ?vcard .
?vcard vcard:hasEmail ?email .
?email ?emailProperty ?emailValue
} WHERE {
{
?subject ?property ?vcard
} UNION {
?subject ?property ?vcard .
?vcard vcard:hasEmail ?email
} UNION {
?subject ?property ?vcard .
?vcard vcard:hasEmail ?email .
?email ?emailProperty ?emailValue
}
}
</query-construct>
<template>propStatement-emailAddress.ftl</template>
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor</postprocessor>
</list-view-config>

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query-select>
PREFIX vcard: &lt;http://www.w3.org/2006/vcard/ns#&gt;
SELECT DISTINCT ?vcard ?fullName
?firstName
?middleName
?lastName
WHERE {
?subject ?property ?vcard .
?vcard vcard:hasName ?fullName
OPTIONAL { ?fullName vcard:givenName ?firstName }
OPTIONAL { ?fullName vcard:middleName ?middleName }
OPTIONAL { ?fullName vcard:familyName ?lastName }
}
</query-select>
<query-construct>
PREFIX vcard: &lt;http://www.w3.org/2006/vcard/ns#&gt;
CONSTRUCT {
?subject ?property ?vcard .
?vcard vcard:hasName ?fullName .
?fullName ?fullNameProperty ?fullNameValue
} WHERE {
{
?subject ?property ?vcard
} UNION {
?subject ?property ?vcard .
?vcard vcard:hasName ?fullName
} UNION {
?subject ?property ?vcard .
?vcard vcard:hasName ?fullName .
?fullName ?fullNameProperty ?fullNameValue
}
}
</query-construct>
<template>propStatement-fullName.ftl</template>
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor</postprocessor>
</list-view-config>

View file

@ -1,71 +1,51 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query-select>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
SELECT DISTINCT ?subclass
?address
?localName
?label
?street1
?street2
?street3
?city
?state
?postalCode
?country
WHERE {
?subject ?property ?address
LET ( ?localName := afn:localname(?address) )
OPTIONAL { ?address rdfs:label ?label }
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 vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf vivo:Address
}
} ORDER BY ?country ?label
</query-select>
<query-construct>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subclass rdfs:subClassOf vivo:Address
} WHERE {
?subclass rdfs:subClassOf vivo:Address
}
</query-construct>
<query-construct>
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?address .
?address ?addressProperty ?addressValue
} WHERE {
{
?subject ?property ?address
} UNION {
?subject ?property ?address .
?address ?addressProperty ?addressValue
}
}
</query-construct>
<template>propStatement-mailingAddress.ftl</template>
</list-view-config>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query-select>
PREFIX vcard: &lt;http://www.w3.org/2006/vcard/ns#&gt;
SELECT DISTINCT ?vcard ?address
?street
?locality
?region
?postalCode
?country
WHERE {
?subject ?property ?vcard .
?vcard vcard:hasAddress ?address
OPTIONAL { ?address vcard:streetAddress ?street }
OPTIONAL { ?address vcard:locality ?locality }
OPTIONAL { ?address vcard:region ?region }
OPTIONAL { ?address vcard:postalCode ?postalCode }
OPTIONAL { ?address vcard:country ?country }
} ORDER BY ?country ?region ?street
</query-select>
<query-construct>
PREFIX vcard: &lt;http://www.w3.org/2006/vcard/ns#&gt;
CONSTRUCT {
?subject ?property ?vcard .
?vcard vcard:hasAddress ?address .
?address ?addressProperty ?addressValue
} WHERE {
{
?subject ?property ?vcard
} UNION {
?subject ?property ?vcard .
?vcard vcard:hasAddress ?address
} UNION {
?subject ?property ?vcard .
?vcard vcard:hasAddress ?address .
?address ?addressProperty ?addressValue
}
}
</query-construct>
<template>propStatement-mailingAddress.ftl</template>
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor</postprocessor>
</list-view-config>

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query-select>
PREFIX vcard: &lt;http://www.w3.org/2006/vcard/ns#&gt;
SELECT DISTINCT ?vcard ?email
?emailAddress
WHERE {
?subject ?property ?vcard .
?vcard vcard:hasEmail ?email .
?email a vcard:Work
OPTIONAL { ?email vcard:email ?emailAddress }
}
</query-select>
<query-construct>
PREFIX vcard: &lt;http://www.w3.org/2006/vcard/ns#&gt;
CONSTRUCT {
?subject ?property ?vcard .
?vcard vcard:hasEmail ?email .
?email a vcard:Work .
?email ?emailProperty ?emailValue
} WHERE {
{
?subject ?property ?vcard
} UNION {
?subject ?property ?vcard .
?vcard vcard:hasEmail ?email .
?email a vcard:Work
} UNION {
?subject ?property ?vcard .
?vcard vcard:hasEmail ?email .
?email a vcard:Work .
?email ?emailProperty ?emailValue
}
}
</query-construct>
<template>propStatement-emailAddress.ftl</template>
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor</postprocessor>
</list-view-config>

View file

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query-select>
PREFIX vcard: &lt;http://www.w3.org/2006/vcard/ns#&gt;
SELECT DISTINCT ?vcard ?phone
?number
WHERE {
?subject ?property ?vcard .
?vcard vcard:hasTelephone ?phone
OPTIONAL { ?phone vcard:telephone ?number }
}
</query-select>
<query-construct>
PREFIX vcard: &lt;http://www.w3.org/2006/vcard/ns#&gt;
CONSTRUCT {
?subject ?property ?vcard .
?vcard vcard:hasTelephone ?phone .
?phone ?phoneProperty ?phoneValue
} WHERE {
{
?subject ?property ?vcard
} UNION {
?subject ?property ?vcard .
?vcard vcard:hasTelephone ?phone
} UNION {
?subject ?property ?vcard .
?vcard vcard:hasTelephone ?phone .
?phone ?phoneProperty ?phoneValue
}
}
</query-construct>
<template>propStatement-telephoneNumber.ftl</template>
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor</postprocessor>
</list-view-config>

View file

@ -9,35 +9,55 @@
<query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vcard: &lt;http://www.w3.org/2006/vcard/ns#&gt;
SELECT ?link
SELECT ?vcard ?link
(afn:localname(?link) AS ?linkName)
?anchor
?label
?url
?rank WHERE {
?subject ?property ?link
OPTIONAL { ?link core:linkAnchorText ?anchor }
OPTIONAL { ?link core:linkURI ?url }
?subject ?property ?vcard .
?vcard vcard:hasURL ?link
OPTIONAL { ?link rdfs:label ?label }
OPTIONAL { ?link vcard:url ?url }
OPTIONAL { ?link core:rank ?rank }
<critical-data-required>
FILTER ( bound(?url) )
</critical-data-required>
} ORDER BY ?rank ?anchor
} ORDER BY ?rank ?label
</query-select>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vcard: &lt;http://www.w3.org/2006/vcard/ns#&gt;
CONSTRUCT {
?subject ?property ?link .
?link ?linkProp ?linkObj
?subject ?property ?vcard .
?vcard vcard:hasURL ?link .
?link vcard:url ?url .
?link core:rank ?rank .
?link rdfs:label ?label
} WHERE {
{
?subject ?property ?link
?subject ?property ?vcard .
?vcard vcard:hasURL ?link
} UNION {
?subject ?property ?link .
?link ?linkProp ?linkObj
?subject ?property ?vcard .
?vcard vcard:hasURL ?link .
?link vcard:url ?url
} UNION {
?subject ?property ?vcard .
?vcard vcard:hasURL ?link .
?link core:rank ?rank
} UNION {
?subject ?property ?vcard .
?vcard vcard:hasURL ?link .
?link rdfs:label ?label
}
}
</query-construct>
<template>propStatement-webpage.ftl</template>
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor</postprocessor>
</list-view-config>