Merge branch 'develop' of https://github.com/vivo-project/Vitro into develop
This commit is contained in:
commit
61b0f5d9ea
2 changed files with 14 additions and 10 deletions
|
@ -321,11 +321,13 @@ public class IndividualDaoSDB extends IndividualDaoJena {
|
|||
@Override
|
||||
public List<Individual> getIndividualsByDataProperty(String dataPropertyUri,
|
||||
String value){
|
||||
OntModel fullModel = getOntModelSelector().getFullModel();
|
||||
|
||||
Property prop = null;
|
||||
if( RDFS.label.getURI().equals( dataPropertyUri )){
|
||||
prop = RDFS.label;
|
||||
}else{
|
||||
prop = getOntModel().getProperty(dataPropertyUri);
|
||||
prop = fullModel.getProperty(dataPropertyUri);
|
||||
}
|
||||
|
||||
if( prop == null ) {
|
||||
|
@ -340,20 +342,20 @@ public class IndividualDaoSDB extends IndividualDaoJena {
|
|||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
Literal litv1 = getOntModel().createLiteral(value);
|
||||
Literal litv2 = getOntModel().createTypedLiteral(value);
|
||||
Literal litv1 = fullModel.createLiteral(value);
|
||||
Literal litv2 = fullModel.createTypedLiteral(value);
|
||||
|
||||
//warning: this assumes that any language tags will be EN
|
||||
Literal litv3 = getOntModel().createLiteral(value,"EN");
|
||||
Literal litv3 = fullModel.createLiteral(value,"EN");
|
||||
|
||||
HashMap<String,Individual> individualsMap =
|
||||
new HashMap<String, Individual>();
|
||||
|
||||
getOntModel().enterCriticalSection(Lock.READ);
|
||||
fullModel.enterCriticalSection(Lock.READ);
|
||||
int count = 0;
|
||||
try{
|
||||
StmtIterator stmts
|
||||
= getOntModel().listStatements((Resource)null, prop, litv1);
|
||||
= fullModel.listStatements((Resource)null, prop, litv1);
|
||||
while(stmts.hasNext()){
|
||||
count++;
|
||||
Statement stmt = stmts.nextStatement();
|
||||
|
@ -377,7 +379,7 @@ public class IndividualDaoSDB extends IndividualDaoJena {
|
|||
}
|
||||
}
|
||||
|
||||
stmts = getOntModel().listStatements((Resource)null, prop, litv2);
|
||||
stmts = fullModel.listStatements((Resource)null, prop, litv2);
|
||||
while(stmts.hasNext()){
|
||||
count++;
|
||||
Statement stmt = stmts.nextStatement();
|
||||
|
@ -401,7 +403,7 @@ public class IndividualDaoSDB extends IndividualDaoJena {
|
|||
}
|
||||
}
|
||||
|
||||
stmts = getOntModel().listStatements((Resource)null, prop, litv3);
|
||||
stmts = fullModel.listStatements((Resource)null, prop, litv3);
|
||||
while(stmts.hasNext()){
|
||||
count++;
|
||||
Statement stmt = stmts.nextStatement();
|
||||
|
@ -425,7 +427,7 @@ public class IndividualDaoSDB extends IndividualDaoJena {
|
|||
}
|
||||
}
|
||||
} finally {
|
||||
getOntModel().leaveCriticalSection();
|
||||
fullModel.leaveCriticalSection();
|
||||
}
|
||||
|
||||
List<Individual> rv = new ArrayList(individualsMap.size());
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
${i18n().manage_affiliated_people_link}
|
||||
</a>
|
||||
</h3>
|
||||
<#elseif rangeClass == "Name" && property.statements?has_content && editable >
|
||||
<h3 id="${property.localName}">${property.name} <@p.verboseDisplay property /> </h3>
|
||||
<#else>
|
||||
<h3 id="${property.localName}">${property.name} <@p.addLink property editable /> <@p.verboseDisplay property /> </h3>
|
||||
</#if>
|
||||
|
|
Loading…
Add table
Reference in a new issue