code: function(entityStr) {
          var literalPattern = RegularExpressions.LITERAL_UNFORMATTED,
              blankNodePattern = RegularExpressions.BLANK_NODE,
              variablePattern = RegularExpressions.VARIABLE,
              typeOfDatatypePattern = RegularExpressions.DATATYPE_TYPE,
              dblQuoteInStrPattern = RegularExpressions.DBLQUOTED_STRING,
              dblQuoteMatch;
  
          /*try {
              entityStr = entityStr.format();
          } catch(e){}*/
  
          entityStr = entityStr.replace(/(\n|\r)/g, '');
  
          if (entityStr === undefined) return false;
  
          if (entityStr.startsWith('_')) {
              return entityStr;
          }
  
          if (entityStr.match(dblQuoteInStrPattern)) {
              dblQuoteMatch = entityStr.match(dblQuoteInStrPattern);
              entityStr = dblQuoteMatch[1] + dblQuoteMatch[2].replace(/(")/g, "'") + dblQuoteMatch[3]; //temporary ; has to be debbuged asap            
          }
  
          if (entityStr.match(literalPattern)) {
              return entityStr.replace(literalPattern, '$1<$2>');
          } else if(entityStr.match(blankNodePattern) || entityStr.match(variablePattern) || entityStr.match(typeOfDatatypePattern) || entityStr.match(dblQuoteInStrPattern)) {
              return entityStr;
          } else {
              return '<' + entityStr + '>';
          }
      }
docs: Transforms a raw entity (URI or literal) into turtle.
  @param entityStr
  @returns {*}