diff --git a/productMods/templates/freemarker/body/individual/manageLabelsForIndividualAddForm.ftl b/productMods/templates/freemarker/body/individual/manageLabelsForIndividualAddForm.ftl new file mode 100644 index 00000000..9c0985ed --- /dev/null +++ b/productMods/templates/freemarker/body/individual/manageLabelsForIndividualAddForm.ftl @@ -0,0 +1,40 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#-- Custom form for managing labels for individuals - specific to VIVO which handles people as well --> +<#assign isPersonType = editConfiguration.pageData.isPersonType /> +
+

${i18n().add_label}

+ <#if isPersonType = "true"> +

+ + +

+ +

+ + +

+ <#else> +

+ + +

+ + + + + + + + ${i18n().or} + ${i18n().cancel_link} + +

* ${i18n().required_fields}

+
\ No newline at end of file diff --git a/productMods/templates/freemarker/body/individual/manageLabelsForIndividualSubmissionErrors.ftl b/productMods/templates/freemarker/body/individual/manageLabelsForIndividualSubmissionErrors.ftl new file mode 100644 index 00000000..c5b8b144 --- /dev/null +++ b/productMods/templates/freemarker/body/individual/manageLabelsForIndividualSubmissionErrors.ftl @@ -0,0 +1,27 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#--VIVO specific errors for person--> +<#import "lib-vivo-form.ftl" as lvf> + +<#--Get existing value for specific data literals and uris, in case the form is returned because of an error--> +<#assign firstNameValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "firstName")/> +<#assign lastNameValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "lastName")/> +<#assign labelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "label")/> +<#assign newLabelLanguageValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "newLabelLanguage")/> + +<#if submissionErrors?has_content > + + \ No newline at end of file diff --git a/src/edu/cornell/mannlib/semservices/service/impl/AgrovocService.java b/src/edu/cornell/mannlib/semservices/service/impl/AgrovocService.java index 37452846..003aa26b 100644 --- a/src/edu/cornell/mannlib/semservices/service/impl/AgrovocService.java +++ b/src/edu/cornell/mannlib/semservices/service/impl/AgrovocService.java @@ -425,6 +425,7 @@ public class AgrovocService implements ExternalConceptService { } protected String getDbpediaDescription(String uri) throws Exception{ + String descriptionSource = " (Source: DBpedia)"; String description = new String(); String qs = "" + "PREFIX rdfs: \n" @@ -476,7 +477,8 @@ public class AgrovocService implements ExternalConceptService { } catch (Exception ex) { throw ex; } - return description; + //Adding source so it is clear that this description comes from DBPedia + return description + descriptionSource; } /** diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java index 23d2053c..a867a91e 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java @@ -47,10 +47,9 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements private Log log = LogFactory.getLog(AddAssociatedConceptGenerator.class); private String template = "addAssociatedConcept.ftl"; - private static String SKOSConceptType = "http://www.w3.org/2004/02/skos/core#Concept"; //TODO: Set this to a dynamic mechanism private static String VIVOCore = "http://vivoweb.org/ontology/core#"; - + private static String SKOSConceptType = "http://www.w3.org/2004/02/skos/core#Concept"; @Override public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, HttpSession session) { EditConfigurationVTwo editConfiguration = new EditConfigurationVTwo(); @@ -173,13 +172,13 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements //Optional N3, includes possibility of semantic type which may or may not be included //label and source are independent of semantic type + //concept semantic type uri is a placeholder which is actually processed in the sparql update preprocessor private List generateN3Optional() { return list("?conceptNode <" + RDFS.label.getURI() + "> ?conceptLabel .\n" + "?conceptNode <" + RDFS.isDefinedBy.getURI() + "> ?conceptSource .", - "?conceptNode <" + VIVOCore + "hasConceptSemanticType> ?conceptSemanticTypeURI ." + - "?conceptSemanticTypeURI <" + VIVOCore + "isConceptSemanticTypeOf> ?conceptNode ." + + "?conceptNode <" + RDF.type + "> ?conceptSemanticTypeURI ." + "?conceptSemanticTypeURI <" + RDFS.label.getURI() + "> ?conceptSemanticTypeLabel ." + - "?conceptSemanticTypeURI <" + RDF.type.getURI() + "> <" + VIVOCore + "ConceptSemanticType> ." + "?conceptSemanticTypeURI <" + RDFS.subClassOf + "> <" + SKOSConceptType + "> ." ); }