code: @Override
      public Set<URI> getMsmType(URI elementUri) {
          if (elementUri == null || !elementUri.isAbsolute()) {
              log.warn("The Element URI is either absent or relative. Provide an absolute URI");
              return ImmutableSet.of();
          }
  
          URI graphUri;
          try {
              graphUri = getGraphUriForElement(elementUri);
          } catch (URISyntaxException e) {
              log.warn("The namespace of the URI of the message content is incorrect.", e);
              return ImmutableSet.of();
          }
  
          if (graphUri == null) {
              log.warn("Could not obtain a graph URI for the element. The URI may not be managed by the server - " + elementUri);
              return ImmutableSet.of();
          }
  
          String queryStr = new StringBuilder()
                  .append("SELECT * WHERE { \n")
                  .append(" GRAPH <").append(graphUri.toASCIIString()).append("> { \n")
                  .append("<").append(elementUri.toASCIIString()).append("> <").append(RDF.type.getURI()).append("> ?type .")
                  .append("FILTER(STRSTARTS(STR(?type), \"").append(MSM.NAMESPACE.getURI()).append("\"))")
                  .append(" } \n ")
                  .append("} \n ")
                  .toString();
  
          return this.graphStoreManager.listResourcesByQuery(queryStr, "type");
      }
docs: Given the URI of an element, this method returns the URI of the element from the Minimal Service Model it
  corresponds to. That is, it will say if it is a service, operation, etc.
  This method uses SPARQL 1.1 to avoid using regexs for performance.
  
  @param elementUri the URI to get the element type for.
  @return the URI of the MSM type it corresponds to.