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

This commit is contained in:
hudajkhan 2013-11-11 18:28:30 -05:00
commit 815215fbd7
3 changed files with 11 additions and 9 deletions

View file

@ -346,7 +346,9 @@ public class KnowledgeBaseUpdater {
} }
public static boolean isUpdatableABoxGraph(String graphName) { public static boolean isUpdatableABoxGraph(String graphName) {
return (!graphName.contains("tbox") && !graphName.contains("filegraph")); return (graphName != null && !graphName.contains("tbox")
&& !graphName.contains("filegraph")
&& !graphName.contains("x-arq:UnionGraph"));
} }
/** /**

View file

@ -141,7 +141,7 @@ public class UpdateKnowledgeBase implements ServletContextListener {
KnowledgeBaseUpdater ontologyUpdater = new KnowledgeBaseUpdater(settings); KnowledgeBaseUpdater ontologyUpdater = new KnowledgeBaseUpdater(settings);
boolean requiredUpdate = ontologyUpdater.updateRequired(ctx); boolean requiredUpdate = ontologyUpdater.updateRequired(ctx);
if(!JenaDataSourceSetupBase.isFirstStartup()) { if(requiredUpdate && !JenaDataSourceSetupBase.isFirstStartup()) {
try { try {
ctx.setAttribute(KBM_REQURIED_AT_STARTUP, Boolean.TRUE); ctx.setAttribute(KBM_REQURIED_AT_STARTUP, Boolean.TRUE);
migrationChangesMade = ontologyUpdater.update(ctx); migrationChangesMade = ontologyUpdater.update(ctx);

View file

@ -171,22 +171,22 @@ name will be used as the label. -->
<#macro editingLinks propertyLocalName propertyName statement editable rangeUri=""> <#macro editingLinks propertyLocalName propertyName statement editable rangeUri="">
<#if editable > <#if editable >
<#if (!rangeUri?contains("Authorship") && !rangeUri?contains("URL") && !rangeUri?contains("Editorship") && propertyLocalName != "hasResearchArea")> <#if (!rangeUri?contains("Authorship") && !rangeUri?contains("URL") && !rangeUri?contains("Editorship") && propertyLocalName != "hasResearchArea")>
<@editLink propertyLocalName propertyName statement /> <@editLink propertyLocalName propertyName statement rangeUri/>
<@deleteLink propertyLocalName propertyName statement /> <@deleteLink propertyLocalName propertyName statement />
</#if> </#if>
</#if> </#if>
</#macro> </#macro>
<#macro editLink propertyLocalName propertyName statement> <#macro editLink propertyLocalName propertyName statement rangeUri="">
<#if propertyLocalName?contains("ARG_2000028")> <#if propertyLocalName?contains("ARG_2000028")>
<#if propertyName?contains("mailing address")> <#if rangeUri?contains("Address")>
<#local url = statement.editUrl + "&addressUri=" + "${statement.address!}"> <#local url = statement.editUrl + "&addressUri=" + "${statement.address!}">
<#elseif propertyName?contains("phone") || propertyName?contains("fax")> <#elseif rangeUri?contains("Telephone") || rangeUri?contains("Fax")>
<#local url = statement.editUrl + "&phoneUri=" + "${statement.phone!}"> <#local url = statement.editUrl + "&phoneUri=" + "${statement.phone!}">
<#elseif propertyName?contains("primary email") || propertyName?contains("additional emails")> <#elseif rangeUri?contains("Work") || rangeUri?contains("Email")>
<#local url = statement.editUrl + "&emailUri=" + "${statement.email!}"> <#local url = statement.editUrl + "&emailUri=" + "${statement.email!}">
<#elseif propertyName?contains("full name")> <#elseif rangeUri?contains("Name")>
<#local url = statement.editUrl + "&fullNameUri=" + "${statement.fullName!}"> <#local url = statement.editUrl + "&fullNameUri=" + "${statement.fullName!}">
<#elseif propertyName?contains("preferred title")> <#elseif rangeUri?contains("Title")>
<#local url = statement.editUrl + "&titleUri=" + "${statement.title!}"> <#local url = statement.editUrl + "&titleUri=" + "${statement.title!}">
</#if> </#if>
<#else> <#else>