VIVO-112: another round of updates to support the ISF changes

This commit is contained in:
tworrall 2013-08-28 16:58:02 -04:00
parent 978c9ccd5f
commit 59431742e1
10 changed files with 1901 additions and 1848 deletions

View file

@ -196,7 +196,7 @@ local:hasResearcherRoleConfig a :ObjectPropertyDisplayConfig ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddResearcherRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupresearch> .
m
local:hasInvestigatorRoleContext a :ConfigContext ;
:hasConfiguration local:hasInvestigatorRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
@ -226,7 +226,7 @@ local:hasPrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasCo-PrincipalInvestigatorRoleContext a :ConfigContext ;
:hasConfiguration local:hasCo-PrincipalInvestigatorRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedBy <http://vivoweb.org/ontology/core#Co-PrincipalInvestigatorRole> .
:qualifiedBy <http://vivoweb.org/ontology/core#CoPrincipalInvestigatorRole> .
local:hasCo-PrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasInvestigatorRole.xml"^^xsd:string ;
@ -278,7 +278,7 @@ local:educationalTrainingConfig a :ObjectPropertyDisplayConfig ;
local:informationResourceInAuthorshipContext a :ConfigContext ;
:hasConfiguration local:informationResourceInAuthorshipConfig ;
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
:qualifiedByDomain <http://purl.org/ontology/bibo/Document> .
:qualifiedByDomain <http://purl.org/ontology/bibo/Document> ;
:qualifiedBy <http://vivoweb.org/ontology/core#Authorship> .
local:informationResourceInAuthorshipConfig a :ObjectPropertyDisplayConfig ;

View file

