3535 */
3636abstract class AbstractOntologyResource implements OntologyResource {
3737
38- protected static Logger log = LoggerFactory .getLogger ( AbstractOntologyResource .class );
38+ protected static final Logger log = LoggerFactory .getLogger ( AbstractOntologyResource .class );
3939
4040 private static final Comparator <OntologyResource > comparator = Comparator
4141 .comparing ( OntologyResource ::getScore , nullsLast ( reverseOrder () ) )
@@ -60,6 +60,12 @@ public String getUri() {
6060 return res .getURI ();
6161 }
6262
63+ @ Override
64+ public String getLocalName () {
65+ return res .getLocalName ();
66+ }
67+
68+ @ Override
6369 public String getLabel () {
6470 String label = res .getLabel ( "EN" );
6571 if ( label == null ) {
@@ -68,6 +74,16 @@ public String getLabel() {
6874 return label ;
6975 }
7076
77+ @ Nullable
78+ @ Override
79+ public String getComment () {
80+ String label = res .getComment ( "EN" );
81+ if ( label == null ) {
82+ label = res .getLabel ( null );
83+ }
84+ return label ;
85+ }
86+
7187 @ Override
7288 public boolean isObsolete () {
7389 return res .hasLiteral ( OWL2 .deprecated , true );
@@ -94,9 +110,8 @@ public boolean equals( Object obj ) {
94110 if ( other .getLabel () != null ) return false ;
95111 } else if ( !getLabel ().equals ( other .getLabel () ) ) return false ;
96112 if ( getUri () == null ) {
97- if ( other .getUri () != null ) return false ;
98- } else if ( !getUri ().equals ( other .getUri () ) ) return false ;
99- return true ;
113+ return other .getUri () == null ;
114+ } else return getUri ().equals ( other .getUri () );
100115 }
101116
102117 @ Override
0 commit comments