Filter the mimeType property.

@throws SyntaxError If the mimetype is invalid
513444
private function filterMimeType(string $mimetype): string
    {
        if ('' == $mimetype) {
            return static::DEFAULT_MIMETYPE;
        }

        if (1 === preg_match(static::REGEXP_MIMETYPE, $mimetype)) {
            return $mimetype;
        }

        throw new SyntaxError(sprintf('invalid mimeType, `%s`', $mimetype));
    }
59789
def mimetype(self, value: str) -> None:
        """"""
        if (
                value.startswith('text/') or value == 'application/xml' or
                (value.startswith('application/') and value.endswith('+xml'))
        ):
            mimetype = f"{value}; charset={self.charset}"
        else:
            mimetype = value
        self.headers['Content-Type'] = mimetype
1222391
public void setMimeType(com.google.api.ads.admanager.axis.v201805.MimeType mimeType) {
        this.mimeType = mimeType;
    }
947249
public function filtersOnID()
    {
        $regexp = '/^(.*\.)?("|`)?ID("|`)?\s?(=|IN)/';

        foreach ($this->getWhereParameterised($parameters) as $predicate) {
            if (preg_match($regexp, $predicate)) {
                return true;
            }
        }

        return false;
    }
306159
@Override
	public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine,
			String msg, RecognitionException e) {
		
	}
475794
public static boolean hasMimeType(String mimeType) {
        if (mimeType == null || mimeType.isEmpty()) {
            return false;
        }
        return mimeTypeToExtensionMap.containsKey(mimeType);
    }
744228
public final void mSYNTAX() throws RecognitionException {
        try {
            int _type = SYNTAX;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // com/dyuproject/protostuff/parser/ProtoLexer.g:99:5: ( 'syntax' )
            // com/dyuproject/protostuff/parser/ProtoLexer.g:99:9: 'syntax'
            {
            match("syntax"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
541217
public static boolean hasMimeType(String mimeType) {
        if (mimeType == null || mimeType.length() == 0) {
            return false;
        }
        return mimeTypeToExtensionMap.containsKey(mimeType);
    }
1363850
def FilterArgsFromSemanticProtobuf(protobuf, kwargs):
  """"""
  for descriptor in protobuf.type_infos:
    value = kwargs.pop(descriptor.name, None)
    if value is not None:
      setattr(protobuf, descriptor.name, value)
931160
def filter(select, iterable, namespaces=None, flags=0, **kwargs):  # noqa: A001
    """"""

    return compile(select, namespaces, flags, **kwargs).filter(iterable)
351486
public boolean accept(String kind, String mimetype) {

        if (m_includeAll) {
            return true;
        }
        int slashpos = mimetype.indexOf("/");
        String supertype = mimetype.substring(0, slashpos);
        return m_kinds.contains(kind) || m_types.contains(mimetype) || m_supertypes.contains(supertype);
    }
942100
def filter(o)
      raise ArgumentError.new('Wrong type supplied to filter') unless Splib.type_of?(o, @type)
      do_filter(o)
    end
875442
private boolean checkFilter(SCIMFilter filter) {
        switch (filter.getFilterType()) {
            case AND:
            case OR:
                return checkFilter(filter.getFilterComponents().get(0)) | checkFilter(filter.getFilterComponents().get(1));
            case EQUALITY:
                String name = filter.getFilterAttribute().getAttributeName();
                if ("id".equalsIgnoreCase(name) ||
                    "userName".equalsIgnoreCase(name)) {
                    return true;
                } else if (OriginKeys.ORIGIN.equalsIgnoreCase(name)) {
                    return false;
                } else {
                    throw new ScimException("Invalid filter attribute.", HttpStatus.BAD_REQUEST);
                }
            case PRESENCE:
            case STARTS_WITH:
            case CONTAINS:
                throw new ScimException("Wildcards are not allowed in filter.", HttpStatus.BAD_REQUEST);
            case GREATER_THAN:
            case GREATER_OR_EQUAL:
            case LESS_THAN:
            case LESS_OR_EQUAL:
                throw new ScimException("Invalid operator.", HttpStatus.BAD_REQUEST);
        }
        return false;
    }
235019
public MimeType getMimeType() {
        String mimeType = getState(false).mimeType;
        if (mimeType != null) {
            return MimeType.valueOfMimeType(mimeType);
        } else {
            return null;
        }
    }
877721
public static List<MimeType> parseMimeTypes(String mimeTypes) {
        if (!Strings.isNullOrEmpty(mimeTypes)) {
            return Collections.emptyList();
        }
        String[] tokens = mimeTypes.split(",\\s*");
        List<MimeType> result = new ArrayList<MimeType>(tokens.length);
        for (String token : tokens) {
            result.add(parseMimeType(token));
        }
        return result;
    }
70902
function mimeTypeSetting( $mimeData )
    {
        if ( !isset( $this->MIMETypeSettingsMap[$mimeData['name']] ) )
            return false;
        $list = $this->MIMETypeSettingsMap[$mimeData['name']];
        foreach ( $list as $item )
        {
            if ( is_array( $item['match'] ) )
            {
                if ( array_key_exists( 'info', $mimeData ) && is_array( $mimeData['info'] ) )
                {
                    $isMatch = true;
                    $info = $mimeData['info'];
                    foreach ( $item['match'] as $matchKey => $matchValue )
                    {
                        if ( !isset( $info[$matchKey] ) or
                             $info[$matchKey] != $matchValue )
                        {
                            $isMatch = false;
                            break;
                        }
                    }
                    if ( $isMatch )
                        return $item;
                }
            }
            else
                return $item;
        }
        return false;
    }
598767
protected function _getFilteredUniqueDependencies($mimeType)
    {
        $ret = parent::_getFilteredUniqueDependencies($mimeType);

        $loadedDeps = $this->_loadedPackage->_getFilteredUniqueDependencies($mimeType);

        foreach ($ret as $k=>$i) {
            if (in_array($i, $loadedDeps, true)) {
                unset($ret[$k]);
            }
        }

        $ret = array_values($ret);

        return $ret;
    }