updates for page management and adding rdfs prefix to menu.n3

This commit is contained in:
hjkhjk54 2012-08-20 19:26:32 +00:00
parent 34858fcadb
commit b0f4e7e820
6 changed files with 101 additions and 3 deletions

View file

@ -80,7 +80,7 @@ public class IndividualsForClassesDataGetter extends DataGetterBase implements D
protected Map<String, Object> getClassIntersectionsMap(Model displayModel) { protected Map<String, Object> getClassIntersectionsMap(Model displayModel) {
QuerySolutionMap initBindings = new QuerySolutionMap(); QuerySolutionMap initBindings = new QuerySolutionMap();
initBindings.add("dataGetterURI", ResourceFactory.createResource(this.dataGetterURI)); initBindings.add("dataGetterUri", ResourceFactory.createResource(this.dataGetterURI));
try { try {
QueryExecution qexec = QueryExecutionFactory.create( dataGetterQuery, displayModel , initBindings); QueryExecution qexec = QueryExecutionFactory.create( dataGetterQuery, displayModel , initBindings);
Map<String, Object> classesAndRestrictions = new HashMap<String, Object>(); Map<String, Object> classesAndRestrictions = new HashMap<String, Object>();

View file

@ -3,6 +3,7 @@
@prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> . @prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
### This file defines the default menu for vitro. ### ### This file defines the default menu for vitro. ###

View file

@ -2,4 +2,4 @@
<#-- Scripts for class group browsing --> <#-- Scripts for class group browsing -->
<#--Replaces Vitro's processing for individuals for classes with VIVO's processing internal classes--> <#--Replaces Vitro's processing for individuals for classes with VIVO's processing internal classes-->
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processClassGroupDataGetterContent.js"></script>')} ${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processClassGroupDataGetterContent.js"></script>')}
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processInternalClassDataGetterContent.js"></script>')} ${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processIndividualsForClassesDataGetterContent.js"></script>')}

View file

@ -0,0 +1,2 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->

View file

@ -1,5 +1,5 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> <#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#import "lib-vivo-form.ftl" as lvf> <#import "lib-vitro-form.ftl" as lvf>
<#--------Set up variables--------> <#--------Set up variables-------->
<#assign pageData = editConfiguration.pageData /> <#assign pageData = editConfiguration.pageData />

View file

@ -0,0 +1,95 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Macros and functions for form controls -->
<#-- Output: html notifying the user that the browser is an unsupported version -->
<#macro unsupportedBrowser urlsBase>
<div id="ie67DisableWrapper">
<div id="ie67DisableContent">
<img src="${urlsBase}/images/iconAlertBig.png" alt="Alert Icon"/>
<p>This form is not supported in versions of Internet Explorer below version 8. Please upgrade your browser, or
switch to another browser, such as FireFox.</p>
</div>
</div>
</#macro>
<#--Given an edit configuration template object, get the current value for a uri field using the field name-->
<#function getEditConfigLiteralValue config varName>
<#local literalValues = config.existingLiteralValues >
<#if (literalValues?keys?seq_contains(varName)) && (literalValues[varName]?size > 0)>
<#return literalValues[varName][0] >
</#if>
<#return "">
</#function>
<#--Given an edit configuration template object, get the current value for a literal field using the field name-->
<#function getEditConfigUriValue config varName>
<#local uriValues = config.existingUriValues />
<#if (uriValues?keys?seq_contains(varName)) && (uriValues[varName]?size > 0)>
<#return uriValues[varName][0] >
</#if>
<#return "">
</#function>
<#--Now check whether a given value returns either a uri or a literal value, if one empty then use other and
return - returns empty string if no value found-->
<#function getEditConfigValue config varName>
<#local returnValue = getEditConfigUriValue(config, varName) />
<#if (returnValue?length = 0)>
<#local returnValue = getEditConfigLiteralValue(config, varName) />
</#if>
<#return returnValue>
</#function>
<#--Given edit submission object find values-->
<#function getEditSubmissionLiteralValue submission varName>
<#local literalValues = submission.literalsFromForm >
<#if (literalValues?keys?seq_contains(varName)) && (literalValues[varName]?size > 0)>
<#return literalValues[varName][0] >
</#if>
<#return "">
</#function>
<#--Given an edit configuration template object, get the current value for a literal field using the field name-->
<#function getEditSubmissionUriValue submission varName>
<#local uriValues = submission.urisFromForm />
<#if (uriValues?keys?seq_contains(varName)) && (uriValues[varName]?size > 0)>
<#return uriValues[varName][0] >
</#if>
<#return "">
</#function>
<#--Get edit submission value for either literal or uri-->
<#function getEditSubmissionValue submission varName>
<#local returnValue = getEditSubmissionUriValue(submission, varName) />
<#if (returnValue?length = 0)>
<#local returnValue = getEditSubmissionLiteralValue(submission, varName) />
</#if>
<#return returnValue>
</#function>
<#--Get the value for the form field, checking edit submission first and then edit configuration-->
<#function getFormFieldValue submission config varName>
<#local returnValue = "">
<#if submission?has_content && submission.submissionExists = true>
<#local returnValue = getEditSubmissionValue(submission varName)>
<#else>
<#local returnValue = getEditConfigValue(config varName)>
</#if>
<#return returnValue>
</#function>
<#--Check if submission error exists for a field name-->
<#function submissionErrorExists editSubmission fieldName>
<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content>
<#if editSubmission.validationErrors?keys?seq_contains(fieldName)>
<#return true>
</#if>
</#if>
<#return false>
</#function>