Merge branch 'develop' of https://github.com/vivo-project/VIVO into develop
This commit is contained in:
commit
0610b794e2
23 changed files with 268 additions and 360 deletions
|
@ -13,25 +13,25 @@
|
|||
|
||||
SELECT DISTINCT <collated> ?subclass </collated>
|
||||
?authorship
|
||||
?person ?personName
|
||||
?author ?authorName
|
||||
WHERE {
|
||||
?subject ?property ?authorship .
|
||||
OPTIONAL { ?authorship core:rank ?rank }
|
||||
OPTIONAL { ?authorship core:relates ?person .
|
||||
?person a foaf:Person .
|
||||
?person rdfs:label ?personName
|
||||
OPTIONAL { ?authorship core:relates ?author .
|
||||
?author a foaf:Agent .
|
||||
?author rdfs:label ?authorName
|
||||
<collated>
|
||||
OPTIONAL { ?authorship core:relates ?person .
|
||||
?person a foaf:Person .
|
||||
?person vitro:mostSpecificType ?subclass .
|
||||
?subclass rdfs:subClassOf foaf:Person
|
||||
OPTIONAL { ?authorship core:relates ?author .
|
||||
?author a foaf:Agent .
|
||||
?author vitro:mostSpecificType ?subclass .
|
||||
?subclass rdfs:subClassOf foaf:Agent
|
||||
}
|
||||
</collated>
|
||||
}
|
||||
<critical-data-required>
|
||||
FILTER ( bound(?person) )
|
||||
FILTER ( bound(?author) )
|
||||
</critical-data-required>
|
||||
} ORDER BY <collated> ?subclass </collated> ?rank ?personName
|
||||
} ORDER BY <collated> ?subclass </collated> ?rank ?authorName
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
|
@ -43,11 +43,11 @@
|
|||
?subject ?property ?authorship .
|
||||
?authorship a core:Authorship .
|
||||
?authorship ?authorshipProperty ?authorshipValue .
|
||||
?authorship core:relates ?person .
|
||||
?person a foaf:Person .
|
||||
?person rdfs:label ?personName .
|
||||
?person vitro:mostSpecificType ?subclass .
|
||||
?subclass rdfs:subClassOf foaf:Person
|
||||
?authorship core:relates ?author .
|
||||
?author a foaf:Agent .
|
||||
?author rdfs:label ?authorName .
|
||||
?author vitro:mostSpecificType ?subclass .
|
||||
?subclass rdfs:subClassOf foaf:Agent
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?authorship .
|
||||
|
@ -59,17 +59,17 @@
|
|||
} UNION {
|
||||
?subject ?property ?authorship .
|
||||
?authorship a core:Authorship .
|
||||
?authorship core:relates ?person .
|
||||
?person a foaf:Person .
|
||||
?person rdfs:label ?personName
|
||||
?authorship core:relates ?author .
|
||||
?author a foaf:Agent .
|
||||
?author rdfs:label ?authorName
|
||||
} UNION {
|
||||
?subject ?property ?authorship .
|
||||
?authorship a core:Authorship .
|
||||
?authorship core:relates ?person .
|
||||
?person a foaf:Person .
|
||||
?person rdfs:label ?personName .
|
||||
?person vitro:mostSpecificType ?subclass .
|
||||
?subclass rdfs:subClassOf foaf:Person
|
||||
?authorship core:relates ?author .
|
||||
?author a foaf:Agent .
|
||||
?author rdfs:label ?authorName .
|
||||
?author vitro:mostSpecificType ?subclass .
|
||||
?subclass rdfs:subClassOf foaf:Agent
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
|
|
@ -164,34 +164,34 @@
|
|||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
|
||||
CONSTRUCT {
|
||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart .
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?edTraining .
|
||||
?leaderRole core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
||||
} WHERE {
|
||||
?subject ?property ?edTraining .
|
||||
?edTraining a core:EducationalProcess .
|
||||
?edTraining core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart .
|
||||
}
|
||||
?leaderRole core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
|
||||
CONSTRUCT {
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?edTraining .
|
||||
?leaderRole core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeEnd
|
||||
} WHERE {
|
||||
?subject ?property ?edTraining .
|
||||
?edTraining a core:EducationalProcess .
|
||||
?edTraining core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||
?leaderRole core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeEnd
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
</#if>
|
||||
<#list title.statements as statement>
|
||||
<span class="display-title<#if editable>-editable</#if>">${statement.preferredTitle}</span>
|
||||
<@p.editingLinks "${title.localName}" "${title.name}" statement editable />
|
||||
<@p.editingLinks "${title.localName}" "${title.name}" statement editable title.rangeUri />
|
||||
</#list>
|
||||
</#if>
|
||||
<#-- If preferredTitle is unpopulated, display mostSpecificTypes -->
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<div id="titleContainer"><span class="display-title-not-editable">${statement.preferredTitle}</span></div>
|
||||
<#else>
|
||||
<span class="display-title-editable">${statement.preferredTitle}</span>
|
||||
<@p.editingLinks "${title.localName}" "${title.name}" statement editable />
|
||||
<@p.editingLinks "${title.localName}" "${title.name}" statement editable title.rangeUri />
|
||||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<#list phone.statements as statement>
|
||||
<li role="listitem" <#if editable>style="padding-left:10px;"</#if>>
|
||||
${statement.number!}
|
||||
<@p.editingLinks "${phone.localName}" "${phone.name}" statement editable />
|
||||
<@p.editingLinks "${phone.localName}" "${phone.name}" statement editable phone.rangeUri />
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
@ -66,7 +66,7 @@
|
|||
<li role="listitem" <#if editable>style="padding-left:10px;"</#if>>
|
||||
|
||||
<a class="email" href="mailto:${statement.emailAddress!}" title="${i18n().email}">${statement.emailAddress!}</a>
|
||||
<@p.editingLinks "${email.localName}" "${email.name}" statement editable />
|
||||
<@p.editingLinks "${email.localName}" "${email.name}" statement editable email.rangeUri />
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<#list phone.statements as statement>
|
||||
<li role="listitem">
|
||||
${statement.number!}
|
||||
<@p.editingLinks "${phone.localName}" "${phone.name}" statement editable />
|
||||
<@p.editingLinks "${phone.localName}" "${phone.name}" statement editable phone.rangeUri />
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
@ -47,7 +47,7 @@
|
|||
<#list email.statements as statement>
|
||||
<li role="listitem">
|
||||
<a class="email" href="mailto:${statement.emailAddress!}" title="${i18n().email}">${statement.emailAddress!}</a>
|
||||
<@p.editingLinks "${email.localName}" "${email.name}" statement editable />
|
||||
<@p.editingLinks "${email.localName}" "${email.name}" statement editable email.rangeUri />
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
||||
next statement -->
|
||||
<#macro showAuthorship statement>
|
||||
<#if statement.person??>
|
||||
<a href="${profileUrl(statement.uri("person"))}" title="${i18n().author_name}">${statement.personName}</a>
|
||||
<#if statement.author??>
|
||||
<a href="${profileUrl(statement.uri("author"))}" title="${i18n().author_name}">${statement.authorName}</a>
|
||||
<#else>
|
||||
<#-- This shouldn't happen, but we must provide for it -->
|
||||
<a href="${profileUrl(statement.uri("authorship"))}" title="${i18n().missing_author}">${i18n().missing_author}</a>
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
<#if statement.degree??>
|
||||
${statement.degreeAbbr!} <#if statement.majorField??> ${i18n().in} ${statement.majorField!} </#if>
|
||||
<#elseif statement.majorField??>
|
||||
${statement.majorField!}, ${statement.info!}
|
||||
<#else>
|
||||
${statement.majorField!}
|
||||
<#elseif statement.info??>
|
||||
${statement.info!}
|
||||
</#if>
|
||||
</#local>
|
||||
<@s.join [ linkedIndividual, detailedInfo ] />
|
||||
<@s.join [ linkedIndividual, detailedInfo ] /> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" false/>
|
||||
|
||||
</#macro>
|
||||
|
||||
|
|
|
@ -83,6 +83,9 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
|
|||
<#else>
|
||||
${submissionErrors[errorFieldName]}
|
||||
</#if>
|
||||
<#else>
|
||||
${submissionErrors[errorFieldName]}
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
<#--Checking if Person Type field is empty-->
|
||||
|
|
|
@ -65,6 +65,23 @@ local:authorInAuthorshipConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddPublicationToPersonGenerator"^^xsd:string ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbibliographic> .
|
||||
|
||||
local:orgInAuthorshipContext a :ConfigContext ;
|
||||
:hasConfiguration local:orgInAuthorshipConfig ;
|
||||
:configContextFor vivo:relatedBy ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Organization> ;
|
||||
:qualifiedBy vivo:Authorship .
|
||||
|
||||
local:orgInAuthorshipConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-authorInAuthorship.xml"^^xsd:string ;
|
||||
:displayName "selected publications" ;
|
||||
vitro:collateBySubclassAnnot
|
||||
"true"^^xsd:boolean;
|
||||
vitro:displayRankAnnot 1;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddPublicationToPersonGenerator"^^xsd:string ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbibliographic> .
|
||||
|
||||
local:hasServiceProviderRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasServiceProviderRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
|
@ -97,6 +114,22 @@ local:hasClinicalRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddClinicalRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaffiliation> .
|
||||
|
||||
local:orgHasClinicalRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:orgHasClinicalRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Organization> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#ClinicalRole> .
|
||||
|
||||
local:orgHasClinicalRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-hasClinicalActivity.xml"^^xsd:string ;
|
||||
:displayName "clinical activities" ;
|
||||
vitro:displayRankAnnot 70;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:stubObjectPropertyAnnot "true"^^xsd:boolean ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddClinicalRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaffiliation> .
|
||||
|
||||
local:hasLeaderRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasLeaderRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
|
@ -113,6 +146,22 @@ local:hasLeaderRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddHeadOfRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaffiliation> .
|
||||
|
||||
local:orgHasLeaderRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:orgHasLeaderRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Organization> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#LeaderRole> .
|
||||
|
||||
local:orgHasLeaderRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-roleContributesTo.xml"^^xsd:string ;
|
||||
:displayName "head of" ;
|
||||
vitro:displayRankAnnot 30;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:stubObjectPropertyAnnot "true"^^xsd:boolean ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddHeadOfRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaffiliation> .
|
||||
|
||||
local:hasMemberRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasMemberRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
|
@ -129,6 +178,22 @@ local:hasMemberRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddMemberRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaffiliation> .
|
||||
|
||||
local:orgHasMemberRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:orgHasMemberRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Organization> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#MemberRole> .
|
||||
|
||||
local:orgHasMemberRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-roleContributesTo.xml"^^xsd:string ;
|
||||
:displayName "member of" ;
|
||||
vitro:displayRankAnnot 50;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:stubObjectPropertyAnnot "true"^^xsd:boolean ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddMemberRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaffiliation> .
|
||||
|
||||
local:hasTeacherRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasTeacherRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
|
@ -193,6 +258,22 @@ local:hasOrganizerRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddOrganizerRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoutreach> .
|
||||
|
||||
local:orgHasOrganizerRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:orgHasOrganizerRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Organization> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#OrganizerRole> .
|
||||
|
||||
local:orgHasOrganizerRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-roleRealizedIn.xml"^^xsd:string ;
|
||||
:displayName "organizer of" ;
|
||||
vitro:displayRankAnnot 4;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:stubObjectPropertyAnnot "true"^^xsd:boolean ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddOrganizerRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoutreach> .
|
||||
|
||||
local:hasOutreachProviderRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasOutreachProviderRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
|
@ -209,6 +290,22 @@ local:hasOutreachProviderRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddOutreachProviderRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoutreach> .
|
||||
|
||||
local:orgHasOutreachProviderRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:orgHasOutreachProviderRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Organization> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#OutreachProviderRole> .
|
||||
|
||||
local:orgHasOutreachProviderRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-roleContributesTo.xml"^^xsd:string ;
|
||||
:displayName "outreach and community service" ;
|
||||
vitro:displayRankAnnot 50;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:stubObjectPropertyAnnot "true"^^xsd:boolean ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddOutreachProviderRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoutreach> .
|
||||
|
||||
local:hasAttendeeRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasAttendeeRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
|
@ -225,6 +322,22 @@ local:hasAttendeeRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddAttendeeRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupother> .
|
||||
|
||||
local:orgHasAttendeeRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:orgHasAttendeeRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Organization> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#AttendeeRole> .
|
||||
|
||||
local:orgHasAttendeeRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-hasAttendeeRole.xml"^^xsd:string ;
|
||||
:displayName "attended" ;
|
||||
vitro:displayRankAnnot 1;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:stubObjectPropertyAnnot "true"^^xsd:boolean ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddAttendeeRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupother> .
|
||||
|
||||
local:hasResearcherRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasResearcherRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
|
@ -303,6 +416,23 @@ local:hasPresenterRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddPresenterRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbibliographic> .
|
||||
|
||||
local:orgHasPresenterRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:orgHasPresenterRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Organization> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#PresenterRole> .
|
||||
|
||||
local:orgHasPresenterRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-hasPresenterRole.xml"^^xsd:string ;
|
||||
:displayName "presentations" ;
|
||||
vitro:collateBySubclassAnnot
|
||||
"true"^^xsd:boolean;
|
||||
vitro:displayRankAnnot 30;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddPresenterRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbibliographic> .
|
||||
|
||||
local:awardOrHonorContext a :ConfigContext ;
|
||||
:hasConfiguration local:awardOrHonorConfig ;
|
||||
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
|
||||
|
@ -318,6 +448,21 @@ local:awardOrHonorConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasAwardOrHonorGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbiography> .
|
||||
|
||||
local:orgHasAwardOrHonorContext a :ConfigContext ;
|
||||
:hasConfiguration local:orgHasAwardOrHonorConfig ;
|
||||
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Organization> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#AwardReceipt> .
|
||||
|
||||
local:orgHasAwardOrHonorConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-awardOrHonor.xml"^^xsd:string ;
|
||||
:displayName "awards and honors" ;
|
||||
vitro:displayRankAnnot 20;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasAwardOrHonorGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbiography> .
|
||||
|
||||
local:educationalTrainingContext a :ConfigContext ;
|
||||
:hasConfiguration local:educationalTrainingConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000056> ;
|
||||
|
@ -570,6 +715,22 @@ local:additionalEmailConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasEmailGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaddress> .
|
||||
|
||||
local:organizationEmailContext a :ConfigContext ;
|
||||
:hasConfiguration local:organizationEmailConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/ARG_2000028> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Organization> ;
|
||||
:qualifiedByRoot <http://www.w3.org/2006/vcard/ns#Kind> ;
|
||||
:qualifiedBy <http://www.w3.org/2006/vcard/ns#Email> .
|
||||
|
||||
local:organizationEmailConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-additionalEmail.xml"^^xsd:string ;
|
||||
:displayName "email address" ;
|
||||
vitro:displayRankAnnot 30;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasEmailGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaddress> .
|
||||
|
||||
local:primaryEmailContext a :ConfigContext ;
|
||||
:hasConfiguration local:primaryEmailConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/ARG_2000028> ;
|
||||
|
@ -768,6 +929,20 @@ local:eventLocationConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGrouplocation> .
|
||||
|
||||
local:organizationLocationContext a :ConfigContext ;
|
||||
:hasConfiguration local:organizationLocationConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0001025> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Organization> ;
|
||||
:qualifiedBy vivo:GeographicLocation .
|
||||
|
||||
local:organizationLocationConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-default.xml"^^xsd:string ;
|
||||
:displayName "has geographic location" ;
|
||||
vitro:displayRankAnnot 2;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGrouplocation> .
|
||||
|
||||
local:hasRoomContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasRoomConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/BFO_0000051> ;
|
||||
|
@ -937,6 +1112,20 @@ local:awardOrHonorGivenConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoverview> .
|
||||
|
||||
local:orgAwardsGrantContext a :ConfigContext ;
|
||||
:hasConfiguration local:orgAwardsGrantConfig ;
|
||||
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Organization> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#Grant> .
|
||||
|
||||
local:orgAwardsGrantConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-default.xml"^^xsd:string ;
|
||||
:displayName "awards grant" ;
|
||||
vitro:displayRankAnnot 61;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoverview> .
|
||||
|
||||
local:addressLocationContext a :ConfigContext ;
|
||||
:hasConfiguration local:addressLocationConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0001025> ;
|
||||
|
|
|
@ -12,11 +12,16 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.N3ValidatorVTwo;
|
|||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.MultiValueEditSubmission;
|
||||
|
||||
public class OrganizationHasPositionValidator implements N3ValidatorVTwo {
|
||||
public class FirstAndLastNameValidator implements N3ValidatorVTwo {
|
||||
|
||||
private static String MISSING_FIRST_NAME_ERROR = "You must enter a value in the First Name field.";
|
||||
private static String MISSING_LAST_NAME_ERROR = "You must enter a value in the Last Name field.";
|
||||
private static String MALFORMED_LAST_NAME_ERROR = "The last name field may not contain a comma. Please enter first name in First Name field.";
|
||||
private String uriReceiver;
|
||||
|
||||
public FirstAndLastNameValidator(String uriReceiver) {
|
||||
this.uriReceiver = uriReceiver;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> validate(EditConfigurationVTwo editConfig,
|
||||
|
@ -26,11 +31,11 @@ public class OrganizationHasPositionValidator implements N3ValidatorVTwo {
|
|||
|
||||
Map<String,String> errors = new HashMap<String,String>();
|
||||
|
||||
List<String> personUri = urisFromForm.get("existingPerson");
|
||||
List<String> personUri = urisFromForm.get(uriReceiver);
|
||||
if (allListElementsEmpty(personUri) || personUri.contains(">SUBMITTED VALUE WAS BLANK<")) {
|
||||
personUri = null;
|
||||
}
|
||||
// If there's an adviseeUri, then we're done. The firstName and lastName fields are
|
||||
// If there's an personUri, then we're done. The firstName and lastName fields are
|
||||
// disabled and so don't get submitted.
|
||||
if (personUri != null) {
|
||||
return null;
|
|
@ -1,95 +0,0 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package edu.cornell.mannlib.vitro.webapp.edit.n3editing;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.hp.hpl.jena.rdf.model.Literal;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.N3ValidatorVTwo;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.MultiValueEditSubmission;
|
||||
|
||||
public class PersonHasAdviseesValidator implements N3ValidatorVTwo {
|
||||
|
||||
private static String MISSING_FIRST_NAME_ERROR = "You must enter a value in the First Name field.";
|
||||
private static String MISSING_LAST_NAME_ERROR = "You must enter a value in the Last Name field.";
|
||||
private static String MALFORMED_LAST_NAME_ERROR = "The last name field may not contain a comma. Please enter first name in First Name field.";
|
||||
|
||||
@Override
|
||||
public Map<String, String> validate(EditConfigurationVTwo editConfig,
|
||||
MultiValueEditSubmission editSub) {
|
||||
Map<String,List<String>> urisFromForm = editSub.getUrisFromForm();
|
||||
Map<String,List<Literal>> literalsFromForm = editSub.getLiteralsFromForm();
|
||||
|
||||
Map<String,String> errors = new HashMap<String,String>();
|
||||
|
||||
List<String> adviseeUri = urisFromForm.get("existingAdvisee");
|
||||
if (allListElementsEmpty(adviseeUri) || adviseeUri.contains(">SUBMITTED VALUE WAS BLANK<")) {
|
||||
adviseeUri = null;
|
||||
}
|
||||
// If there's an adviseeUri, then we're done. The firstName and lastName fields are
|
||||
// disabled and so don't get submitted.
|
||||
if (adviseeUri != null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
//Expecting only one first name in this case
|
||||
//To Do: update logic if multiple first names considered
|
||||
Literal firstName = null;
|
||||
List<Literal> firstNameList = literalsFromForm.get("firstName");
|
||||
if(firstNameList != null && firstNameList.size() > 0) {
|
||||
firstName = firstNameList.get(0);
|
||||
}
|
||||
if( firstName != null &&
|
||||
firstName.getLexicalForm() != null &&
|
||||
"".equals(firstName.getLexicalForm()) )
|
||||
firstName = null;
|
||||
|
||||
|
||||
List<Literal> lastNameList = literalsFromForm.get("lastName");
|
||||
Literal lastName = null;
|
||||
if(lastNameList != null && lastNameList.size() > 0) {
|
||||
lastName = lastNameList.get(0);
|
||||
}
|
||||
String lastNameValue = "";
|
||||
if (lastName != null) {
|
||||
lastNameValue = lastName.getLexicalForm();
|
||||
if( "".equals(lastNameValue) ) {
|
||||
lastName = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (lastName == null) {
|
||||
errors.put("lastName", MISSING_LAST_NAME_ERROR);
|
||||
// Don't reject space in the last name: de Vries, etc.
|
||||
} else if (lastNameValue.contains(",")) {
|
||||
errors.put("lastName", MALFORMED_LAST_NAME_ERROR);
|
||||
}
|
||||
|
||||
if (firstName == null) {
|
||||
errors.put("firstName", MISSING_FIRST_NAME_ERROR);
|
||||
}
|
||||
|
||||
return errors.size() != 0 ? errors : null;
|
||||
}
|
||||
|
||||
private boolean allListElementsEmpty(List<String> checkList) {
|
||||
if(checkList == null)
|
||||
return true;
|
||||
if(checkList.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
boolean allEmpty = true;
|
||||
for(String s: checkList) {
|
||||
if(s.length() != 0){
|
||||
allEmpty = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return allEmpty;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,95 +0,0 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package edu.cornell.mannlib.vitro.webapp.edit.n3editing;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.hp.hpl.jena.rdf.model.Literal;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.N3ValidatorVTwo;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.MultiValueEditSubmission;
|
||||
|
||||
public class PersonHasAdvisorsValidator implements N3ValidatorVTwo {
|
||||
|
||||
private static String MISSING_FIRST_NAME_ERROR = "You must enter a value in the First Name field.";
|
||||
private static String MISSING_LAST_NAME_ERROR = "You must enter a value in the Last Name field.";
|
||||
private static String MALFORMED_LAST_NAME_ERROR = "The last name field may not contain a comma. Please enter first name in First Name field.";
|
||||
|
||||
@Override
|
||||
public Map<String, String> validate(EditConfigurationVTwo editConfig,
|
||||
MultiValueEditSubmission editSub) {
|
||||
Map<String,List<String>> urisFromForm = editSub.getUrisFromForm();
|
||||
Map<String,List<Literal>> literalsFromForm = editSub.getLiteralsFromForm();
|
||||
|
||||
Map<String,String> errors = new HashMap<String,String>();
|
||||
|
||||
List<String> adviseeUri = urisFromForm.get("existingAdvisor");
|
||||
if (allListElementsEmpty(adviseeUri) || adviseeUri.contains(">SUBMITTED VALUE WAS BLANK<")) {
|
||||
adviseeUri = null;
|
||||
}
|
||||
// If there's an adviseeUri, then we're done. The firstName and lastName fields are
|
||||
// disabled and so don't get submitted.
|
||||
if (adviseeUri != null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
//Expecting only one first name in this case
|
||||
//To Do: update logic if multiple first names considered
|
||||
Literal firstName = null;
|
||||
List<Literal> firstNameList = literalsFromForm.get("firstName");
|
||||
if(firstNameList != null && firstNameList.size() > 0) {
|
||||
firstName = firstNameList.get(0);
|
||||
}
|
||||
if( firstName != null &&
|
||||
firstName.getLexicalForm() != null &&
|
||||
"".equals(firstName.getLexicalForm()) )
|
||||
firstName = null;
|
||||
|
||||
|
||||
List<Literal> lastNameList = literalsFromForm.get("lastName");
|
||||
Literal lastName = null;
|
||||
if(lastNameList != null && lastNameList.size() > 0) {
|
||||
lastName = lastNameList.get(0);
|
||||
}
|
||||
String lastNameValue = "";
|
||||
if (lastName != null) {
|
||||
lastNameValue = lastName.getLexicalForm();
|
||||
if( "".equals(lastNameValue) ) {
|
||||
lastName = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (lastName == null) {
|
||||
errors.put("lastName", MISSING_LAST_NAME_ERROR);
|
||||
// Don't reject space in the last name: de Vries, etc.
|
||||
} else if (lastNameValue.contains(",")) {
|
||||
errors.put("lastName", MALFORMED_LAST_NAME_ERROR);
|
||||
}
|
||||
|
||||
if (firstName == null) {
|
||||
errors.put("firstName", MISSING_FIRST_NAME_ERROR);
|
||||
}
|
||||
|
||||
return errors.size() != 0 ? errors : null;
|
||||
}
|
||||
|
||||
private boolean allListElementsEmpty(List<String> checkList) {
|
||||
if(checkList == null)
|
||||
return true;
|
||||
if(checkList.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
boolean allEmpty = true;
|
||||
for(String s: checkList) {
|
||||
if(s.length() != 0){
|
||||
allEmpty = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return allEmpty;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package edu.cornell.mannlib.vitro.webapp.edit.n3editing;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import com.hp.hpl.jena.rdf.model.Literal;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.N3ValidatorVTwo;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.MultiValueEditSubmission;
|
||||
|
||||
public class PublicationHasEditorValidator implements N3ValidatorVTwo {
|
||||
|
||||
private static String MISSING_FIRST_NAME_ERROR = "Must specify the editor's first name.";
|
||||
private static String MISSING_LAST_NAME_ERROR = "Must specify the editor's last name.";
|
||||
private static String MALFORMED_LAST_NAME_ERROR = "Last name may not contain a comma. Please enter first name in first name field.";
|
||||
;
|
||||
@Override
|
||||
public Map<String, String> validate(EditConfigurationVTwo editConfig,
|
||||
MultiValueEditSubmission editSub) {
|
||||
Map<String,List<String>> urisFromForm = editSub.getUrisFromForm();
|
||||
Map<String,List<Literal>> literalsFromForm = editSub.getLiteralsFromForm();
|
||||
|
||||
Map<String,String> errors = new HashMap<String,String>();
|
||||
|
||||
List<String> personUri = urisFromForm.get("personUri");
|
||||
|
||||
if (allListElementsEmpty(personUri)) {
|
||||
personUri = null;
|
||||
}
|
||||
// If there's a personUri, then we're done. The firstName and lastName fields are
|
||||
// disabled and so don't get submitted.
|
||||
if (personUri != null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
//Expecting only one first name in this case
|
||||
//To Do: update logic if multiple first names considered
|
||||
Literal firstName = null;
|
||||
List<Literal> firstNameList = literalsFromForm.get("firstName");
|
||||
if(firstNameList != null && firstNameList.size() > 0) {
|
||||
firstName = firstNameList.get(0);
|
||||
}
|
||||
if( firstName != null &&
|
||||
firstName.getLexicalForm() != null &&
|
||||
"".equals(firstName.getLexicalForm()) )
|
||||
firstName = null;
|
||||
|
||||
|
||||
List<Literal> lastNameList = literalsFromForm.get("lastName");
|
||||
Literal lastName = null;
|
||||
if(lastNameList != null && lastNameList.size() > 0) {
|
||||
lastName = lastNameList.get(0);
|
||||
}
|
||||
String lastNameValue = "";
|
||||
if (lastName != null) {
|
||||
lastNameValue = lastName.getLexicalForm();
|
||||
if( "".equals(lastNameValue) ) {
|
||||
lastName = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (lastName == null) {
|
||||
errors.put("lastName", MISSING_LAST_NAME_ERROR);
|
||||
// Don't reject space in the last name: de Vries, etc.
|
||||
} else if (lastNameValue.contains(",")) {
|
||||
errors.put("lastName", MALFORMED_LAST_NAME_ERROR);
|
||||
}
|
||||
|
||||
if (firstName == null) {
|
||||
errors.put("firstName", MISSING_FIRST_NAME_ERROR);
|
||||
}
|
||||
|
||||
return errors.size() != 0 ? errors : null;
|
||||
}
|
||||
|
||||
private boolean allListElementsEmpty(List<String> checkList) {
|
||||
if(checkList == null)
|
||||
return true;
|
||||
if(checkList.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
boolean allEmpty = true;
|
||||
for(String s: checkList) {
|
||||
if(s.length() != 0){
|
||||
allEmpty = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return allEmpty;
|
||||
}
|
||||
|
||||
}
|
|
@ -355,7 +355,7 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator
|
|||
+ "?subject core:relatedBy ?authorshipURI . \n"
|
||||
+ "?authorshipURI a core:Authorship . \n"
|
||||
+ "?authorshipURI core:relates ?authorURI . \n"
|
||||
+ "?authorURI a foaf:Person . \n"
|
||||
+ "?authorURI a foaf:Agent . \n"
|
||||
+ "OPTIONAL { ?authorURI rdfs:label ?authorName } \n"
|
||||
+ "OPTIONAL { ?authorshipURI core:rank ?rank } \n"
|
||||
+ "} ORDER BY ?rank";
|
||||
|
|
|
@ -27,7 +27,7 @@ import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement;
|
|||
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.PublicationHasEditorValidator;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.FirstAndLastNameValidator;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeIntervalValidationVTwo;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
|
||||
|
@ -84,7 +84,7 @@ public class AddEditorsToInformationResourceGenerator extends VivoBaseGenerator
|
|||
//template file
|
||||
editConfiguration.setTemplate("addEditorsToInformationResource.ftl");
|
||||
//add validators
|
||||
editConfiguration.addValidator(new PublicationHasEditorValidator());
|
||||
editConfiguration.addValidator(new FirstAndLastNameValidator("personUri"));
|
||||
|
||||
//Adding additional data, specifically edit mode
|
||||
addFormSpecificData(editConfiguration, vreq);
|
||||
|
|
|
@ -24,7 +24,6 @@ import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
|||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.PersonHasAdviseesValidator;
|
||||
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.EditConfigurationUtils;
|
||||
|
|
|
@ -12,6 +12,7 @@ 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.FirstAndLastNameValidator;
|
||||
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;
|
||||
|
@ -166,6 +167,7 @@ public class OrganizationForTrainingGenerator extends VivoBaseGenerator impleme
|
|||
//Add validator
|
||||
conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField"));
|
||||
conf.addValidator(new AntiXssValidation());
|
||||
conf.addValidator(new FirstAndLastNameValidator("existingPerson"));
|
||||
|
||||
//Adding additional data, specifically edit mode
|
||||
addFormSpecificData(conf, vreq);
|
||||
|
|
|
@ -10,14 +10,14 @@ 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.dao.VitroVocabulary.Precision;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.FirstAndLastNameValidator;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation;
|
||||
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.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;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.OrganizationHasPositionValidator;
|
||||
|
||||
public class OrganizationHasPositionHistoryGenerator extends VivoBaseGenerator
|
||||
implements EditConfigurationGenerator {
|
||||
|
@ -257,7 +257,7 @@ public class OrganizationHasPositionHistoryGenerator extends VivoBaseGenerator
|
|||
conf.addField(endField.setEditElement(new DateTimeWithPrecisionVTwo(
|
||||
endField, URI_PRECISION_YEAR, URI_PRECISION_NONE)));
|
||||
|
||||
conf.addValidator(new OrganizationHasPositionValidator());
|
||||
conf.addValidator(new FirstAndLastNameValidator("existingPerson"));
|
||||
conf.addValidator(new AntiXssValidation());
|
||||
conf.addValidator(new DateTimeIntervalValidationVTwo("startField",
|
||||
"endField"));
|
||||
|
|
|
@ -11,7 +11,7 @@ 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.PersonHasAdvisorsValidator;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.FirstAndLastNameValidator;
|
||||
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.EditConfigurationUtils;
|
||||
|
@ -184,7 +184,7 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp
|
|||
|
||||
conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField"));
|
||||
conf.addValidator(new AntiXssValidation());
|
||||
conf.addValidator(new PersonHasAdvisorsValidator());
|
||||
conf.addValidator(new FirstAndLastNameValidator("existingAdvisor"));
|
||||
addFormSpecificData(conf, vreq);
|
||||
|
||||
prepare(vreq, conf);
|
||||
|
|
|
@ -11,7 +11,7 @@ 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.PersonHasAdviseesValidator;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.FirstAndLastNameValidator;
|
||||
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.EditConfigurationUtils;
|
||||
|
@ -184,7 +184,7 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
|
|||
|
||||
conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField"));
|
||||
conf.addValidator(new AntiXssValidation());
|
||||
conf.addValidator(new PersonHasAdviseesValidator());
|
||||
conf.addValidator(new FirstAndLastNameValidator("existingAdvisee"));
|
||||
addFormSpecificData(conf, vreq);
|
||||
|
||||
prepare(vreq, conf);
|
||||
|
|
|
@ -296,8 +296,8 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
|
|||
final static String orgTypeQuery =
|
||||
"PREFIX rdfs: <"+ rdfs +"> \n"+
|
||||
"SELECT ?existingOrgType WHERE {\n"+
|
||||
"?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?existingAwardedDegree . \n" +
|
||||
"?existingAwardedDegree <http://vivoweb.org/ontology/core#assignedBy> ?existingOrg .\n"+
|
||||
"?edTraining <http://purl.obolibrary.org/obo/RO_0000057> ?existingOrg . \n" +
|
||||
"?existingOrg <http://purl.obolibrary.org/obo/RO_0000056> ?edTraining .\n"+
|
||||
"?existingOrg a ?existingOrgType .\n"+
|
||||
"?existingOrgType rdfs:subClassOf <"+ orgClass +"> .\n"+
|
||||
"}";
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
</#if>
|
||||
<#list title.statements as statement>
|
||||
<span class="display-title<#if editable>-editable</#if>">${statement.preferredTitle}</span>
|
||||
<@p.editingLinks "${title.localName}" "${title.name}" statement editable />
|
||||
<@p.editingLinks "${title.localName}" "${title.name}" statement editable title.rangeUri />
|
||||
</#list>
|
||||
</#if>
|
||||
<#-- If preferredTitle is unpopulated, display mostSpecificTypes -->
|
||||
|
|
Loading…
Add table
Reference in a new issue