updates to remove deletion icon for research area/subject area and to update user defined concept generator to include concept node to prevent recreation of concept

This commit is contained in:
hjkhjk54 2011-12-05 13:58:37 +00:00
parent 5447b0a0c0
commit 3a65802419
4 changed files with 16 additions and 2 deletions

View file

@ -21,7 +21,7 @@
<div class="acSelection"> <div class="acSelection">
<p class="inline"> <p class="inline">
<label>Selected Publication:</label> <label>Selected Concept:</label>
<span class="acSelectionInfo"></span> <span class="acSelectionInfo"></span>
<a href="${urls.base}/individual?uri=" class="verifyMatch">(Verify this match)</a> <a href="${urls.base}/individual?uri=" class="verifyMatch">(Verify this match)</a>
</p> </p>

View file

@ -235,6 +235,7 @@ public class AddUserDefinedConceptGenerator extends VivoBaseGenerator implement
List<String> literalsOnForm = new ArrayList<String>(); List<String> literalsOnForm = new ArrayList<String>();
//The URI of the node that defines the concept //The URI of the node that defines the concept
urisOnForm.add("conceptNode"); urisOnForm.add("conceptNode");
editConfiguration.setUrisOnform(urisOnForm);
//In case the user defines a new concept, will add a concept label //In case the user defines a new concept, will add a concept label
literalsOnForm.add("conceptLabel"); literalsOnForm.add("conceptLabel");
editConfiguration.setLiteralsOnForm(literalsOnForm); editConfiguration.setLiteralsOnForm(literalsOnForm);

View file

@ -39,7 +39,7 @@ public class ConceptSearchServiceUtils {
HashMap<String, VocabSourceDescription> map = new HashMap<String, VocabSourceDescription>(); HashMap<String, VocabSourceDescription> map = new HashMap<String, VocabSourceDescription>();
map.put(UMLSVocabSource, new VocabSourceDescription("UMLS", UMLSVocabSource, "http://www.nlm.nih.gov/research/umls/", "Unified Medical Language System")); map.put(UMLSVocabSource, new VocabSourceDescription("UMLS", UMLSVocabSource, "http://www.nlm.nih.gov/research/umls/", "Unified Medical Language System"));
//Commenting out agrovoc for now until implementation is updated //Commenting out agrovoc for now until implementation is updated
map.put(AgrovocVocabSource, new VocabSourceDescription("AGROVOC", AgrovocVocabSource, "http://www.fao.org/agrovoc/", "Agricultural Vocabulary")); // map.put(AgrovocVocabSource, new VocabSourceDescription("AGROVOC", AgrovocVocabSource, "http://www.fao.org/agrovoc/", "Agricultural Vocabulary"));
map.put(GemetVocabSource, new VocabSourceDescription("GEMET", GemetVocabSource, "http://www.eionet.europa.eu/gemet", "GEneral Multilingual Environmental Thesaurus")); map.put(GemetVocabSource, new VocabSourceDescription("GEMET", GemetVocabSource, "http://www.eionet.europa.eu/gemet", "GEneral Multilingual Environmental Thesaurus"));
return map; return map;
} }

View file

@ -29,6 +29,11 @@ public class VivoPolicy extends DefaultInconclusivePolicy{
private static final String AUTHORSHIP_TO_PUB = CORE + "linkedInformationResource"; private static final String AUTHORSHIP_TO_PUB = CORE + "linkedInformationResource";
private static final String INDIVIDUAL_TO_WEBPAGE = CORE + "webpage"; private static final String INDIVIDUAL_TO_WEBPAGE = CORE + "webpage";
private static final String WEBPAGE_TO_INDIVIDUAL = CORE + "webpageOf"; private static final String WEBPAGE_TO_INDIVIDUAL = CORE + "webpageOf";
private static final String HAS_RESEARCH_AREA = CORE + "hasResearchArea";
private static final String HAS_SUBJECT_AREA = CORE + "hasSubjectArea";
private static final String RESEARCH_AREA_OF = CORE + "researchAreaOf";
private static final String SUBJECT_AREA_OF = CORE + "subjectAreaOf";
@Override @Override
public PolicyDecision isAuthorized(IdentifierBundle whoToAuth, public PolicyDecision isAuthorized(IdentifierBundle whoToAuth,
@ -65,6 +70,14 @@ public class VivoPolicy extends DefaultInconclusivePolicy{
return new BasicPolicyDecision(Authorization.UNAUTHORIZED, return new BasicPolicyDecision(Authorization.UNAUTHORIZED,
"Use the custom edit form for core:webpage"); "Use the custom edit form for core:webpage");
} }
else if ( HAS_RESEARCH_AREA.equals( predicateUri ) || RESEARCH_AREA_OF.equals( predicateUri )) {
return new BasicPolicyDecision(Authorization.UNAUTHORIZED,
"Use the custom edit form for core:hasResearchArea");
}
else if ( HAS_SUBJECT_AREA.equals( predicateUri ) || SUBJECT_AREA_OF.equals( predicateUri )) {
return new BasicPolicyDecision(Authorization.UNAUTHORIZED,
"Use the custom edit form for core:hasSubjectArea");
}
} }
else if( whatToAuth instanceof AddObjectPropStmt ){ else if( whatToAuth instanceof AddObjectPropStmt ){