Convert raw data into something that the user can search on
@param {string} sData data to be modified
@param {string} sType data type
@returns {string} search string
@memberof DataTable#oApi
329414
function _fnDataToSearch ( sData, sType )
		{
			if ( typeof DataTable.ext.ofnSearch[sType] === "function" )
			{
				return DataTable.ext.ofnSearch[sType]( sData );
			}
			else if ( sData === null )
			{
				return '';
			}
			else if ( sType == "html" )
			{
				return sData.replace(/[\r\n]/g," ").replace( /<.*?>/g, "" );
			}
			else if ( typeof sData === "string" )
			{
				return sData.replace(/[\r\n]/g," ");
			}
			return sData;
		}
547468
function parseSearchString(str) {

    str = tia.cU.replaceXTypesInTeq(str);

    var re = /&(\w|\d|_|-)+/g;

    var searchData = [];
    var prevLastIndex = 0;
    var query;

    while (true) {
      var reResult = re.exec(str);

      if (reResult === null) {
        // Only query string.
        query = str.slice(prevLastIndex).trim();
        if (query) {
          searchData.push({
            query: query,
          });
        }
        return searchData;
      }

      query = str.slice(prevLastIndex, reResult.index).trim();
      var reference = str.slice(reResult.index + 1, re.lastIndex).trim();
      prevLastIndex = re.lastIndex;

      if (query) {
        searchData.push({
          query: query,
        });
      }

      searchData.push({
        reference: reference,
      });

    }
  }
503370
function js2dt (jsonData, typeName) {
  const data = JSON.parse(jsonData)

  const raml = new RamlConverter(data, typeName).toRaml()

  return raml
}
591931
function decodeDataUrlFromQueryParam(value) {
  if (typeof value !== 'string') {
    return undefined
  }
  const maybeDataUrl = prependPrefix(value, 'data:')
    .replace(/ /g, '+')
    .replace(/\s/g, '')
  return isDataUrl(maybeDataUrl) ? maybeDataUrl : undefined
}
417918
function(sType, aArgs) {
      var aData = aArgs[2];
      this.setValue( this.options.returnValue ? this.options.returnValue(aData) : aData[0] );
   }
670767
function(type, data) {
		var test = 'HTML' + (type || '').replace(
			/^[a-z]/,
			function(m) {
				return m.toUpperCase();
			}

		) + 'Element';

		if (!data) {
			return false;
		}

		if (window[test]) {
			return data instanceof window[test];
		}
		else if (window.Element) {
			return data instanceof window.Element && (!type || (data.tagName && data.tagName.toLowerCase() === type));
		}
		else {
			return (!(data instanceof Object || data instanceof Array || data instanceof String || data instanceof Number) && data.tagName && data.tagName.toLowerCase() === type);
		}
	}
380927
function _fnBuildSearchRow( oSettings, aData )
		{
			var sSearch = '';
			if ( oSettings.__nTmpFilter === undefined )
			{
				oSettings.__nTmpFilter = document.createElement('div');
			}
			var nTmp = oSettings.__nTmpFilter;
			
			for ( var j=0, jLen=oSettings.aoColumns.length ; j<jLen ; j++ )
			{
				if ( oSettings.aoColumns[j].bSearchable )
				{
					var sData = aData[j];
					sSearch += _fnDataToSearch( sData, oSettings.aoColumns[j].sType )+'  ';
				}
			}
			
			/* If it looks like there is an HTML entity in the string, attempt to decode it */
			if ( sSearch.indexOf('&') !== -1 )
			{
				nTmp.innerHTML = sSearch;
				sSearch = nTmp.textContent ? nTmp.textContent : nTmp.innerText;
				
				/* IE and Opera appear to put an newline where there is a <br> tag - remove it */
				sSearch = sSearch.replace(/\n/g," ").replace(/\r/g,"");
			}
			
			return sSearch;
		}
906067
def convert_type(self, type):
        

        # Mapping
        mapping = {
            'any': np.dtype('O'),
            'array': np.dtype(list),
            'boolean': np.dtype(bool),
            'date': np.dtype('O'),
            'datetime': np.dtype('datetime64[ns]'),
            'duration': np.dtype('O'),
            'geojson': np.dtype('O'),
            'geopoint': np.dtype('O'),
            'integer': np.dtype(int),
            'number': np.dtype(float),
            'object': np.dtype(dict),
            'string': np.dtype('O'),
            'time': np.dtype('O'),
            'year': np.dtype(int),
            'yearmonth': np.dtype('O'),
        }

        # Get type
        if type not in mapping:
            message = 'Type "%s" is not supported' % type
            raise tableschema.exceptions.StorageError(message)

        return mapping[type]
802239
public static SearchType parseSearchType(final String type) {
    if (type == null || type.isEmpty()) {
      throw new IllegalArgumentException("Type provided was null or empty");
    }
    
    if (type.toLowerCase().equals("tsmeta")) {
      return SearchType.TSMETA;
    } else if (type.toLowerCase().equals("tsmeta_summary")) {
      return SearchType.TSMETA_SUMMARY;
    } else if (type.toLowerCase().equals("tsuids")) {
      return SearchType.TSUIDS;
    } else if (type.toLowerCase().equals("uidmeta")) {
      return SearchType.UIDMETA;
    } else if (type.toLowerCase().equals("annotation")) {
      return SearchType.ANNOTATION;
    } else if (type.toLowerCase().equals("lookup")) {
      return SearchType.LOOKUP;
    } else {
      throw new IllegalArgumentException("Unknown type: " + type);
    }
  }
