Merge branch 'maint-rel-1.6' of https://github.com/vivo-project/VIVO into maint-rel-1.6

This commit is contained in:
brianjlowe 2013-11-21 20:22:27 -05:00
commit f65abc9471
15 changed files with 294 additions and 151 deletions

View file

@ -875,4 +875,5 @@ name_suffix = Sufijo de nombre
administering_organization_for = administración de la organización para
missing_credential = falta credencial
grant_administered_by = conceder administrado por
missing_grant = falta de subvención
missing_grant = falta de subvención
editor_of_entry = editor de para

View file

@ -18,6 +18,12 @@
<!--postindividual overiew ftl-->
</#assign>
<#if individual.conceptSubclass() >
<#assign overview = propertyGroups.pullProperty("http://www.w3.org/2004/02/skos/core#broader")!>
<#assign overview = propertyGroups.pullProperty("http://www.w3.org/2004/02/skos/core#narrower")!>
<#assign overview = propertyGroups.pullProperty("http://www.w3.org/2004/02/skos/core#related")!>
</#if>
<#include "individual-vitro.ftl">
<script>
var i18nStrings = {

View file

@ -50,7 +50,7 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
<#assign yearHint = "<span class='hint'>(${i18n().year_hint_format})</span>" />
<h2>${titleVerb}&nbsp;${i18n().educational_training_for} ${editConfiguration.subjectName}</h2>
<h2>${titleVerb}&nbsp;${i18n().editor_of_entry} ${editConfiguration.subjectName}</h2>
<#--Display error messages if any-->
<#if submissionErrors?has_content>

View file

@ -1,29 +1,30 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#--Two stage form for service provider role-->
<#--
Required Values to be set for each form that includes addRoleToPersonTwoStage.ftl are:
roleDescriptor.
The other required values (roleType, optionsType, objectClassUri, and literalOptions are
set in the JAVA class corresponding to the form, e.g. AddOutreachProviderRoleToPersonGenerator.java.
Optional values can be set, but each of these has default values
set in addRoleToPersonTwoStage.ftl:
buttonText
typeSelectorLabel
numDateFields
showRoleLAbelField
roleExamples-->
<#--Variable assignments for Add Clinical Role To Person-->
<#assign roleDescriptor = "${i18n().outreach_comm_service}" />
<#assign typeSelectorLabel = "${i18n().outreach_comm_service_in}" />
<#assign genericLabel = "${i18n().organization_capitalized}" />
<#assign acTypes = "{activity: 'http://xmlns.com/foaf/0.1/Organization'}" />
<#--Each of the two stage forms will include the form below-->
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#--Two stage form for service provider role-->
<#--
Required Values to be set for each form that includes addRoleToPersonTwoStage.ftl are:
roleDescriptor.
The other required values (roleType, optionsType, objectClassUri, and literalOptions are
set in the JAVA class corresponding to the form, e.g. AddOutreachProviderRoleToPersonGenerator.java.
Optional values can be set, but each of these has default values
set in addRoleToPersonTwoStage.ftl:
buttonText
typeSelectorLabel
numDateFields
showRoleLAbelField
roleExamples-->
<#--Variable assignments for Add Clinical Role To Person-->
<#assign roleDescriptor = "${i18n().outreach_comm_service}" />
<#assign typeSelectorLabel = "${i18n().outreach_comm_service_in}" />
<#assign genericLabel = "${i18n().organization_capitalized}" />
<#assign acMultipleTypes = "'true'" />
<#assign acTypes = "{activity: 'http://xmlns.com/foaf/0.1/Organization,http://xmlns.com/foaf/0.1/Group,http://purl.obolibrary.org/obo/OBI_0000835,http://purl.org/NET/c4dm/event.owl#Event'}" />
<#--Each of the two stage forms will include the form below-->
<#include "addRoleToPersonTwoStage.ftl">

View file

@ -22,7 +22,8 @@ roleExamples-->
<#assign typeSelectorLabel = "${i18n().reviewer_of}" />
<#assign genericLabel = "${i18n().item_capitalized}" />
<#assign acTypes = "{activity: 'http://purl.org/ontology/bibo/Document'}" />
<#assign acMultipleTypes = "'true'" />
<#assign acTypes = "{activity: 'http://purl.org/ontology/bibo/Document,http://purl.org/ontology/bibo/Collection'}" />
<#--Each of the two stage forms will include the form below-->
<#include "addRoleToPersonTwoStage.ftl">

View file

@ -1,29 +1,30 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#--Two stage form for service provider role-->
<#--
Required Values to be set for each form that includes addRoleToPersonTwoStage.ftl are:
roleDescriptor.
The other required values (roleType, optionsType, objectClassUri, and literalOptions are
set in the JAVA class corresponding to the form, e.g. AddServiceProviderRoleToPersonGenerator.java.
Optional values can be set, but each of these has default values
set in addRoleToPersonTwoStage.ftl:
buttonText
typeSelectorLabel
numDateFields
showRoleLAbelField
roleExamples-->
<#--Variable assignments for Add Service Provider Role To Person-->
<#assign roleDescriptor = "${i18n().service_to_profession}" />
<#assign typeSelectorLabel = "${i18n().service_to_profession_in}" />
<#assign genericLabel = "${i18n().organization_capitalized}" />
<#assign acTypes = "{activity: 'http://xmlns.com/foaf/0.1/Organization'}" />
<#--Each of the two stage forms will include the form below-->
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#--Two stage form for service provider role-->
<#--
Required Values to be set for each form that includes addRoleToPersonTwoStage.ftl are:
roleDescriptor.
The other required values (roleType, optionsType, objectClassUri, and literalOptions are
set in the JAVA class corresponding to the form, e.g. AddServiceProviderRoleToPersonGenerator.java.
Optional values can be set, but each of these has default values
set in addRoleToPersonTwoStage.ftl:
buttonText
typeSelectorLabel
numDateFields
showRoleLAbelField
roleExamples-->
<#--Variable assignments for Add Service Provider Role To Person-->
<#assign roleDescriptor = "${i18n().service_to_profession}" />
<#assign typeSelectorLabel = "${i18n().service_to_profession_in}" />
<#assign genericLabel = "${i18n().organization_capitalized}" />
<#assign acMultipleTypes = "'true'" />
<#assign acTypes = "{activity: 'http://xmlns.com/foaf/0.1/Organization,http://xmlns.com/foaf/0.1/Group,http://purl.obolibrary.org/obo/OBI_0000835,http://purl.org/NET/c4dm/event.owl#Event'}" />
<#--Each of the two stage forms will include the form below-->
<#include "addRoleToPersonTwoStage.ftl">

View file

@ -860,6 +860,20 @@ local:preferredTitleConfig a :ObjectPropertyDisplayConfig ;
### properties using default editing form ##
local:credentialOfContext a :ConfigContext ;
:hasConfiguration local:credentialOfConfig ;
:configContextFor vivo:relatedBy ;
:qualifiedByDomain vivo:Credential ;
:qualifiedBy vivo:IssuedCredential .
local:credentialOfConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-default.xml"^^xsd:string ;
:displayName "credential of" ;
vitro:displayRankAnnot 6;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:nobody ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoverview> .
local:documentHasPartContext a :ConfigContext ;
:hasConfiguration local:documentHasPartConfig ;
:configContextFor <http://purl.obolibrary.org/obo/BFO_0000051> ;
@ -1236,8 +1250,8 @@ local:awardOrHonorReceiptsConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-default.xml"^^xsd:string ;
:displayName "receipts" ;
vitro:displayRankAnnot 3;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:nobody ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:nobody ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupother> .
local:awardReceiptsContext a :ConfigContext ;
@ -1337,7 +1351,7 @@ local:bfo_0000055Config a :ObjectPropertyDisplayConfig ;
:displayName "participant" ;
vitro:displayRankAnnot 1;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:nobody ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupother> .
### grant roles using the core:relates property ###
@ -1353,7 +1367,7 @@ local:grantRelatesConfig a :ObjectPropertyDisplayConfig ;
:displayName "contributor" ;
vitro:displayRankAnnot 1;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:nobody ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbiography> .
### faux properties for dateTimeValue ###

View file

@ -2664,11 +2664,11 @@ vivo:contributingRole
vitro:displayLimitAnnot
"5"^^xsd:int ;
vitro:hiddenFromDisplayBelowRoleLevelAnnot
<http://vitro.mannlib.cornell.edu/ns/vitro/role#public> ;
<http://vitro.mannlib.cornell.edu/ns/vitro/role#nobody> ;
vitro:inPropertyGroupAnnot
<http://vivoweb.org/ontology#vitroPropertyGroupbiography> ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot
<http://vitro.mannlib.cornell.edu/ns/vitro/role#public> ;
<http://vitro.mannlib.cornell.edu/ns/vitro/role#nobody> ;
vitro:selectFromExistingAnnot
"true"^^xsd:boolean .

View file

@ -1,75 +1,75 @@
/* $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 edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
/**
* Generates the edit configuration for adding a Role to a Person.
Stage one is selecting the type of the non-person thing
associated with the Role with the intention of reducing the
number of Individuals that the user has to select from.
Stage two is selecting the non-person Individual to associate
with the Role.
This is intended to create a set of statements like:
?person core:hasResearchActivityRole ?newRole.
?newRole rdf:type core:ResearchActivityRole ;
roleToActivityPredicate ?someActivity .
?someActivity rdf:type core:ResearchActivity .
?someActivity rdfs:label "activity title" .
Each subclass of the abstract two stage Generator class will have the option of overriding certain
methods, and must always implement the following methods:
getRoleType
getRoleActivityTypeOptionsType
getRoleActivityTypeObjectClassUri
getRoleActivityTypeLiteralOptions
*
*/
public class AddEditorRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
private static String TEMPLATE = "addEditorRoleToPerson.ftl";
private static String OPTION_CLASS_URI = "http://purl.org/ontology/bibo/Collection";
@Override
String getTemplate(){ return TEMPLATE; }
@Override
String getRoleType() {
return "http://vivoweb.org/ontology/core#EditorRole";
}
@Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new
ChildVClassesOptions(OPTION_CLASS_URI)
.setDefaultOptionLabel("Select type");
}
/** Do not show the role label field for the AddEditorRoleToPerson form */
@Override
boolean isShowRoleLabelField() { return false; }
/*
* Use the methods below to change the date/time precision in the
* custom form associated with this generator. When not used, the
* precision will be YEAR. The other precisons are MONTH, DAY, HOUR,
* MINUTE, TIME and NONE.
*/
/*
public String getStartDatePrecision() {
String precision = VitroVocabulary.Precision.MONTH.uri();
return precision;
}
public String getEndDatePrecision() {
String precision = VitroVocabulary.Precision.DAY.uri();
return precision;
}
*/
}
/* $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 edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
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.FieldOptions;
/**
* Generates the edit configuration for adding a Role to a Person.
Stage one is selecting the type of the non-person thing
associated with the Role with the intention of reducing the
number of Individuals that the user has to select from.
Stage two is selecting the non-person Individual to associate
with the Role.
This is intended to create a set of statements like:
?person core:hasResearchActivityRole ?newRole.
?newRole rdf:type core:ResearchActivityRole ;
roleToActivityPredicate ?someActivity .
?someActivity rdf:type core:ResearchActivity .
?someActivity rdfs:label "activity title" .
Each subclass of the abstract two stage Generator class will have the option of overriding certain
methods, and must always implement the following methods:
getRoleType
getRoleActivityTypeOptionsType
getRoleActivityTypeObjectClassUri
getRoleActivityTypeLiteralOptions
*
*/
public class AddEditorRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
private static String TEMPLATE = "addEditorRoleToPerson.ftl";
private static String OPTION_CLASS_URI = "http://purl.org/ontology/bibo/Collection";
@Override
String getTemplate(){ return TEMPLATE; }
@Override
String getRoleType() {
return "http://vivoweb.org/ontology/core#EditorRole";
}
@Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ChildVClassesOptions(OPTION_CLASS_URI)
.setDefaultOptionLabel("Select type");
}
/** Do not show the role label field for the AddEditorRoleToPerson form */
@Override
boolean isShowRoleLabelField() { return false; }
/*
* Use the methods below to change the date/time precision in the
* custom form associated with this generator. When not used, the
* precision will be YEAR. The other precisons are MONTH, DAY, HOUR,
* MINUTE, TIME and NONE.
*/
/*
public String getStartDatePrecision() {
String precision = VitroVocabulary.Precision.MONTH.uri();
return precision;
}
public String getEndDatePrecision() {
String precision = VitroVocabulary.Precision.DAY.uri();
return precision;
}
*/
}

View file

@ -213,14 +213,12 @@ public class AddEditorshipToPersonGenerator extends VivoBaseGenerator implements
List<List<String>> literalOptions = new ArrayList<List<String>>();
literalOptions.add(list("http://purl.org/ontology/bibo/Book", "Book"));
literalOptions.add(list("http://purl.org/ontology/bibo/Chapter", "Chapter"));
literalOptions.add(list("http://purl.org/ontology/bibo/Collection", "Collection"));
literalOptions.add(list("http://purl.org/ontology/bibo/EditedBook", "Edited Book"));
literalOptions.add(list("http://purl.org/ontology/bibo/Film", "Film"));
literalOptions.add(list("http://purl.org/ontology/bibo/Magazine", "Magazine"));
literalOptions.add(list("http://vivoweb.org/ontology/core#Newsletter", "Newsletter"));
literalOptions.add(list("http://purl.org/ontology/bibo/Newspaper", "Newspaper"));
literalOptions.add(list("http://vivoweb.org/ontology/core#NewsRelease", "News Release"));
literalOptions.add(list("http://purl.org/ontology/bibo/Periodical", "Periodical"));
literalOptions.add(list("http://purl.org/ontology/bibo/Report", "Report"));
literalOptions.add(list("http://vivoweb.org/ontology/core#Video", "Video"));
literalOptions.add(list("http://purl.org/ontology/bibo/Webpage", "Webpage"));

View file

@ -26,11 +26,13 @@ public class AddOutreachProviderRoleToPersonGenerator extends AddRoleToPersonTwo
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions(
"","Select type",
"http://vivoweb.org/ontology/core#AcademicDepartment","Academic Department",
"http://vivoweb.org/ontology/core#Association","Association",
"http://vivoweb.org/ontology/core#Center","Center",
"http://vivoweb.org/ontology/core#ClinicalOrganization","Clinical Organization",
"http://vivoweb.org/ontology/core#College","College",
"http://vivoweb.org/ontology/core#Committee","Committee",
"http://vivoweb.org/ontology/core#Company","Company",
"http://vivoweb.org/ontology/core#Consortium","Consortium",
"http://vivoweb.org/ontology/core#CoreLaboratory","Core Laboratory",
"http://vivoweb.org/ontology/core#Department","Department",
@ -40,18 +42,20 @@ public class AddOutreachProviderRoleToPersonGenerator extends AddRoleToPersonTwo
"http://vivoweb.org/ontology/core#Foundation","Foundation",
"http://vivoweb.org/ontology/core#FundingOrganization","Funding Organization",
"http://vivoweb.org/ontology/core#GovernmentAgency","Government Agency",
"http://xmlns.com/foaf/0.1/Group","Group",
"http://vivoweb.org/ontology/core#Hospital","Hospital",
"http://vivoweb.org/ontology/core#Institute","Institute",
"http://vivoweb.org/ontology/core#Laboratory","Laboratory",
"http://vivoweb.org/ontology/core#Library","Library",
"http://purl.obolibrary.org/obo/OBI_0000835","Manufacturer",
"http://vivoweb.org/ontology/core#Museum","Museum",
"http://xmlns.com/foaf/0.1/Organization","Organization",
"http://vivoweb.org/ontology/core#PrivateCompany","Private Company",
"http://vivoweb.org/ontology/core#Program","Program",
"http://vivoweb.org/ontology/core#Publisher","Publisher",
"http://vivoweb.org/ontology/core#ResearchOrganization","Research Organization",
"http://vivoweb.org/ontology/core#Team","Team",
"http://vivoweb.org/ontology/core#School","School",
"http://vivoweb.org/ontology/core#Team","Team",
"http://vivoweb.org/ontology/core#ServiceProvidingLaboratory","Service Providing Lab",
"http://vivoweb.org/ontology/core#StudentOrganization","Student Organization",
"http://purl.obolibrary.org/obo/ERO_0000565","Technology Transfer Office",

View file

@ -4,6 +4,7 @@ package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
public class AddReviewerRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
@ -34,8 +35,77 @@ public class AddReviewerRoleToPersonGenerator extends AddRoleToPersonTwoStageGen
*/
@Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ChildVClassesOptions(OBJECT_VCLASS_URI)
.setDefaultOptionLabel("Select type");
return new ConstantFieldOptions(
"", "Select type",
"http://purl.org/ontology/bibo/AcademicArticle", "Academic Article",
"http://purl.org/ontology/bibo/Article", "Article",
"http://purl.org/ontology/bibo/AudioDocument", "Audio Document",
"http://purl.org/ontology/bibo/AudioVisualDocument", "Audio-Visual Document",
"http://purl.org/ontology/bibo/Bill", "Bill",
"http://vivoweb.org/ontology/core#Blog", "Blog",
"http://vivoweb.org/ontology/core#BlogPosting", "Blog Posting",
"http://purl.org/ontology/bibo/Book", "Book",
"http://purl.org/ontology/bibo/BookSection", "Book Section",
"http://purl.org/ontology/bibo/Brief", "Brief",
"http://vivoweb.org/ontology/core#CaseStudy", "Case Study",
"http://vivoweb.org/ontology/core#Catalog", "Catalog",
"http://purl.org/ontology/bibo/Chapter", "Chapter",
"http://purl.org/spar/fabio/ClinicalGuideline", "Clinical Guideline",
"http://purl.org/ontology/bibo/Code", "Code",
"http://purl.org/ontology/bibo/CollectedDocument", "Collected Document",
"http://purl.org/spar/fabio/Comment", "Comment",
"http://vivoweb.org/ontology/core#ConferencePaper", "Conference Paper",
"http://vivoweb.org/ontology/core#ConferencePoster", "Conference Poster",
"http://purl.org/ontology/bibo/CourtReporter", "Court Reporter",
"http://vivoweb.org/ontology/core#Database", "Database",
"http://purl.org/ontology/bibo/LegalDecision", "Decision",
"http://purl.org/ontology/bibo/DocumentPart", "Document Part",
"http://purl.org/ontology/bibo/EditedBook", "Edited Book",
"http://vivoweb.org/ontology/core#EditorialArticle", "Editorial Article",
"http://purl.org/spar/fabio/Erratum", "Erratum",
"http://purl.org/ontology/bibo/Excerpt", "Excerpt",
"http://purl.org/ontology/bibo/Film", "Film",
"http://purl.org/ontology/bibo/Image", "Image",
"http://purl.org/ontology/bibo/Issue", "Issue",
"http://purl.org/ontology/bibo/Journal", "Journal",
"http://purl.obolibrary.org/obo/IAO_0000013", "Journal Article",
"http://purl.org/ontology/bibo/LegalCaseDocument", "Legal Case Document",
"http://purl.org/ontology/bibo/LegalDocument", "Legal Document",
"http://purl.org/ontology/bibo/Legislation", "Legislation",
"http://purl.org/ontology/bibo/Letter", "Letter",
"http://purl.org/ontology/bibo/Magazine", "Magazine",
"http://purl.org/ontology/bibo/Manual", "Manual",
"http://purl.org/ontology/bibo/Manuscript", "Manuscript",
"http://purl.org/ontology/bibo/Map", "Map",
"http://vivoweb.org/ontology/core#Newsletter", "Newsletter",
"http://purl.org/ontology/bibo/Newspaper", "Newspaper",
"http://vivoweb.org/ontology/core#NewsRelease", "News Release",
"http://purl.org/ontology/bibo/Note", "Note",
"http://purl.org/ontology/bibo/Patent", "Patent",
"http://purl.org/ontology/bibo/Periodical", "Periodical",
"http://purl.org/ontology/bibo/PersonalCommunicationDocument", "Personal Communication Document",
"http://purl.org/ontology/bibo/Proceedings", "Proceedings",
"http://purl.obolibrary.org/obo/OBI_0000272", "protocol",
"http://purl.org/ontology/bibo/Quote", "Quote",
"http://purl.org/ontology/bibo/ReferenceSource", "Reference Source",
"http://purl.org/ontology/bibo/Report", "Report",
"http://vivoweb.org/ontology/core#ResearchProposal", "Research Proposal",
"http://vivoweb.org/ontology/core#Review", "Review",
"http://vivoweb.org/ontology/core#Score", "Score",
"http://vivoweb.org/ontology/core#Screenplay", "Screenplay",
"http://purl.org/ontology/bibo/Series", "Series",
"http://purl.org/ontology/bibo/Slide", "Slide",
"http://purl.org/ontology/bibo/Slideshow", "Slideshow",
"http://vivoweb.org/ontology/core#Speech", "Speech",
"http://purl.org/ontology/bibo/Standard", "Standard",
"http://purl.org/ontology/bibo/Statute", "Statute",
"http://purl.org/ontology/bibo/Thesis", "Thesis",
"http://vivoweb.org/ontology/core#Translation", "Translation",
"http://vivoweb.org/ontology/core#Video", "Video",
"http://purl.org/ontology/bibo/Webpage", "Webpage",
"http://purl.org/ontology/bibo/Website", "Website",
"http://vivoweb.org/ontology/core#WorkingPaper", "Working Paper"
);
}
//isShowRoleLabelField remains true for this so doesn't need to be overwritten

View file

@ -3,7 +3,7 @@
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
public class AddServiceProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
@ -21,11 +21,44 @@ public class AddServiceProviderRoleToPersonGenerator extends AddRoleToPersonTwoS
/** Service Provider role involves hard-coded options for the
* "right side" of the role or activity. */
@Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new
ChildVClassesOptions(OPTION_CLASS_URI)
.setDefaultOptionLabel("Select type");
}
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions(
"","Select type",
"http://vivoweb.org/ontology/core#AcademicDepartment","Academic Department",
"http://vivoweb.org/ontology/core#Association","Association",
"http://vivoweb.org/ontology/core#Center","Center",
"http://vivoweb.org/ontology/core#ClinicalOrganization","Clinical Organization",
"http://vivoweb.org/ontology/core#College","College",
"http://vivoweb.org/ontology/core#Committee","Committee",
"http://vivoweb.org/ontology/core#Company","Company",
"http://vivoweb.org/ontology/core#Consortium","Consortium",
"http://vivoweb.org/ontology/core#CoreLaboratory","Core Laboratory",
"http://vivoweb.org/ontology/core#Department","Department",
"http://vivoweb.org/ontology/core#Division","Division",
"http://purl.org/NET/c4dm/event.owl#Event","Event",
"http://vivoweb.org/ontology/core#ExtensionUnit","Extension Unit",
"http://vivoweb.org/ontology/core#Foundation","Foundation",
"http://vivoweb.org/ontology/core#FundingOrganization","Funding Organization",
"http://vivoweb.org/ontology/core#GovernmentAgency","Government Agency",
"http://xmlns.com/foaf/0.1/Group","Group",
"http://vivoweb.org/ontology/core#Hospital","Hospital",
"http://vivoweb.org/ontology/core#Institute","Institute",
"http://vivoweb.org/ontology/core#Laboratory","Laboratory",
"http://vivoweb.org/ontology/core#Library","Library",
"http://purl.obolibrary.org/obo/OBI_0000835","Manufacturer",
"http://vivoweb.org/ontology/core#Museum","Museum",
"http://xmlns.com/foaf/0.1/Organization","Organization",
"http://vivoweb.org/ontology/core#PrivateCompany","Private Company",
"http://vivoweb.org/ontology/core#Program","Program",
"http://vivoweb.org/ontology/core#Publisher","Publisher",
"http://vivoweb.org/ontology/core#ResearchOrganization","Research Organization",
"http://vivoweb.org/ontology/core#School","School",
"http://vivoweb.org/ontology/core#Team","Team",
"http://vivoweb.org/ontology/core#ServiceProvidingLaboratory","Service Providing Lab",
"http://vivoweb.org/ontology/core#StudentOrganization","Student Organization",
"http://purl.obolibrary.org/obo/ERO_0000565","Technology Transfer Office",
"http://vivoweb.org/ontology/core#University","University");
}
@Override
boolean isShowRoleLabelField(){return true;}

