Returns the resource type if only one is set as filter query.<p>

@param fqs the field queries to check

@return the type or <code>null</code>
518833
public static String getResourceType(String[] fqs) {

        String ret = null;
        int count = 0;
        if (fqs != null) {
            for (String fq : fqs) {
                if (fq.startsWith(CmsSearchField.FIELD_TYPE + ":")) {
                    String val = fq.substring((CmsSearchField.FIELD_TYPE + ":").length());
                    val = val.replaceAll("\"", "");
                    if (OpenCms.getResourceManager().hasResourceType(val)) {
                        count++;
                        ret = val;
                    }
                }
            }
        }
        return (count == 1) ? ret : null;
    }
742731
public String getResourceType() {
        if (!tokens.isEmpty() && tokens.getLast().hasKey()) {
            return tokens.getLast().getKey();
        }
        return null;
    }
901578
public FilterType<WebFragmentType<T>> getOrCreateFilter()
   {
      List<Node> nodeList = childNode.get("filter");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FilterTypeImpl<WebFragmentType<T>>(this, "filter", childNode, nodeList.get(0));
      }
      return createFilter();
   }
479975
public List<T> query(String query, QueryType type)
    {
        switch (type)
        {
        case JPQL:
            return query(query);

        case NATIVE:
            return nativeQuery(query);

        default:
            throw new KunderaException("invalid query type");
        }
    }
1335655
private SearchFilter getSearchFilter(HttpServletRequest httpServletRequest) {
        SearchFilter ret = new SearchFilter();
        Set<String> keySet = httpServletRequest.getParameterMap().keySet();
        for (String key : keySet) {
            ret.setParam(String.valueOf(key), String.valueOf(httpServletRequest.getParameter(key)));
        }

        return ret;
    }
650631
public SearchResponse searchAll(String index, String type,
            QueryBuilder filterQueryBuilder) {
        return searchAll(index, type, filterQueryBuilder, null);
    }
312290
public static Specification<JpaTargetFilterQuery> equalsQuery(final String queryValue) {
        return (targetFilterQueryRoot, query, cb) -> cb.equal(targetFilterQueryRoot.get(JpaTargetFilterQuery_.query),
                queryValue);
    }
264977
private MatchType getMatchType(QuerySolution soln) {

        if (soln.contains(EXACT_VAR))
            return LogicConceptMatchType.Exact;

        if (soln.contains(SUPER_VAR))
            return LogicConceptMatchType.Plugin;

        if (soln.contains(SUB_VAR))
            return LogicConceptMatchType.Subsume;

        return LogicConceptMatchType.Fail;
    }
585803
public static pqpolicy[] get_filtered(nitro_service service, String filter) throws Exception{
		pqpolicy obj = new pqpolicy();
		options option = new options();
		option.set_filter(filter);
		pqpolicy[] response = (pqpolicy[]) obj.getfiltered(service, option);
		return response;
	}
887497
public Query<S> query(Filter<S> filter, OrderingList<S> ordering, QueryHints hints)
        throws FetchException
    {
        filter = filter.bind();

        Map<OrderingList<S>, Query<S>> map;
        synchronized (mFilterToQuery) {
            map = mFilterToQuery.get(filter);
            if (map == null) {
                if (filter == null) {
                    throw new IllegalArgumentException("Query filter must not be null");
                }
                map = new SoftValuedHashMap(7);
                mFilterToQuery.put(filter, map);
            }
        }

        Query<S> query;
        synchronized (map) {
            query = map.get(ordering);
            if (query == null) {
                FilterValues<S> values = filter.initialFilterValues();
                if (values == null && filter.isClosed()) {
                    query = new EmptyQuery<S>(this, ordering);
                } else {
                    StandardQuery<S> standardQuery = createQuery(filter, values, ordering, hints);
                    if (!mLazySetExecutor) {
                        try {
                            standardQuery.setExecutor();
                        } catch (RepositoryException e) {
                            throw e.toFetchException();
                        }
                    }
                    query = standardQuery;
                }
                map.put(ordering, query);
            }
        }

        return query;
    }
1373001
public Long getTypeFirstWaitMs(ResourceType type) {
    synchronized(typeToFirstWait) {
      // Was it ever requested?
      if (!typeToFirstWait.containsKey(type)) {
        return null;
      }
      Long firstWait = typeToFirstWait.get(type);
      if (firstWait == null) {
        return ClusterManager.clock.getTime() - startTime;
      }

      return firstWait;
    }
  }
96344
private boolean containsIncompatibleResourceType() {
    if (queryByResourceType && queryByPermission) {
      Resource[] resources = resourcesIntersection.toArray(new Resource[resourcesIntersection.size()]);
      return !ResourceTypeUtil.resourceIsContainedInArray(resourceType, resources);
    }
    return false;
  }
439484
public String getResourceType() {
        if (resourceType == null) {
            resourceType = "";
            String type = resource.getResourceType();
            if (StringUtils.isBlank(type) || getPrimaryType().equals(type)) {
                Resource contentResource = getContentResource();
                if (contentResource != null) {
                    type = contentResource.getResourceType();
                    if (StringUtils.isNotBlank(type)) {
                        ResourceHandle handle = ResourceHandle.use(contentResource);
                        if (type.equals(handle.getPrimaryType())) {
                            type = null;
                        }
                    }
                }
            }
            if (StringUtils.isNotBlank(type)) {
                // check for a real existing resource type
                if (!Resource.RESOURCE_TYPE_NON_EXISTING.equals(type)) {
                    resourceType = type;
                }
            }
        }
        return resourceType;
    }
630212
public List<CmsResourceTypeBean> getSearchTypes() {

        if (m_searchTypes != null) {
            return m_searchTypes;
        }
        m_searchTypes = Lists.newArrayList();
        for (CmsResourceTypeBean type : m_dialogBean.getTypes()) {
            if (type.getVisibility() != TypeVisibility.hidden) {
                m_searchTypes.add(type);
            }
        }
        return m_searchTypes;
    }
1288184
protected Query getTermQueryFilter(String field, String term) {

        return getMultiTermQueryFilter(field, term, Collections.singletonList(term));
    }
357870
public static fis[] get_filtered(nitro_service service, String filter) throws Exception{
		fis obj = new fis();
		options option = new options();
		option.set_filter(filter);
		fis[] response = (fis[]) obj.getfiltered(service, option);
		return response;
	}
940853
@SuppressWarnings("unchecked")
	public <T extends Filter> T getFirstFilterForField(String field) {
		for (Filter filter : this.filters) {
			if (filter.getField().equals(field)) {
				return (T) filter;
			}
		}
		return null;
	}