1292335
function convertFileType (data) {
  data['type'] = 'file'
  const anyOf = data.media.anyOf
  if (anyOf && anyOf.length > 0) {
    data['fileTypes'] = []
    anyOf.forEach(function (el) {
      if (el.mediaType) {
        data.fileTypes.push(el.mediaType)
      }
    })
    if (data.fileTypes.length < 1) {
      delete data.fileTypes
    }
  }
  delete data.media
  return data
}
135507
public static Datatype getDatatype(String datatypeKey) 
	{	
		Datatype dt = null;
		if(containsIdOrName(datatypeKey))
			dt = datatypesHash.get(datatypeKey.toUpperCase());
		else if(containsUri(datatypeKey)) 
			dt = datatypesHash.get(datatypeKey);
		else
			throw new IllegalArgumentException("Datatype not found : " + datatypeKey);
		
		if(!useObsoleteDatatypes 
				&& dt.isObsolete() != null 
				&& dt.isObsolete().booleanValue() == true)
			throw new IllegalArgumentException("Datatype " +
				datatypeKey + "(" + dt.getName() + ") is obsolete" +
					" (and useObsoleteDatatypes=false)");
		
		// return 
		return dt;
	}
304063
function convertDateType (data) {
  switch (data.type) {
    case 'date-only':
      data['type'] = 'string'
      data['pattern'] = constants.dateOnlyPattern
      break
    case 'time-only':
      data['type'] = 'string'
      data['pattern'] = constants.timeOnlyPattern
      break
    case 'datetime-only':
      data['type'] = 'string'
      data['pattern'] = constants.dateTimeOnlyPattern
      break
    case 'datetime':
      data['type'] = 'string'
      if (data.format === undefined || data.format.toLowerCase() === constants.RFC3339) {
        data['pattern'] = constants.RFC3339DatetimePattern
      } else if (data.format.toLowerCase() === constants.RFC2616) {
        data['pattern'] = constants.RFC2616DatetimePattern
      }
      delete data.format
      break
  }
  return data
}
770903
function(data) {
            var paramArray = [],
                key, value;
        // TODO: use `object` module
            for (key in data) {
                value = data[key];
                key = ENCODE_URI_COMPONENT(key);
                paramArray.push((value === null) ? key : (key + '=' + ENCODE_URI_COMPONENT(value)));
            }
            console.log(NAME, '_toQueryString --> '+paramArray.join('&'));
            return paramArray.join('&');
        }
301652
function ( sData )
		{
			/* Allow zero length strings as a number */
			if ( typeof sData === 'number' )
			{
				return 'numeric';
			}
			else if ( typeof sData !== 'string' )
			{
				return null;
			}
			
			var sValidFirstChars = "0123456789-";
			var sValidChars = "0123456789.";
			var Char;
			var bDecimal = false;
			
			/* Check for a valid first char (no period and allow negatives) */
			Char = sData.charAt(0); 
			if (sValidFirstChars.indexOf(Char) == -1) 
			{
				return null;
			}
			
			/* Check all the other characters are valid */
			for ( var i=1 ; i<sData.length ; i++ ) 
			{
				Char = sData.charAt(i); 
				if (sValidChars.indexOf(Char) == -1) 
				{
					return null;
				}
				
				/* Only allowed one decimal place... */
				if ( Char == "." )
				{
					if ( bDecimal )
					{
						return null;
					}
					bDecimal = true;
				}
			}
			
			return 'numeric';
		}
216791
public String retrieveData(String baseData, String type) {
        String result;

        InputStream stream = getClass().getClassLoader().getResourceAsStream(baseData);

        Writer writer = new StringWriter();
        char[] buffer = new char[1024];
        Reader reader;

        if (stream == null) {
            this.getLogger().error("File does not exist: {}", baseData);
            return "ERR! File not found: " + baseData;
        }

        try {
            reader = new BufferedReader(new InputStreamReader(stream, "UTF-8"));
            int n;
            while ((n = reader.read(buffer)) != -1) {
                writer.write(buffer, 0, n);
            }
        } catch (Exception readerexception) {
            this.getLogger().error(readerexception.getMessage());
        } finally {
            try {
                stream.close();
            } catch (Exception closeException) {
                this.getLogger().error(closeException.getMessage());
            }
        }
        String text = writer.toString();

        String std = text.replace("\r", "").replace("\n", ""); // make sure we have unix style text regardless of the input


        if ("json".equals(type)) {
            result = JsonValue.readHjson(std).asObject().toString();
        } else {
            result = std;
        }
        return result;
    }
1032118
function parseTypeString(type){
  if (type.indexOf('CompositeType') > -1){
    return getCompositeTypes(type);
  } else if(type.indexOf('ReversedType') > -1){
    return getType(getInnerType(type));
  }
  else if(type.indexOf('org.apache.cassandra.db.marshal.SetType') > -1){
    return getSetType(type);
  }
  else if(type.indexOf('org.apache.cassandra.db.marshal.ListType') > -1){
    return getListType(type);
  }
  else if(type.indexOf('org.apache.cassandra.db.marshal.MapType') > -1){
    return getMapType(type);
  }
  else if(type === null || type === undefined) {
    return 'BytesType';
  } else {
    return getType(type);
  }
}
810535
private Object correctDataType(Object value, String dataType) {
		if(value == null ){return null;}
		return value;
	}