View file

@ -31,6 +31,11 @@ public class IndividualTemplateModel extends BaseIndividualTemplateModel {
private static final String FOAF = "http://xmlns.com/foaf/0.1/";
private static final String PERSON_CLASS = FOAF + "Person";
private static final String AWARD_CLASS = "http://vivoweb.org/ontology/core#Award";
private static final String DEGREE_CLASS = "http://vivoweb.org/ontology/core#AcademicDegree";
private static final String CONTACT_CLASS = "http://purl.obolibrary.org/obo/ARG_2000376";
private static final String CREDENTIAL_CLASS = "http://vivoweb.org/ontology/core#Credential";
private static final String DTP_CLASS = "http://vivoweb.org/ontology/core#DateTimeValuePrecision";
private static final String ORGANIZATION_CLASS = FOAF + "Organization";
private static final String BASE_VISUALIZATION_URL =
UrlBuilder.getUrl(Route.VISUALIZATION_SHORT.path());
@ -147,6 +152,14 @@ public class IndividualTemplateModel extends BaseIndividualTemplateModel {
}
/* Template methods (for efficiency, not pre-computed) */
public boolean conceptSubclass() {
if ( isVClass(AWARD_CLASS) || isVClass(DEGREE_CLASS) ||isVClass(CONTACT_CLASS) || isVClass(CREDENTIAL_CLASS) || isVClass(DTP_CLASS) ) {
return true;
}
else {
return false;
}
}
public boolean person() {
return isVClass(PERSON_CLASS);

View file

@ -882,3 +882,4 @@ administering_organization_for = administering organization for
missing_credential = missing credential
grant_administered_by = grant being administered by
missing_grant = missing grant
editor_of_entry = editor of entry for