code: Set<String> searchInstancesContainingKey(String searchKey)
              throws KnowledgeSourceReadException {
          return getFromProtege(searchKey,
                  new ProtegeCommand<Set<String>, String>(
                          "search instance in a given  slot") {
                      @Override
                      Set<String> get(String matchString) {
                          Set<String> searchResults = new HashSet<>();
                          try {
                              Collection<Frame> displayNameMatches = protegeKnowledgeBase
                                      .getMatchingFrames(protegeKnowledgeBase
                                              .getSlot("displayName"), null, false,
                                              "*" + matchString.trim() + "*", -1);
                              Collection<Frame> nameMatches = protegeKnowledgeBase
                                      .getMatchingFrames(protegeKnowledgeBase
                                              .getSlot(":NAME"), null, false, "*"
                                              + matchString.trim() + "*", -1);
                              Slot nameSlot = protegeKnowledgeBase.getSlot(":NAME");
                              Cls propositionCls = protegeKnowledgeBase.getCls("Proposition");
                              if (displayNameMatches != null) {
                                  for (Frame match : displayNameMatches)
                                      if (match instanceof Instance) {
                                          Instance temp = (Instance) match;
                                          if (temp.hasType(propositionCls)) {
                                              searchResults.add((String) getOwnSlotValue(match, nameSlot));
                                          }
                                      }
                              }
                              if (nameMatches != null) {
                                  for (Frame match : nameMatches) {
                                      if (match instanceof Instance) {
                                          Instance temp = (Instance) match;
                                          if (temp.hasType(propositionCls)) {
                                              String result = (String) getOwnSlotValue(match, nameSlot);
                                              if (!searchResults.contains(result))
                                                  searchResults.add(result);
                                          }
                                      }
                                  }
                              }
                          } catch (KnowledgeSourceReadException e) {
                              e.printStackTrace();
                          }
                          return searchResults;
                      }
                  });
      }
docs: gets all propositions from Protege that have a name or display name containing the search criteria
  
  @param searchKey
  @return searchResults
  @throws KnowledgeSourceReadException