code: def entityTriples(rdfGraph, anEntity, excludeProps=False, excludeBNodes=False,
                    orderProps=[RDF, RDFS, OWL.OWLNS, DC.DCNS]):
      temp = []
      if not excludeProps:
          excludeProps = []
      for x, y, z in rdfGraph.triples((anEntity, None, None)):
          if excludeBNodes and isBlankNode(z):
              continue
          if y not in excludeProps:
              temp += [(y, z)]
      if type(orderProps) == type([]):
          orderedUris = sortByNamespacePrefix([y for y, z in temp], orderProps)
          orderedUris = [(n + 1, x) for n, x in
                         enumerate(orderedUris)]
          rank = dict((key, rank) for (rank, key) in orderedUris)
          temp = sorted(temp, key=lambda tup: rank.get(tup[0]))
      elif orderProps:
          temp = sorted(temp, key=lambda tup: tup[0])
      return temp