@Test public void testUninitialized() { try { String label = LabelUtils.getPrimaryLabel(entity1); fail("Checking label with null ontology DAO should throw an error - actually, just returned " + label); } catch (Exception e) { e.printStackTrace(); } }
public static String getPrimaryLabel(URI concept) { if (ontologyDAO != null) { return ontologyDAO.getSemanticTagLabel(concept); } else { throw new IllegalStateException("Unable to perform label lookup - no OntologyDAO has been set"); } }
LabelUtils { public static String getPrimaryLabel(URI concept) { if (ontologyDAO != null) { return ontologyDAO.getSemanticTagLabel(concept); } else { throw new IllegalStateException("Unable to perform label lookup - no OntologyDAO has been set"); } } }
LabelUtils { public static String getPrimaryLabel(URI concept) { if (ontologyDAO != null) { return ontologyDAO.getSemanticTagLabel(concept); } else { throw new IllegalStateException("Unable to perform label lookup - no OntologyDAO has been set"); } }  }
LabelUtils { public static String getPrimaryLabel(URI concept) { if (ontologyDAO != null) { return ontologyDAO.getSemanticTagLabel(concept); } else { throw new IllegalStateException("Unable to perform label lookup - no OntologyDAO has been set"); } }  OntologyDAO getOntologyDAO(); void setOntologyDAO(OntologyDAO ontologyDAO); static String getPrimaryLabel(URI concept); }
LabelUtils { public static String getPrimaryLabel(URI concept) { if (ontologyDAO != null) { return ontologyDAO.getSemanticTagLabel(concept); } else { throw new IllegalStateException("Unable to perform label lookup - no OntologyDAO has been set"); } }  OntologyDAO getOntologyDAO(); void setOntologyDAO(OntologyDAO ontologyDAO); static String getPrimaryLabel(URI concept);  }