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
|
@Override
|
||||||
public List<Individual> getIndividualsByDataProperty(String dataPropertyUri,
|
public List<Individual> getIndividualsByDataProperty(String dataPropertyUri,
|
||||||
String value){
|
String value){
|
||||||
|
OntModel fullModel = getOntModelSelector().getFullModel();
|
||||||
|
|
||||||
Property prop = null;
|
Property prop = null;
|
||||||
if( RDFS.label.getURI().equals( dataPropertyUri )){
|
if( RDFS.label.getURI().equals( dataPropertyUri )){
|
||||||
prop = RDFS.label;
|
prop = RDFS.label;
|
||||||
}else{
|
}else{
|
||||||
prop = getOntModel().getProperty(dataPropertyUri);
|
prop = fullModel.getProperty(dataPropertyUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( prop == null ) {
|
if( prop == null ) {
|
||||||
|
@ -340,20 +342,20 @@ public class IndividualDaoSDB extends IndividualDaoJena {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
Literal litv1 = getOntModel().createLiteral(value);
|
Literal litv1 = fullModel.createLiteral(value);
|
||||||
Literal litv2 = getOntModel().createTypedLiteral(value);
|
Literal litv2 = fullModel.createTypedLiteral(value);
|
||||||
|
|
||||||
//warning: this assumes that any language tags will be EN
|
//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 =
|
HashMap<String,Individual> individualsMap =
|
||||||
new HashMap<String, Individual>();
|
new HashMap<String, Individual>();
|
||||||
|
|
||||||
getOntModel().enterCriticalSection(Lock.READ);
|
fullModel.enterCriticalSection(Lock.READ);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try{
|
try{
|
||||||
StmtIterator stmts
|
StmtIterator stmts
|
||||||
= getOntModel().listStatements((Resource)null, prop, litv1);
|
= fullModel.listStatements((Resource)null, prop, litv1);
|
||||||
while(stmts.hasNext()){
|
while(stmts.hasNext()){
|
||||||
count++;
|
count++;
|
||||||
Statement stmt = stmts.nextStatement();
|
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()){
|
while(stmts.hasNext()){
|
||||||
count++;
|
count++;
|
||||||
Statement stmt = stmts.nextStatement();
|
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()){
|
while(stmts.hasNext()){
|
||||||
count++;
|
count++;
|
||||||
Statement stmt = stmts.nextStatement();
|
Statement stmt = stmts.nextStatement();
|
||||||
|
@ -425,7 +427,7 @@ public class IndividualDaoSDB extends IndividualDaoJena {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
getOntModel().leaveCriticalSection();
|
fullModel.leaveCriticalSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Individual> rv = new ArrayList(individualsMap.size());
|
List<Individual> rv = new ArrayList(individualsMap.size());
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
${i18n().manage_affiliated_people_link}
|
${i18n().manage_affiliated_people_link}
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
|
<#elseif rangeClass == "Name" && property.statements?has_content && editable >
|
||||||
|
<h3 id="${property.localName}">${property.name} <@p.verboseDisplay property /> </h3>
|
||||||
<#else>
|
<#else>
|
||||||
<h3 id="${property.localName}">${property.name} <@p.addLink property editable /> <@p.verboseDisplay property /> </h3>
|
<h3 id="${property.localName}">${property.name} <@p.addLink property editable /> <@p.verboseDisplay property /> </h3>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
Loading…
Add table
Reference in a new issue