@ -1,222 +1,243 @@
<?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 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 vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
SELECT DISTINCT
?role
?activity ?activityName
?activityLabel
?awardedBy
?adminedBy
?awardedByLabel
?adminedByLabel
?dateTimeStartRole ?dateTimeEndRole
?dateTimeStartGrant ?dateTimeEndGrant
?hideThis
WHERE {
?subject ?property ?role
OPTIONAL { ?role core:roleRealizedIn ?activity
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
}
OPTIONAL { ?role core:roleContributesTo ?activity
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
}
OPTIONAL { ?activity core:grantAwardedBy ?awardedBy .
?awardedBy rdfs:label ?awardedByLabel
}
OPTIONAL { ?activity core:administeredBy ?adminedBy .
?adminedBy rdfs:label ?adminedByLabel
}
OPTIONAL { ?role core:dateTimeInterval ?dateTimeIntervalRole
OPTIONAL { ?dateTimeIntervalRole core:start ?dateTimeStartValueRole .
?dateTimeStartValueRole core:dateTime ?dateTimeStartRole
}
OPTIONAL { ?dateTimeIntervalRole core:end ?dateTimeEndValueRole .
?dateTimeEndValueRole core:dateTime ?dateTimeEndRole
}
}
OPTIONAL { ?role core:roleContributesTo ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant
OPTIONAL { ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant .
?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant
}
OPTIONAL { ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant .
?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant
}
}
OPTIONAL { ?role core:hideFromDisplay ?hideThis }
# NOT EXISTS { ?role core:hideFromDisplay ?hideThis }
<critical-data-required>
FILTER ( bound(?activity) )
</critical-data-required>
} ORDER BY DESC(?dateTimeEndRole) DESC(?dateTimeStartRole) DESC(?dateTimeEndGrant) DESC(?dateTimeStartGrant) ?activityLabel ?activityName
</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 vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:roleRealizedIn ?activity .
?activity rdfs:label ?activityLabel
} WHERE {
{
?subject ?property ?role .
?role core:roleContributesTo ?activity
} UNION
{
?subject ?property ?role .
?role core:roleRealizedIn ?activity .
?activity rdfs:label ?activityLabel
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
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;
CONSTRUCT {
?subject ?property ?role .
?role core:roleContributesTo ?activity .
?activity rdfs:label ?activityLabel
} WHERE {
{
?subject ?property ?role .
?role core:roleContributesTo ?activity
} UNION
{
?subject ?property ?role .
?role core:roleContributesTo ?activity .
?activity rdfs:label ?activityLabel
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?role ?roleProperty ?roleValue .
?activity rdfs:label ?activityName .
?activity core:grantAwardedBy ?awardedBy .
?awardedBy rdfs:label ?awardedByLabel .
?activity core:administeredBy ?adminedBy .
?adminedBy rdfs:label ?adminedByLabel
} WHERE {
{
?subject ?property ?role
} UNION {
?subject ?property ?role .
?role ?roleProperty ?roleValue
} UNION {
?subject ?property ?role .
?role core:roleContributesTo ?activity .
?activity rdfs:label ?activityName
} UNION {
?subject ?property ?role .
?role core:roleRealizedIn ?activity .
?activity rdfs:label ?activityName
} UNION {
?subject ?property ?role .
?role core:roleContributesTo ?activity .
?activity core:grantAwardedBy ?awardedBy
} UNION {
?subject ?property ?role .
?role core:roleContributesTo ?activity .
?activity core:grantAwardedBy ?awardedBy .
?awardedBy rdfs:label ?awardedByLabel
} UNION {
?subject ?property ?role .
?role core:roleContributesTo ?activity .
?activity core:administeredBy ?adminedBy
} UNION {
?subject ?property ?role .
?role core:roleContributesTo ?activity .
?activity core:administeredBy ?adminedBy .
?adminedBy rdfs:label ?adminedByLabel
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeIntervalRole .
?dateTimeIntervalRole core:start ?dateTimeStartValueRole .
?dateTimeStartValueRole core:dateTime ?dateTimeStartRole
} WHERE {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeIntervalRole .
?dateTimeIntervalRole core:start ?dateTimeStartValueRole .
?dateTimeStartValueRole core:dateTime ?dateTimeStartRole
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeIntervalRole .
?dateTimeIntervalRole core:end ?dateTimeEndValueRole .
?dateTimeEndValueRole core:dateTime ?dateTimeEndRole
} WHERE {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeIntervalRole .
?dateTimeIntervalRole core:end ?dateTimeEndValueRole .
?dateTimeEndValueRole core:dateTime ?dateTimeEndRole
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:roleContributesTo ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant .
?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant .
?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant
} WHERE {
?subject ?property ?role .
?role core:roleContributesTo ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant .
?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant .
?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:roleContributesTo ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant .
?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant .
?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant
} WHERE {
?subject ?property ?role .
?role core:roleContributesTo ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant .
?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant .
?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant
}
</query-construct>
<template>propStatement-hasInvestigatorRole.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 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 vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
SELECT DISTINCT
?role
?activity ?activityName
?activityLabel
?awardedBy
?adminedBy
?awardedByLabel
?adminedByLabel
?dateTimeStartRole ?dateTimeEndRole
?dateTimeStartGrant ?dateTimeEndGrant
?hideThis
WHERE {
?subject ?property ?role .
?role a ?objectType .
?role vitro:mostSpecificType ?subclass
OPTIONAL { ?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?activity
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
}
OPTIONAL { ?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?activity
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
}
OPTIONAL { ?activity core:grantAwardedBy ?awardedBy .
?awardedBy rdfs:label ?awardedByLabel
}
OPTIONAL { ?activity core:administeredBy ?adminedBy .
?adminedBy rdfs:label ?adminedByLabel
}
OPTIONAL { ?role core:dateTimeInterval ?dateTimeIntervalRole
OPTIONAL { ?dateTimeIntervalRole core:start ?dateTimeStartValueRole .
?dateTimeStartValueRole core:dateTime ?dateTimeStartRole
}
OPTIONAL { ?dateTimeIntervalRole core:end ?dateTimeEndValueRole .
?dateTimeEndValueRole core:dateTime ?dateTimeEndRole
}
}
OPTIONAL { ?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant
OPTIONAL { ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant .
?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant
}
OPTIONAL { ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant .
?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant
}
}
OPTIONAL { ?role core:hideFromDisplay ?hideThis }
FILTER ( bound(?activity) &amp;&amp; ?subclass = ?objectType)
} ORDER BY DESC(?dateTimeEndRole) DESC(?dateTimeStartRole) DESC(?dateTimeEndGrant) DESC(?dateTimeStartGrant) ?activityLabel ?activityName
</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 vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
CONSTRUCT {
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?activity .
?activity rdfs:label ?activityLabel
} WHERE {
{
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?activity
} UNION
{
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt;n ?activity .
?activity rdfs:label ?activityLabel
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
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;
CONSTRUCT {
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?activity .
?activity rdfs:label ?activityLabel
} WHERE {
{
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?activity
} UNION
{
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?activity .
?activity rdfs:label ?activityLabel
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?role a ?objectType .
?role ?roleProperty ?roleValue .
?activity rdfs:label ?activityName .
?activity core:grantAwardedBy ?awardedBy .
?awardedBy rdfs:label ?awardedByLabel .
?activity core:administeredBy ?adminedBy .
?adminedBy rdfs:label ?adminedByLabel
} WHERE {
{
?subject ?property ?role
} UNION {
?subject ?property ?role .
?role a ?objectType .
?role ?roleProperty ?roleValue
} UNION {
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?activity .
?activity rdfs:label ?activityName
} UNION {
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?activity .
?activity rdfs:label ?activityName
} UNION {
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?activity .
?activity core:grantAwardedBy ?awardedBy
} UNION {
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?activity .
?activity core:grantAwardedBy ?awardedBy .
?awardedBy rdfs:label ?awardedByLabel
} UNION {
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?activity .
?activity core:administeredBy ?adminedBy
} UNION {
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?activity .
?activity core:administeredBy ?adminedBy .
?adminedBy rdfs:label ?adminedByLabel
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role a ?objectType .
?role core:dateTimeInterval ?dateTimeIntervalRole .
?dateTimeIntervalRole core:start ?dateTimeStartValueRole .
?dateTimeStartValueRole core:dateTime ?dateTimeStartRole
} WHERE {
?subject ?property ?role .
?role a ?objectType .
?role core:dateTimeInterval ?dateTimeIntervalRole .
?dateTimeIntervalRole core:start ?dateTimeStartValueRole .
?dateTimeStartValueRole core:dateTime ?dateTimeStartRole
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role a ?objectType .
?role core:dateTimeInterval ?dateTimeIntervalRole .
?dateTimeIntervalRole core:end ?dateTimeEndValueRole .
?dateTimeEndValueRole core:dateTime ?dateTimeEndRole
} WHERE {
?subject ?property ?role .
?role a ?objectType .
?role core:dateTimeInterval ?dateTimeIntervalRole .
?dateTimeIntervalRole core:end ?dateTimeEndValueRole .
?dateTimeEndValueRole core:dateTime ?dateTimeEndRole
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant .
?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant .
?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant
} WHERE {
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant .
?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant .
?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant .
?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant .
?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant
} WHERE {
?subject ?property ?role .
?role a ?objectType .
?role &lt;http://vivoweb.org/ontology/core#relatedBy&gt; ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant .
?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant .
?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant
}
</query-construct>
<template>propStatement-hasInvestigatorRole.ftl</template>
</list-view-config>

View file

@ -1,333 +1,363 @@
<?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 -->
<!-- Note: ?workshop is a generic name for any intervening event between a presentation and -->
<!-- a conference, such as a workshop or session or exhibit. tlw72 -->
<list-view-config>
<query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;
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;
SELECT DISTINCT <collated>?subclass</collated>
?role ?roleLabel
?presentation ?presentationName ?presentationLabel
?conference ?conferenceLabel
?series ?seriesLabel
?workshop
?dateTime
WHERE {
?subject ?property ?role
OPTIONAL { ?role rdfs:label ?roleLabel }
OPTIONAL { ?role vivo:roleRealizedIn ?presentation
LET (?presentationName := afn:localname(?presentation))
OPTIONAL { ?presentation rdfs:label ?presentationLabel }
OPTIONAL { ?conference a bibo:Conference .
OPTIONAL { ?conference rdfs:label ?conferenceLabel }
{
?presentation vivo:eventWithin ?conference
} UNION {
?conference vivo:includesEvent ?presentation
}
}
OPTIONAL {
{
?presentation vivo:eventWithin ?workshop .
?workshop vivo:eventWithin ?conference
} UNION {
?workshop vivo:includesEvent ?presentation .
?conference vivo:includesEvent ?workshop
}
OPTIONAL { ?conference rdfs:label ?conferenceLabel }
}
OPTIONAL { ?series a vivo:EventSeries .
OPTIONAL { ?series rdfs:label ?seriesLabel }
{
?presentation vivo:inEventWithin ?series
} UNION {
?series vivo:seriesForEvent ?presentation
}
}
OPTIONAL {
{
?presentation vivo:eventWithin ?workshop .
?workshop vivo:inEventSeries ?series
} UNION {
?workshop vivo:includesEvent ?presentation .
?series vivo:seriesForEvent ?workshop
}
OPTIONAL { ?series rdfs:label ?seriesLabel }
}
<collated>
?presentation vitro:mostSpecificType ?subclass .
{
?subclass rdfs:subClassOf vivo:Presentation
} UNION {
?subclass owl:equivalentClass vivo:Presentation
}
</collated>
}
OPTIONAL { ?role vivo:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval vivo:start ?dateTimeStartValue .
?dateTimeStartValue vivo:dateTime ?dateTime
}
}
<critical-data-required>
FILTER ( bound(?presentation) )
</critical-data-required>
} ORDER BY <collated>?subclass</collated> DESC(?dateTime) ?presentationLabel ?presentationName
</query-select>
<query-construct>
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;
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;
CONSTRUCT {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?presentation vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf vivo:Presentation .
?subclass owl:equivalentClass vivo:Presentation .
} WHERE {
{
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?presentation vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf vivo:Presentation
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?presentation vitro:mostSpecificType ?subclass .
?subclass owl:equivalentClass vivo:Presentation
}
}
</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 ?role .
?role ?roleProperty ?roleValue .
?presentation rdfs:label ?presentationLabel
} WHERE {
{
?subject ?property ?role
} UNION {
?subject ?property ?role .
?role ?roleProperty ?roleValue
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?presentation rdfs:label ?presentationLabel
}
}
</query-construct>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?conference a bibo:Conference .
?presentation vivo:eventWithin ?conference .
?conference vivo:includesEvent ?presentation .
?conference rdfs:label ?conferenceLabel
} WHERE {
{
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference .
?presentation vivo:eventWithin ?conference
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference .
?presentation vivo:eventWithin ?conference .
?conference rdfs:label ?conferenceLabel
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference .
?conference vivo:includesEvent ?presentation
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference .
?conference vivo:includesEvent ?presentation .
?conference rdfs:label ?conferenceLabel
}
}
</query-construct>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?workshop vivo:eventWithin ?conference .
?conference vivo:includesEvent ?workshop .
?conference a bibo:Conference .
?presentation vivo:eventWithin ?workshop .
?workshop vivo:includesEvent ?presentation .
?conference rdfs:label ?conferenceLabel
} WHERE {
{
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference .
?presentation vivo:eventWithin ?workshop .
?workshop vivo:eventWithin ?conference
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference .
?presentation vivo:eventWithin ?workshop .
?workshop vivo:eventWithin ?conference .
?conference rdfs:label ?conferenceLabel
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference .
?conference vivo:includesEvent ?workshop .
?workshop vivo:includesEvent ?presentation
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference .
?conference vivo:includesEvent ?workshop .
?workshop vivo:includesEvent ?presentation .
?conference rdfs:label ?conferenceLabel
}
}
</query-construct>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?series a vivo:EventSeries .
?presentation vivo:inEventSeries ?series .
?series vivo:seriesForEvent ?presentation .
?series rdfs:label ?seriesLabel
} WHERE {
{
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?presentation vivo:inEventSeries ?series
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?presentation vivo:inEventSeries ?series .
?series rdfs:label ?seriesLabel
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?series vivo:seriesForEvent ?presentation
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?series vivo:seriesForEvent ?presentation .
?series rdfs:label ?seriesLabel
}
}
</query-construct>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?workshop vivo:inEventSeries ?series .
?series vivo:seriesForEvent ?workshop .
?series a vivo:EventSeries .
?presentation vivo:eventWithin ?workshop .
?workshop vivo:includesEvent ?presentation .
?series rdfs:label ?seriesLabel
} WHERE {
{
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?presentation vivo:eventWithin ?workshop .
?workshop vivo:inEventSeries ?series
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?presentation vivo:eventWithin ?workshop .
?workshop vivo:inEventSeries ?series .
?series rdfs:label ?seriesLabel
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?series vivo:seriesForEvent ?workshop .
?workshop vivo:includesEvent ?presentation
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?series vivo:seriesForEvent ?workshop .
?workshop vivo:includesEvent ?presentation .
?series rdfs:label ?seriesLabel
}
}
</query-construct>
<query-construct>
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role vivo:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval vivo:start ?dateTimeStartValue .
?dateTimeStartValue vivo:dateTime ?dateTimeStart
} WHERE {
?subject ?property ?role .
?role vivo:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval vivo:start ?dateTimeStartValue .
?dateTimeStartValue vivo:dateTime ?dateTimeStart
}
</query-construct>
<template>propStatement-hasPresenterRole.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 -->
<!-- Note: ?workshop is a generic name for any intervening event between a presentation and -->
<!-- a conference, such as a workshop or session or exhibit. tlw72 -->
<list-view-config>
<query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;
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;
SELECT DISTINCT <collated>?subclass</collated>
?role ?roleLabel
?presentation ?presentationName ?presentationLabel
?conference ?conferenceLabel
?series ?seriesLabel
?workshop
?dateTime
WHERE {
?subject ?property ?role .
?role a vivo:PresenterRole
OPTIONAL { ?role rdfs:label ?roleLabel }
OPTIONAL { ?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation
LET (?presentationName := afn:localname(?presentation))
OPTIONAL { ?presentation rdfs:label ?presentationLabel }
OPTIONAL { ?conference a bibo:Conference .
OPTIONAL { ?conference rdfs:label ?conferenceLabel }
{
?presentation &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?conference
} UNION {
?conference &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?presentation
}
}
OPTIONAL {
{
?presentation &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?workshop .
?workshop &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?conference
} UNION {
?workshop &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?presentation .
?conference &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?workshop
}
OPTIONAL { ?conference rdfs:label ?conferenceLabel }
}
OPTIONAL { ?series a vivo:EventSeries .
OPTIONAL { ?series rdfs:label ?seriesLabel }
{
?presentation vivo:inEventWithin ?series
} UNION {
?series vivo:seriesForEvent ?presentation
}
}
OPTIONAL {
{
?presentation &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?workshop .
?workshop vivo:inEventSeries ?series
} UNION {
?workshop &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?presentation .
?series vivo:seriesForEvent ?workshop
}
OPTIONAL { ?series rdfs:label ?seriesLabel }
}
<collated>
?presentation vitro:mostSpecificType ?subclass .
{
?subclass rdfs:subClassOf vivo:Presentation
} UNION {
?subclass owl:equivalentClass vivo:Presentation
}
</collated>
}
OPTIONAL { ?role vivo:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval vivo:start ?dateTimeStartValue .
?dateTimeStartValue vivo:dateTime ?dateTime
}
}
<critical-data-required>
FILTER ( bound(?presentation) )
</critical-data-required>
} ORDER BY <collated>?subclass</collated> DESC(?dateTime) ?presentationLabel ?presentationName
</query-select>
<query-construct>
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;
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;
CONSTRUCT {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?presentation vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf vivo:Presentation .
?subclass owl:equivalentClass vivo:Presentation .
} WHERE {
{
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?presentation vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf vivo:Presentation
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?presentation vitro:mostSpecificType ?subclass .
?subclass owl:equivalentClass vivo:Presentation
}
}
</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 ?role .
?role a vivo:PresenterRole .
?role ?roleProperty ?roleValue .
?presentation rdfs:label ?presentationLabel
} WHERE {
{
?subject ?property ?role .
?role a vivo:PresenterRole
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role ?roleProperty ?roleValue
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?presentation rdfs:label ?presentationLabel
}
}
</query-construct>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?role a vivo:PresenterRole .
?conference a bibo:Conference .
?presentation &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?conference .
?conference &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?presentation .
?conference rdfs:label ?conferenceLabel
} WHERE {
{
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?conference a bibo:Conference .
?presentation &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?conference
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?conference a bibo:Conference .
?presentation &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?conference .
?conference rdfs:label ?conferenceLabel
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?conference a bibo:Conference .
?conference &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?presentation
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?conference a bibo:Conference .
?conference &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?presentation .
?conference rdfs:label ?conferenceLabel
}
}
</query-construct>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?role a vivo:PresenterRole .
?workshop &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?conference .
?conference &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?workshop .
?conference a bibo:Conference .
?presentation &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?workshop .
?workshop &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?presentation .
?conference rdfs:label ?conferenceLabel
} WHERE {
{
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?conference a bibo:Conference .
?presentation &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?workshop .
?workshop &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?conference
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?conference a bibo:Conference .
?presentation &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?workshop .
?workshop &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?conference .
?conference rdfs:label ?conferenceLabel
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?conference a bibo:Conference .
?conference &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?workshop .
?workshop &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?presentation
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?conference a bibo:Conference .
?conference &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?workshop .
?workshop &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?presentation .
?conference rdfs:label ?conferenceLabel
}
}
</query-construct>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?role a vivo:PresenterRole .
?series a vivo:EventSeries .
?presentation vivo:inEventSeries ?series .
?series vivo:seriesForEvent ?presentation .
?series rdfs:label ?seriesLabel
} WHERE {
{
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?series a vivo:EventSeries .
?presentation vivo:inEventSeries ?series
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?series a vivo:EventSeries .
?presentation vivo:inEventSeries ?series .
?series rdfs:label ?seriesLabel
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?series a vivo:EventSeries .
?series vivo:seriesForEvent ?presentation
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?series a vivo:EventSeries .
?series vivo:seriesForEvent ?presentation .
?series rdfs:label ?seriesLabel
}
}
</query-construct>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?role a vivo:PresenterRole .
?workshop vivo:inEventSeries ?series .
?series vivo:seriesForEvent ?workshop .
?series a vivo:EventSeries .
?presentation &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?workshop .
?workshop &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?presentation .
?series rdfs:label ?seriesLabel
} WHERE {
{
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?series a vivo:EventSeries .
?presentation &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?workshop .
?workshop vivo:inEventSeries ?series
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?series a vivo:EventSeries .
?presentation &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?workshop .
?workshop vivo:inEventSeries ?series .
?series rdfs:label ?seriesLabel
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?series a vivo:EventSeries .
?series vivo:seriesForEvent ?workshop .
?workshop &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?presentation
} UNION {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?presentation .
?series a vivo:EventSeries .
?series vivo:seriesForEvent ?workshop .
?workshop &lt;http://purl.obolibrary.org/obo/BFO_0000051&gt; ?presentation .
?series rdfs:label ?seriesLabel
}
}
</query-construct>
<query-construct>
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role vivo:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval vivo:start ?dateTimeStartValue .
?dateTimeStartValue vivo:dateTime ?dateTimeStart
} WHERE {
?subject ?property ?role .
?role a vivo:PresenterRole .
?role vivo:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval vivo:start ?dateTimeStartValue .
?dateTimeStartValue vivo:dateTime ?dateTimeStart
}
</query-construct>
<template>propStatement-hasPresenterRole.ftl</template>
</list-view-config>

