NIHVIVO-3504 improved retrieval of display rank values for class and property groups
This commit is contained in:
parent
4c56ce9ce1
commit
a16f504315
2 changed files with 4 additions and 27 deletions
|
@ -270,23 +270,9 @@ public class PropertyGroupDaoJena extends JenaBaseDao implements PropertyGroupDa
|
||||||
group.setURI(groupInd.getURI());
|
group.setURI(groupInd.getURI());
|
||||||
group.setNamespace(groupInd.getNameSpace());
|
group.setNamespace(groupInd.getNameSpace());
|
||||||
group.setLocalName(groupInd.getLocalName());
|
group.setLocalName(groupInd.getLocalName());
|
||||||
try {
|
group.setPublicDescription(getPropertyStringValue(
|
||||||
if (groupInd.getProperty(PUBLIC_DESCRIPTION_ANNOT)!=null) {
|
groupInd, PUBLIC_DESCRIPTION_ANNOT));
|
||||||
// without the convenience method, just for reference
|
group.setDisplayRank(getPropertyNonNegativeIntValue(groupInd, DISPLAY_RANK));
|
||||||
// String valueStr = ((Literal)groupInd.getProperty(PUBLIC_DESCRIPTION_ANNOT).getObject()).getLexicalForm();
|
|
||||||
String valueStr = null;
|
|
||||||
if ((valueStr=getPropertyStringValue(groupInd,PUBLIC_DESCRIPTION_ANNOT)) != null) {
|
|
||||||
group.setPublicDescription(valueStr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("error setting public description in groupFromGroupIndividual() for "+groupInd.getURI());
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
group.setDisplayRank(Integer.decode(((Literal)(groupInd.getProperty(DISPLAY_RANK).getObject())).getString()).intValue());
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.debug("error setting display rank in groupFromGroupIndividual() for "+groupInd.getURI());
|
|
||||||
}
|
|
||||||
return group;
|
return group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -180,16 +180,7 @@ public class VClassGroupDaoJena extends JenaBaseDao implements VClassGroupDao {
|
||||||
group.setURI(groupInd.getURI());
|
group.setURI(groupInd.getURI());
|
||||||
group.setNamespace(groupInd.getNameSpace());
|
group.setNamespace(groupInd.getNameSpace());
|
||||||
group.setLocalName(groupInd.getLocalName());
|
group.setLocalName(groupInd.getLocalName());
|
||||||
try {
|
group.setDisplayRank(getPropertyNonNegativeIntValue(groupInd, DISPLAY_RANK));
|
||||||
DatatypeProperty drProp = (ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM)).createDatatypeProperty(VitroVocabulary.DISPLAY_RANK);
|
|
||||||
if( drProp == null ){
|
|
||||||
log.debug("No display rank in model for " + groupInd.getURI() );
|
|
||||||
}else{
|
|
||||||
group.setDisplayRank(Integer.decode(((Literal)(groupInd.getProperty(drProp).getObject())).getString()).intValue());
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.warn("Cannot get display rank for " + groupInd.getURI() + " " + e.getMessage() );
|
|
||||||
}
|
|
||||||
return group;
|
return group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue