Removing extraneous alarming messages about Property edit label NIHVIVO-2010
This commit is contained in:
parent
1e2035b535
commit
f510462ad2
1 changed files with 4 additions and 12 deletions
|
@ -51,27 +51,19 @@ public class Property extends BaseResourceBean {
|
|||
* Sorts Property objects, by property rank, then alphanumeric.
|
||||
* @author bdc34
|
||||
*/
|
||||
public static class DisplayComparatorIgnoringPropertyGroup implements Comparator {
|
||||
|
||||
public static class DisplayComparatorIgnoringPropertyGroup implements Comparator {
|
||||
public int compare(Object o1, Object o2) {
|
||||
//log.warn("starting property display comparator; ignoring group ");
|
||||
Property p1 = o1 == null ? null : (Property) o1;
|
||||
Property p2 = o2 == null ? null : (Property) o2;
|
||||
if (p1==null || p2==null) {
|
||||
log.error("Null property passed to DisplayComparatorIgnoringPropertyGroup");
|
||||
if (p1==null || p2==null) {
|
||||
return 0;
|
||||
}
|
||||
//log.warn("comparing property "+p1.getLocalName()+" (rank "+determineDisplayRank(p1)+") to property "+p2.getLocalName()+" (rank "+determineDisplayRank(p2)+") ...");
|
||||
int diff = determineDisplayRank(p1) - determineDisplayRank(p2);
|
||||
if (diff==0) {
|
||||
String p1Str = p1.getLabel() == null ? p1.getURI() : p1.getLabel();
|
||||
if (p1.getLabel()==null) {
|
||||
log.warn("null edit label for property "+p1.getURI());
|
||||
}
|
||||
String p2Str = p2.getLabel() == null ? p2.getURI() : p2.getLabel();
|
||||
if (p2.getLabel() == null) {
|
||||
log.warn("null edit label for property "+p2.getURI());
|
||||
}
|
||||
String p1Str = p1.getLabel() == null ? p1.getURI() : p1.getLabel();
|
||||
String p2Str = p2.getLabel() == null ? p2.getURI() : p2.getLabel();
|
||||
return p1Str.compareTo(p2Str);
|
||||
}
|
||||
return diff;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue