code: private Set<URI> listEntitiesWithType(URI entityType, URI relationship, URI type) {
          Set<URI> entities = ImmutableSet.of();
          // Deal with services
          if (entityType.toASCIIString().equals(MSM.Service.getURI())) {
              // Get the adequate type
              if (relationship.toASCIIString().equals(MSM.hasInput.getURI())) {
                  entities = this.serviceManager.listServicesWithInputType(type);
  
              } else if (relationship.toASCIIString().equals(MSM.hasOutput.getURI())) {
                  entities = this.serviceManager.listServicesWithOutputType(type);
              }
              // Deal with operations
          } else if (entityType.toASCIIString().equals(MSM.Operation.getURI())) {
  
              // Get the adequate type
              if (relationship.toASCIIString().equals(MSM.hasInput.getURI())) {
                  entities = this.serviceManager.listOperationsWithInputType(type);
  
              } else if (relationship.toASCIIString().equals(MSM.hasOutput.getURI())) {
                  entities = this.serviceManager.listOperationsWithOutputType(type);
              }
          }
          return entities;
      }
docs: Generic implementation for finding all the Services or Operations that have one specific type as input or output.
  
  @param entityType   the MSM URI of the type of entity we are looking for. Only supports Service and Operation.
  @param relationship the MSM URI of the relationship we are looking for. Only supports hasInput and hasOutput.
  @param type         the input/output type (modelReference that is) we are looking for.
  @returns a Set of URIs of matching services/operations. Note that this method makes no use of reasoning and therefore
  the match will always be exact in this case.