View file

@ -1,149 +1,150 @@
<?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 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 vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
SELECT DISTINCT <collated>?subclass</collated>
# send the property to the template, since this view supports multiple role properties
?property
?role
?roleLabel
?activity ?activityName
?activityLabel
?dateTimeStart ?dateTimeEnd
?hideThis
WHERE {
?subject ?property ?role .
?role a ?objectType
OPTIONAL { ?role core:roleRealizedIn ?activity
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
<collated>
?activity vitro:mostSpecificType ?subclass
</collated>
}
OPTIONAL { ?role core:roleContributesTo ?activity
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
<collated>
?activity vitro:mostSpecificType ?subclass
</collated>
}
OPTIONAL { ?role rdfs:label ?roleLabel }
OPTIONAL { ?role core:hideFromDisplay ?hideThis }
OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
}
# NOT EXISTS { ?role core:hideFromDisplay ?hideThis }
<critical-data-required>
FILTER ( bound(?activity) )
</critical-data-required>
} ORDER BY <collated>?subclass</collated> DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName
</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 vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:roleContributesTo ?activity .
?activity vitro:mostSpecificType ?subclass .
} WHERE {
?subject ?property ?role .
?role core:roleContributesTo ?activity .
?activity vitro:mostSpecificType ?subclass
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
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;
CONSTRUCT {
?subject ?property ?role .
?role core:roleRealizedIn ?activity .
?activity vitro:mostSpecificType ?subclass .
} WHERE {
?subject ?property ?role .
?role core:roleRealizedIn ?activity .
?activity vitro:mostSpecificType ?subclass
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?role ?roleProperty ?roleValue .
?activity rdfs:label ?activityName
} WHERE {
{
?subject ?property ?role
} UNION {
?subject ?property ?role .
?role ?roleProperty ?roleValue
} UNION {
?subject ?property ?role .
?role core:roleContributesTo ?activity .
?activity rdfs:label ?activityName
} UNION {
?subject ?property ?role .
?role core:roleRealizedIn ?activity .
?activity rdfs:label ?activityName
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
} WHERE {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
} WHERE {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
</query-construct>
<template>propStatement-hasRole.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 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 vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
SELECT DISTINCT <collated>?subclass</collated>
# send the property to the template, since this view supports multiple role properties
?property
?role
?roleLabel
?activity ?activityName
?activityLabel
?dateTimeStart ?dateTimeEnd
?hideThis
?objectType
WHERE {
?subject ?property ?role .
?role a ?objectType
OPTIONAL { ?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?activity
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
<collated>
?activity vitro:mostSpecificType ?subclass
</collated>
}
OPTIONAL { ?role core:relatedBy ?activity
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
<collated>
?activity vitro:mostSpecificType ?subclass
</collated>
}
OPTIONAL { ?role rdfs:label ?roleLabel }
OPTIONAL { ?role core:hideFromDisplay ?hideThis }
OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
}
# NOT EXISTS { ?role core:hideFromDisplay ?hideThis }
<critical-data-required>
FILTER ( bound(?activity) )
</critical-data-required>
} ORDER BY <collated>?subclass</collated> DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName
</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 vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:relatedBy ?activity .
?activity vitro:mostSpecificType ?subclass .
} WHERE {
?subject ?property ?role .
?role core:relatedBy ?activity .
?activity vitro:mostSpecificType ?subclass
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
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;
CONSTRUCT {
?subject ?property ?role .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?activity .
?activity vitro:mostSpecificType ?subclass .
} WHERE {
?subject ?property ?role .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?activity .
?activity vitro:mostSpecificType ?subclass
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?role ?roleProperty ?roleValue .
?activity rdfs:label ?activityName
} WHERE {
{
?subject ?property ?role
} UNION {
?subject ?property ?role .
?role ?roleProperty ?roleValue
} UNION {
?subject ?property ?role .
?role core:relatedBy ?activity .
?activity rdfs:label ?activityName
} UNION {
?subject ?property ?role .
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?activity .
?activity rdfs:label ?activityName
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
} WHERE {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
} WHERE {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
</query-construct>
<template>propStatement-hasRole.ftl</template>
</list-view-config>

View file

@ -1,72 +1,73 @@
<?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 core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
SELECT DISTINCT <collated> ?subclass </collated>
?authorship
?person ?personName WHERE {
?subject ?property ?authorship
OPTIONAL { ?authorship core:authorRank ?rank }
OPTIONAL { ?authorship core:linkedAuthor ?person .
?person rdfs:label ?personName
<collated>
OPTIONAL { ?person vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf foaf:Person
}
</collated>
}
<critical-data-required>
FILTER ( bound(?person) )
</critical-data-required>
} ORDER BY <collated> ?subclass </collated> ?rank ?personName
</query-select>
<query-construct>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
CONSTRUCT {
?subclass rdfs:subClassOf foaf:Person
} WHERE {
?subclass rdfs:subClassOf foaf:Person
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
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;
CONSTRUCT {
?subject ?property ?authorship .
?authorship ?authorshipProperty ?authorshipValue .
?person rdfs:label ?personName .
?person vitro:mostSpecificType ?subclass
} WHERE {
{
?subject ?property ?authorship
} UNION {
?subject ?property ?authorship .
?authorship ?authorshipProperty ?authorshipValue
} UNION {
?subject ?property ?authorship .
?authorship core:linkedAuthor ?person .
?person rdfs:label ?personName
} UNION {
?subject ?property ?authorship .
?authorship core:linkedAuthor ?person .
?person rdfs:label ?personName .
?person vitro:mostSpecificType ?subclass
}
}
</query-construct>
<template>propStatement-informationResourceInAuthorship.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 rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
SELECT DISTINCT <collated> ?subclass </collated>
?authorship
?person ?personName WHERE {
?subject ?property ?authorship .
?subject a core:Authorship
OPTIONAL { ?authorship core:authorRank ?rank }
OPTIONAL { ?authorship core:relates ?person .
?person rdfs:label ?personName
<collated>
OPTIONAL { ?person vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf foaf:Person
}
</collated>
}
<critical-data-required>
FILTER ( bound(?person) )
</critical-data-required>
} ORDER BY <collated> ?subclass </collated> ?rank ?personName
</query-select>
<query-construct>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
CONSTRUCT {
?subclass rdfs:subClassOf foaf:Person
} WHERE {
?subclass rdfs:subClassOf foaf:Person
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
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;
CONSTRUCT {
?subject ?property ?authorship .
?authorship ?authorshipProperty ?authorshipValue .
?person rdfs:label ?personName .
?person vitro:mostSpecificType ?subclass
} WHERE {
{
?subject ?property ?authorship
} UNION {
?subject ?property ?authorship .
?authorship ?authorshipProperty ?authorshipValue
} UNION {
?subject ?property ?authorship .
?authorship core:relates ?person .
?person rdfs:label ?personName
} UNION {
?subject ?property ?authorship .
?authorship core:relates ?person .
?person rdfs:label ?personName .
?person vitro:mostSpecificType ?subclass
}
}
</query-construct>
<template>propStatement-informationResourceInAuthorship.ftl</template>
</list-view-config>

View file

@ -15,9 +15,9 @@
<#local linkedIndividual>
<#if statement.award??>
<a href="${profileUrl(statement.uri("award"))}" title="${i18n().award_name}">${statement.awardLabel!statement.localName}</a>
<a href="${profileUrl(statement.uri("award"))}" title="${i18n().award_name}">${statement.awardLabel!statement.localName!}</a>
<#else>
<a href="${profileUrl(statement.uri("awardReceipt"))}" title="${i18n().award_receipt_name}">${statement.receiptLabel!statement.localName}</a>
<a href="${profileUrl(statement.uri("awardReceipt"))}" title="${i18n().award_receipt_name}">${statement.receiptLabel!statement.localName!}</a>
</#if>
</#local>

View file

@ -47,6 +47,6 @@
</#if>
</#local>
${linkedIndividual} ${awardOrAdminBy} ${dateTime!} ${statement.subclass!}
${linkedIndividual} ${awardOrAdminBy} ${dateTime!}
</#if>
</#macro>

View file

@ -101,8 +101,8 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator
private String getN3NewAuthorship() {
return getN3PrefixString() +
"?authorshipUri a core:Authorship ;\n" +
" core:linkedInformationResource ?infoResource .\n" +
"?infoResource core:informationResourceInAuthorship ?authorshipUri .";
" core:relates ?infoResource .\n" +
"?infoResource core:relatedBy ?authorshipUri .";
}
private String getN3AuthorshipRank() {

View file

@ -1,311 +1,311 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
import java.util.Arrays;
import javax.servlet.http.HttpSession;
import com.hp.hpl.jena.vocabulary.XSD;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.AutocompleteRequiredInputValidator;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeIntervalValidationVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesWithParent;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.IndividualsViaVClassOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation;
public class AddPresenterRoleToPersonGenerator extends VivoBaseGenerator implements
EditConfigurationGenerator {
final static String presentationClass = vivoCore + "Presentation";
final static String roleClass = vivoCore + "PresenterRole";
final static String conferenceClass = bibo + "Conference";
final static String hasRolePred = vivoCore + "hasPresenterRole";
final static String roleOfPred = vivoCore + "presenterRoleOf";
final static String roleRealizedInPred = vivoCore + "roleRealizedIn";
final static String realizedRolePred = vivoCore + "realizedRole";
final static String includesEventPred = vivoCore + "includesEvent";
final static String eventWithinPred = vivoCore + "eventWithin";
final static String roleToInterval = vivoCore + "dateTimeInterval";
final static String intervalType = vivoCore + "DateTimeInterval";
final static String intervalToStart = vivoCore + "start";
final static String intervalToEnd = vivoCore + "end";
final static String dateTimeValueType = vivoCore + "DateTimeValue";
final static String dateTimeValue = vivoCore + "dateTime";
final static String dateTimePrecision = vivoCore + "dateTimePrecision";
public AddPresenterRoleToPersonGenerator() {}
@Override
public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq,
HttpSession session) throws Exception {
EditConfigurationVTwo conf = new EditConfigurationVTwo();
initBasics(conf, vreq);
initPropertyParameters(vreq, session, conf);
initObjectPropForm(conf, vreq);
conf.setTemplate("addPresenterRoleToPerson.ftl");
conf.setVarNameForSubject("person");
conf.setVarNameForPredicate("predicate");
conf.setVarNameForObject("role");
conf.setN3Required( Arrays.asList( n3ForNewRole,
roleLabelAssertion) );
conf.setN3Optional( Arrays.asList( n3ForNewPresentation,
n3ForExistingPresentation,
n3ForNewConferenceNewPres,
n3ForNewConferenceExistingPres,
n3ForExistingConferenceNewPres,
n3ForExistingConferenceExistingPres,
n3ForStart,
n3ForEnd ) );
conf.addNewResource("presentation", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("newConference", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("role", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("intervalNode", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("startNode", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("endNode", DEFAULT_NS_FOR_NEW_RESOURCE);
//uris in scope: none
//literals in scope: none
conf.setUrisOnform(Arrays.asList("existingPresentation", "existingConference", "presentationType"));
conf.setLiteralsOnForm(Arrays.asList("presentationLabel", "presentationLabelDisplay", "conferenceLabel", "conferenceLabelDisplay", "roleLabel"));
conf.addSparqlForExistingLiteral("presentationLabel", presentationLabelQuery);
conf.addSparqlForExistingLiteral("conferenceLabel", conferenceLabelQuery);
conf.addSparqlForExistingLiteral("roleLabel", roleLabelQuery);
conf.addSparqlForExistingUris("existingPresentation", presentationQuery);
conf.addSparqlForExistingUris("existingConference", existingConferenceQuery);
conf.addSparqlForExistingUris("presentationType", presentationTypeQuery);
conf.addSparqlForExistingLiteral(
"startField-value", existingStartDateQuery);
conf.addSparqlForExistingLiteral(
"endField-value", existingEndDateQuery);
conf.addSparqlForExistingUris(
"intervalNode", existingIntervalNodeQuery);
conf.addSparqlForExistingUris("startNode", existingStartNodeQuery);
conf.addSparqlForExistingUris("endNode", existingEndNodeQuery);
conf.addSparqlForExistingUris("startField-precision",
existingStartPrecisionQuery);
conf.addSparqlForExistingUris("endField-precision",
existingEndPrecisionQuery);
conf.addField( new FieldVTwo(). // an autocomplete field
setName("existingPresentation")
);
conf.addField( new FieldVTwo().
setName("presentationLabelDisplay")
.setRangeDatatypeUri( XSD.xstring.toString() ).
setValidators( list("datatype:" + XSD.xstring.toString()) )
);
conf.addField( new FieldVTwo().
setName("presentationLabel")
.setRangeDatatypeUri( XSD.xstring.toString() ).
setValidators( list("datatype:" + XSD.xstring.toString()) )
);
conf.addField( new FieldVTwo().
setName("presentationType").
setValidators( list("nonempty") ).
setOptions( new ChildVClassesWithParent(
presentationClass))
);
conf.addField( new FieldVTwo().
setName("roleLabel")
.setRangeDatatypeUri( XSD.xstring.toString() ).
setValidators( list("nonempty") )
);
conf.addField( new FieldVTwo(). // an autocomplete field
setName("existingConference")
);
conf.addField( new FieldVTwo().
setName("conferenceLabel").
setRangeDatatypeUri(XSD.xstring.toString() )
);
conf.addField( new FieldVTwo().
setName("conferenceLabelDisplay").
setRangeDatatypeUri(XSD.xstring.toString() )
);
conf.addField( new FieldVTwo().setName("startField").
setEditElement(
new DateTimeWithPrecisionVTwo(null,
VitroVocabulary.Precision.YEAR.uri(),
VitroVocabulary.Precision.NONE.uri())
)
);
conf.addField( new FieldVTwo().setName("endField").
setEditElement(
new DateTimeWithPrecisionVTwo(null,
VitroVocabulary.Precision.YEAR.uri(),
VitroVocabulary.Precision.NONE.uri())
)
);
conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField"));
conf.addValidator(new AntiXssValidation());
conf.addValidator(new AutocompleteRequiredInputValidator("existingPresentation", "presentationLabel"));
prepare(vreq, conf);
return conf;
}
/* N3 assertions */
final static String n3ForNewRole =
"@prefix core: <" + vivoCore + "> . \n\n" +
"?person <" + hasRolePred + "> ?role . \n" +
"?role a <" + roleClass + "> . \n" +
"?role <" + roleOfPred + "> ?person . ";
final static String roleLabelAssertion =
"?role <" + label + "> ?roleLabel .";
final static String n3ForNewPresentation =
"?role <" + roleRealizedInPred + "> ?presentation . \n" +
"?presentation <" + realizedRolePred + "> ?role . \n" +
"?presentation <" + label + "> ?presentationLabel . \n" +
"?presentation a ?presentationType .";
final static String n3ForExistingPresentation =
"?role <" + roleRealizedInPred + "> ?existingPresentation . \n" +
"?existingPresentation <" + realizedRolePred + "> ?role . \n" +
"?existingPresentation a ?presentationType .";
final static String n3ForNewConferenceNewPres =
"?presentation <" + eventWithinPred + "> ?newConference . \n" +
"?newConference <" + includesEventPred + "> ?presentation . \n" +
"?newConference a <" + conferenceClass + "> . \n" +
"?newConference <" + label + "> ?conferenceLabel .";
final static String n3ForNewConferenceExistingPres =
"?existingPresentation <" + eventWithinPred + "> ?newConference . \n" +
"?newConference <" + includesEventPred + "> ?existingPresentation . \n" +
"?newConference a <" + conferenceClass + "> . \n" +
"?newConference <" + label + "> ?conferenceLabel .";
final static String n3ForExistingConferenceNewPres =
"?existingConference <" + includesEventPred + "> ?presentation . \n" +
"?presentation <" + eventWithinPred + "> ?existingConference . \n" +
"?presentation <" + label + "> ?presentationLabel . ";
final static String n3ForExistingConferenceExistingPres =
"?existingConference <" + includesEventPred + "> ?existingPresentation . \n" +
"?existingPresentation <" + eventWithinPred + "> ?existingConference . ";
final static String n3ForStart =
"?role <" + roleToInterval + "> ?intervalNode . \n" +
"?intervalNode a <" + intervalType + "> . \n" +
"?intervalNode <" + intervalToStart + "> ?startNode . \n" +
"?startNode a <" + dateTimeValueType + "> . \n" +
"?startNode <" + dateTimeValue + "> ?startField-value . \n" +
"?startNode <" + dateTimePrecision + "> ?startField-precision . \n";
final static String n3ForEnd =
"?role <" + roleToInterval + "> ?intervalNode . \n" +
"?intervalNode a <" + intervalType + "> . \n" +
"?intervalNode <" + intervalToEnd + "> ?endNode . \n" +
"?endNode a <" + dateTimeValueType + "> . \n" +
"?endNode <" + dateTimeValue + "> ?endField-value . \n" +
"?endNode <" + dateTimePrecision + "> ?endField-precision . \n";
/* Queries for editing an existing entry */
final static String roleLabelQuery =
"SELECT ?existingRoleLabel WHERE { \n" +
"?role <" + label + "> ?existingRoleLabel . }";
final static String presentationQuery =
"SELECT ?existingPresentation WHERE { \n" +
"?role <" + roleRealizedInPred + "> ?existingPresentation . }";
final static String presentationLabelQuery =
"SELECT ?existingPresentationLabel WHERE { \n" +
"?role <" + roleRealizedInPred + "> ?existingPresentation . " +
"?existingPresentation <" + label + "> ?existingPresentationLabel . }";
final static String presentationTypeQuery =
"PREFIX vitro: <" + VitroVocabulary.vitroURI + "> \n" +
"SELECT ?existingPresentationType WHERE { \n" +
"?role <" + roleRealizedInPred + "> ?existingPresentation . " +
"?existingPresentation vitro:mostSpecificType ?existingPresentationType . }";
final static String existingConferenceQuery =
"SELECT ?existingConference WHERE { \n" +
"?role <" + roleRealizedInPred + "> ?existingPresentation . " +
"?existingPresentation <" + eventWithinPred + "> ?existingConference . }";
final static String conferenceLabelQuery =
"SELECT ?existingConferenceLabel WHERE { \n" +
"?role <" + roleRealizedInPred + "> ?existingPresentation . " +
"?existingPresentation <" + eventWithinPred + "> ?existingConference . \n" +
"?existingConference <" + label + "> ?existingConferenceLabel . }";
final static String existingStartDateQuery =
"SELECT ?existingDateStart WHERE { \n" +
" ?role <" + roleToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToStart + "> ?startNode . \n" +
" ?startNode a <" + dateTimeValueType +"> . \n" +
" ?startNode <" + dateTimeValue + "> ?existingDateStart . }";
final static String existingEndDateQuery =
"SELECT ?existingEndDate WHERE { \n" +
" ?role <" + roleToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n " +
" ?intervalNode <" + intervalToEnd + "> ?endNode . \n" +
" ?endNode a <" + dateTimeValueType + "> . \n" +
" ?endNode <" + dateTimeValue + "> ?existingEndDate . }";
final static String existingIntervalNodeQuery =
"SELECT ?existingIntervalNode WHERE { \n" +
" ?role <" + roleToInterval + "> ?existingIntervalNode . \n" +
" ?existingIntervalNode a <" + intervalType + "> . }";
final static String existingStartNodeQuery =
"SELECT ?existingStartNode WHERE { \n" +
" ?role <" + roleToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToStart + "> ?existingStartNode . \n" +
" ?existingStartNode a <" + dateTimeValueType + "> . } ";
final static String existingEndNodeQuery =
"SELECT ?existingEndNode WHERE { \n" +
" ?role <" + roleToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToEnd + "> ?existingEndNode . \n" +
" ?existingEndNode a <" + dateTimeValueType + "> .} ";
final static String existingStartPrecisionQuery =
"SELECT ?existingStartPrecision WHERE { \n" +
" ?role <" + roleToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToStart + "> ?startNode . \n" +
" ?startNode a <" + dateTimeValueType + "> . \n" +
" ?startNode <" + dateTimePrecision + "> ?existingStartPrecision . }";
final static String existingEndPrecisionQuery =
"SELECT ?existingEndPrecision WHERE { \n" +
" ?role <" + roleToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToEnd + "> ?endNode . \n" +
" ?endNode a <" + dateTimeValueType + "> . \n" +
" ?endNode <" + dateTimePrecision + "> ?existingEndPrecision . }";
}
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
import java.util.Arrays;
import javax.servlet.http.HttpSession;
import com.hp.hpl.jena.vocabulary.XSD;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.AutocompleteRequiredInputValidator;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeIntervalValidationVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesWithParent;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.IndividualsViaVClassOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation;
public class AddPresenterRoleToPersonGenerator extends VivoBaseGenerator implements
EditConfigurationGenerator {
final static String presentationClass = vivoCore + "Presentation";
final static String roleClass = vivoCore + "PresenterRole";
final static String conferenceClass = bibo + "Conference";
final static String hasRolePred = "http://purl.obolibrary.org/obo/RO_0000053";
final static String roleOfPred = "http://purl.obolibrary.org/obo/RO_0000052";
final static String roleRealizedInPred = "http://purl.obolibrary.org/obo/BFO_0000054";
final static String realizedRolePred = "http://purl.obolibrary.org/obo/BFO_0000055";
final static String includesEventPred = "http://purl.obolibrary.org/obo/BFO_0000051";
final static String eventWithinPred = "http://purl.obolibrary.org/obo/BFO_0000050";
final static String roleToInterval = vivoCore + "dateTimeInterval";
final static String intervalType = vivoCore + "DateTimeInterval";
final static String intervalToStart = vivoCore + "start";
final static String intervalToEnd = vivoCore + "end";
final static String dateTimeValueType = vivoCore + "DateTimeValue";
final static String dateTimeValue = vivoCore + "dateTime";
final static String dateTimePrecision = vivoCore + "dateTimePrecision";
public AddPresenterRoleToPersonGenerator() {}
@Override
public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq,
HttpSession session) throws Exception {
EditConfigurationVTwo conf = new EditConfigurationVTwo();
initBasics(conf, vreq);
initPropertyParameters(vreq, session, conf);
initObjectPropForm(conf, vreq);
conf.setTemplate("addPresenterRoleToPerson.ftl");
conf.setVarNameForSubject("person");
conf.setVarNameForPredicate("predicate");
conf.setVarNameForObject("role");
conf.setN3Required( Arrays.asList( n3ForNewRole,
roleLabelAssertion) );
conf.setN3Optional( Arrays.asList( n3ForNewPresentation,
n3ForExistingPresentation,
n3ForNewConferenceNewPres,
n3ForNewConferenceExistingPres,
n3ForExistingConferenceNewPres,
n3ForExistingConferenceExistingPres,
n3ForStart,
n3ForEnd ) );
conf.addNewResource("presentation", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("newConference", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("role", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("intervalNode", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("startNode", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("endNode", DEFAULT_NS_FOR_NEW_RESOURCE);
//uris in scope: none
//literals in scope: none
conf.setUrisOnform(Arrays.asList("existingPresentation", "existingConference", "presentationType"));
conf.setLiteralsOnForm(Arrays.asList("presentationLabel", "presentationLabelDisplay", "conferenceLabel", "conferenceLabelDisplay", "roleLabel"));
conf.addSparqlForExistingLiteral("presentationLabel", presentationLabelQuery);
conf.addSparqlForExistingLiteral("conferenceLabel", conferenceLabelQuery);
conf.addSparqlForExistingLiteral("roleLabel", roleLabelQuery);
conf.addSparqlForExistingUris("existingPresentation", presentationQuery);
conf.addSparqlForExistingUris("existingConference", existingConferenceQuery);
conf.addSparqlForExistingUris("presentationType", presentationTypeQuery);
conf.addSparqlForExistingLiteral(
"startField-value", existingStartDateQuery);
conf.addSparqlForExistingLiteral(
"endField-value", existingEndDateQuery);
conf.addSparqlForExistingUris(
"intervalNode", existingIntervalNodeQuery);
conf.addSparqlForExistingUris("startNode", existingStartNodeQuery);
conf.addSparqlForExistingUris("endNode", existingEndNodeQuery);
conf.addSparqlForExistingUris("startField-precision",
existingStartPrecisionQuery);
conf.addSparqlForExistingUris("endField-precision",
existingEndPrecisionQuery);
conf.addField( new FieldVTwo(). // an autocomplete field
setName("existingPresentation")
);
conf.addField( new FieldVTwo().
setName("presentationLabelDisplay")
.setRangeDatatypeUri( XSD.xstring.toString() ).
setValidators( list("datatype:" + XSD.xstring.toString()) )
);
conf.addField( new FieldVTwo().
setName("presentationLabel")
.setRangeDatatypeUri( XSD.xstring.toString() ).
setValidators( list("datatype:" + XSD.xstring.toString()) )
);
conf.addField( new FieldVTwo().
setName("presentationType").
setValidators( list("nonempty") ).
setOptions( new ChildVClassesWithParent(
presentationClass))
);
conf.addField( new FieldVTwo().
setName("roleLabel")
.setRangeDatatypeUri( XSD.xstring.toString() ).
setValidators( list("nonempty") )
);
conf.addField( new FieldVTwo(). // an autocomplete field
setName("existingConference")
);
conf.addField( new FieldVTwo().
setName("conferenceLabel").
setRangeDatatypeUri(XSD.xstring.toString() )
);
conf.addField( new FieldVTwo().
setName("conferenceLabelDisplay").
setRangeDatatypeUri(XSD.xstring.toString() )
);
conf.addField( new FieldVTwo().setName("startField").
setEditElement(
new DateTimeWithPrecisionVTwo(null,
VitroVocabulary.Precision.YEAR.uri(),
VitroVocabulary.Precision.NONE.uri())
)
);
conf.addField( new FieldVTwo().setName("endField").
setEditElement(
new DateTimeWithPrecisionVTwo(null,
VitroVocabulary.Precision.YEAR.uri(),
VitroVocabulary.Precision.NONE.uri())
)
);
conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField"));
conf.addValidator(new AntiXssValidation());
conf.addValidator(new AutocompleteRequiredInputValidator("existingPresentation", "presentationLabel"));
prepare(vreq, conf);
return conf;
}
/* N3 assertions */
final static String n3ForNewRole =
"@prefix core: <" + vivoCore + "> . \n\n" +
"?person <" + hasRolePred + "> ?role . \n" +
"?role a <" + roleClass + "> . \n" +
"?role <" + roleOfPred + "> ?person . ";
final static String roleLabelAssertion =
"?role <" + label + "> ?roleLabel .";
final static String n3ForNewPresentation =
"?role <" + roleRealizedInPred + "> ?presentation . \n" +
"?presentation <" + realizedRolePred + "> ?role . \n" +
"?presentation <" + label + "> ?presentationLabel . \n" +
"?presentation a ?presentationType .";
final static String n3ForExistingPresentation =
"?role <" + roleRealizedInPred + "> ?existingPresentation . \n" +
"?existingPresentation <" + realizedRolePred + "> ?role . \n" +
"?existingPresentation a ?presentationType .";
final static String n3ForNewConferenceNewPres =
"?presentation <" + eventWithinPred + "> ?newConference . \n" +
"?newConference <" + includesEventPred + "> ?presentation . \n" +
"?newConference a <" + conferenceClass + "> . \n" +
"?newConference <" + label + "> ?conferenceLabel .";
final static String n3ForNewConferenceExistingPres =
"?existingPresentation <" + eventWithinPred + "> ?newConference . \n" +
"?newConference <" + includesEventPred + "> ?existingPresentation . \n" +
"?newConference a <" + conferenceClass + "> . \n" +
"?newConference <" + label + "> ?conferenceLabel .";
final static String n3ForExistingConferenceNewPres =
"?existingConference <" + includesEventPred + "> ?presentation . \n" +
"?presentation <" + eventWithinPred + "> ?existingConference . \n" +
"?presentation <" + label + "> ?presentationLabel . ";
final static String n3ForExistingConferenceExistingPres =
"?existingConference <" + includesEventPred + "> ?existingPresentation . \n" +
"?existingPresentation <" + eventWithinPred + "> ?existingConference . ";
final static String n3ForStart =
"?role <" + roleToInterval + "> ?intervalNode . \n" +
"?intervalNode a <" + intervalType + "> . \n" +
"?intervalNode <" + intervalToStart + "> ?startNode . \n" +
"?startNode a <" + dateTimeValueType + "> . \n" +
"?startNode <" + dateTimeValue + "> ?startField-value . \n" +
"?startNode <" + dateTimePrecision + "> ?startField-precision . \n";
final static String n3ForEnd =
"?role <" + roleToInterval + "> ?intervalNode . \n" +
"?intervalNode a <" + intervalType + "> . \n" +
"?intervalNode <" + intervalToEnd + "> ?endNode . \n" +
"?endNode a <" + dateTimeValueType + "> . \n" +
"?endNode <" + dateTimeValue + "> ?endField-value . \n" +
"?endNode <" + dateTimePrecision + "> ?endField-precision . \n";
/* Queries for editing an existing entry */
final static String roleLabelQuery =
"SELECT ?existingRoleLabel WHERE { \n" +
"?role <" + label + "> ?existingRoleLabel . }";
final static String presentationQuery =
"SELECT ?existingPresentation WHERE { \n" +
"?role <" + roleRealizedInPred + "> ?existingPresentation . }";
final static String presentationLabelQuery =
"SELECT ?existingPresentationLabel WHERE { \n" +
"?role <" + roleRealizedInPred + "> ?existingPresentation . " +
"?existingPresentation <" + label + "> ?existingPresentationLabel . }";
final static String presentationTypeQuery =
"PREFIX vitro: <" + VitroVocabulary.vitroURI + "> \n" +
"SELECT ?existingPresentationType WHERE { \n" +
"?role <" + roleRealizedInPred + "> ?existingPresentation . " +
"?existingPresentation vitro:mostSpecificType ?existingPresentationType . }";
final static String existingConferenceQuery =
"SELECT ?existingConference WHERE { \n" +
"?role <" + roleRealizedInPred + "> ?existingPresentation . " +
"?existingPresentation <" + eventWithinPred + "> ?existingConference . }";
final static String conferenceLabelQuery =
"SELECT ?existingConferenceLabel WHERE { \n" +
"?role <" + roleRealizedInPred + "> ?existingPresentation . " +
"?existingPresentation <" + eventWithinPred + "> ?existingConference . \n" +
"?existingConference <" + label + "> ?existingConferenceLabel . }";
final static String existingStartDateQuery =
"SELECT ?existingDateStart WHERE { \n" +
" ?role <" + roleToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToStart + "> ?startNode . \n" +
" ?startNode a <" + dateTimeValueType +"> . \n" +
" ?startNode <" + dateTimeValue + "> ?existingDateStart . }";
final static String existingEndDateQuery =
"SELECT ?existingEndDate WHERE { \n" +
" ?role <" + roleToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n " +
" ?intervalNode <" + intervalToEnd + "> ?endNode . \n" +
" ?endNode a <" + dateTimeValueType + "> . \n" +
" ?endNode <" + dateTimeValue + "> ?existingEndDate . }";
final static String existingIntervalNodeQuery =
"SELECT ?existingIntervalNode WHERE { \n" +
" ?role <" + roleToInterval + "> ?existingIntervalNode . \n" +
" ?existingIntervalNode a <" + intervalType + "> . }";
final static String existingStartNodeQuery =
"SELECT ?existingStartNode WHERE { \n" +
" ?role <" + roleToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToStart + "> ?existingStartNode . \n" +
" ?existingStartNode a <" + dateTimeValueType + "> . } ";
final static String existingEndNodeQuery =
"SELECT ?existingEndNode WHERE { \n" +
" ?role <" + roleToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToEnd + "> ?existingEndNode . \n" +
" ?existingEndNode a <" + dateTimeValueType + "> .} ";
final static String existingStartPrecisionQuery =
"SELECT ?existingStartPrecision WHERE { \n" +
" ?role <" + roleToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToStart + "> ?startNode . \n" +
" ?startNode a <" + dateTimeValueType + "> . \n" +
" ?startNode <" + dateTimePrecision + "> ?existingStartPrecision . }";
final static String existingEndPrecisionQuery =
"SELECT ?existingEndPrecision WHERE { \n" +
" ?role <" + roleToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToEnd + "> ?endNode . \n" +
" ?endNode a <" + dateTimeValueType + "> . \n" +
" ?endNode <" + dateTimePrecision + "> ?existingEndPrecision . }";
}