Returns the text for the specified type.  Returns "" if the
text isn't found.
762562
public static String getText(int type) {
        String text = "";

        if (TEXTS.containsKey(type)) {
            text = TEXTS.get(type);
        }

        return text;
    }
1147428
function(type, text) {
            var parser = parsers.get(type);

            return parser.parseInline(text)
                .get('content');
        }
1017638
def is_text_type(text):
    
    if isinstance(text, six.text_type) or isinstance(text, six.string_types):
        return True

    return False
767435
public static function getGenericTypeText($type)
    {
        switch ($type) {
            case static::T_IMAGE:
                return t('Image');
                break;
            case static::T_VIDEO:
                return t('Video');
                break;
            case static::T_TEXT:
                return t('Text');
                break;
            case static::T_AUDIO:
                return t('Audio');
                break;
            case static::T_DOCUMENT:
                return t('Document');
                break;
            case static::T_APPLICATION:
                return t('Application');
                break;
            case static::T_UNKNOWN:
                return t('File');
                break;

        }
    }
161958
def text(self):
        """"""
        if callable(self._text):
            return str(self._text())
        return str(self._text)
620364
def text(self):
        """"""
        if isinstance(self.source, str):
            return self.source
        else:
            return self.source()
821396
def getAceTypeText(self, t):
        '''
        
        '''
        try:
            return self.validAceTypes[t]['TEXT']
        except KeyError:
            raise CommandExecutionError((
                'No ACE type "{0}".  It should be one of the following:  {1}'
                ).format(t, ', '.join(self.validAceTypes)))
809704
def type_string(self):
        """"""
        if self.is_tuple:
            subtypes = [item.type_string for item in self.children]
            return '{}({})'.format(
                '' if self.val_guaranteed else '*',
                ', '.join(subtypes))
        elif self.is_list:
            return '{}[{}]'.format(
                '' if self.val_guaranteed else '*',
                self.children[0].type_string)
        else:
            return '{}{}'.format(
                '' if self.val_guaranteed else '*',
                self.type_.__name__)
659825
def get_type(self, name, recurse=True):
        
        self._dlog("getting type '{}'".format(name))
        return self._search("types", name, recurse)
637621
def _value_is_type_text(val):
    
    if ((u'type' in val.keys()) and
            (val['type'].lower() == u"text")):
        return True
    return False
715481
def _FormatTypeCheck(type_):
  """"""
  if isinstance(type_, tuple):
    items = [_FormatTypeCheck(t) for t in type_]
    return "(%s)" % ", ".join(items)
  elif hasattr(type_, "__name__"):
    return type_.__name__
  else:
    return repr(type_)
1308896
public function getFlashText($type)
    {
        if ($this->{$type}) {
            return $this->{$type};
        } elseif ($this->parent) {
            return $this->parent->getFlashText($type);
        }

        return $type;
    }
274460
def _get_value_type(kind):
    """"""

    if kind == TEXT:
        return APETextValue
    elif kind == BINARY:
        return APEBinaryValue
    elif kind == EXTERNAL:
        return APEExtValue
    raise ValueError("unknown kind %r" % kind)
423283
def get_text(self, instance):
        
        instance = instance[0]
        if isinstance(instance, (six.text_type, six.string_types)):
            return serializers.CharField(read_only=True).to_representation(instance)
        elif isinstance(instance, datetime):
            return serializers.DateTimeField(read_only=True).to_representation(instance)
        return instance
372406
def text(self, cls='current', retaintokenisation=False):
        

        #backward compatibility, old versions didn't have cls as first argument, so if a boolean is passed first we interpret it as the 2nd:
        if cls is True or cls is False:
            retaintokenisation = cls
            cls = 'current'

        s = ""
        for c in self.data:
            if s: s += "\n\n\n"
            try:
                s += c.text(cls, retaintokenisation)
            except NoSuchText:
                continue
        return s
321878
def FindTypeInfo(self, name):
    """"""
    result = self.type_infos.get(name)
    if result is None:
      # Not found, assume string.
      result = type_info.String(name=name, default="")

    return result
178354
def get_type(self):
        
        for typechar, typename in self.KEY_TYPE_CHOICES:
            if typechar == self.key_type:
                return typename