NIHVIVO-3399 fixed bugs in label handling in ApplicationDaoJena
This commit is contained in:
parent
5d7f8486b8
commit
a09a99c597
1 changed files with 5 additions and 3 deletions
|
@ -52,8 +52,10 @@ public class ApplicationDaoJena extends JenaBaseDao implements ApplicationDao {
|
||||||
}
|
}
|
||||||
ontModel.enterCriticalSection(Lock.READ);
|
ontModel.enterCriticalSection(Lock.READ);
|
||||||
try {
|
try {
|
||||||
|
String appName = appInd.getLabel(null);
|
||||||
application.setApplicationName(appInd.getLabel(null));
|
if (appName != null) {
|
||||||
|
application.setApplicationName(appName);
|
||||||
|
} // else leave as default
|
||||||
application.setAboutText(getPropertyStringValue(
|
application.setAboutText(getPropertyStringValue(
|
||||||
appInd, APPLICATION_ABOUTTEXT));
|
appInd, APPLICATION_ABOUTTEXT));
|
||||||
application.setAcknowledgeText(getPropertyStringValue(
|
application.setAcknowledgeText(getPropertyStringValue(
|
||||||
|
@ -82,7 +84,7 @@ public class ApplicationDaoJena extends JenaBaseDao implements ApplicationDao {
|
||||||
Individual appInd = ontModel.getIndividual(
|
Individual appInd = ontModel.getIndividual(
|
||||||
getApplicationResourceURI());
|
getApplicationResourceURI());
|
||||||
if (appInd == null) {
|
if (appInd == null) {
|
||||||
appInd = getOntModel().createIndividual(
|
appInd = ontModel.createIndividual(
|
||||||
getApplicationResourceURI(), PORTAL);
|
getApplicationResourceURI(), PORTAL);
|
||||||
}
|
}
|
||||||
ontModel.enterCriticalSection(Lock.WRITE);
|
ontModel.enterCriticalSection(Lock.WRITE);
|
||||||
|
|
Loading…
Add table
Reference in a new issue