Gets the {@link OWLFacet} for the specified facet marker index.
@param facetMarker The facet marker index (>= 0, <= 10).
@return The corresponding {@link OWLFacet}.
@throws IndexOutOfBoundsException if the facet marker is out of the specified range.
425473
public static OWLFacet getFacet(int facetMarker) {
        if(facetMarker < 0 || facetMarker > 10) {
            throw new IndexOutOfBoundsException("Facet marker out of range");
        }
        switch (facetMarker) {
            case 0:
                return OWLFacet.LENGTH;
            case 1:
                return OWLFacet.MIN_LENGTH;
            case 2:
                return OWLFacet.MAX_LENGTH;
            case 3:
                return OWLFacet.PATTERN;
            case 4:
                return OWLFacet.MIN_INCLUSIVE;
            case 5:
                return OWLFacet.MIN_EXCLUSIVE;
            case 6:
                return OWLFacet.MAX_INCLUSIVE;
            case 7:
                return OWLFacet.MAX_EXCLUSIVE;
            case 8:
                return OWLFacet.TOTAL_DIGITS;
            case 9:
                return OWLFacet.FRACTION_DIGITS;
            case 10:
                return OWLFacet.LANG_RANGE;
            default:
                throw new IllegalArgumentException("Facet marker out of range");
        }
    }
42162
@XmlTransient
  public Set<QueryAnnotation> getEdgeAnnotations()
  {
    Set<QueryAnnotation> edgeAnnotations = new TreeSet<>();
    
    for(Join j : ingoingJoins)
    {
      edgeAnnotations.addAll(j.getEdgeAnnotations());
    }
    
    return Collections.unmodifiableSet(edgeAnnotations);
  }
21657
protected I_CmsSearchConfigurationFacetRange parseRangeFacet(JSONObject rangeFacetObject) {

        try {
            String range = rangeFacetObject.getString(JSON_KEY_RANGE_FACET_RANGE);
            String name = parseOptionalStringValue(rangeFacetObject, JSON_KEY_FACET_NAME);
            String label = parseOptionalStringValue(rangeFacetObject, JSON_KEY_FACET_LABEL);
            Integer minCount = parseOptionalIntValue(rangeFacetObject, JSON_KEY_FACET_MINCOUNT);
            String start = rangeFacetObject.getString(JSON_KEY_RANGE_FACET_START);
            String end = rangeFacetObject.getString(JSON_KEY_RANGE_FACET_END);
            String gap = rangeFacetObject.getString(JSON_KEY_RANGE_FACET_GAP);
            List<String> sother = parseOptionalStringValues(rangeFacetObject, JSON_KEY_RANGE_FACET_OTHER);
            Boolean hardEnd = parseOptionalBooleanValue(rangeFacetObject, JSON_KEY_RANGE_FACET_HARDEND);
            List<I_CmsSearchConfigurationFacetRange.Other> other = null;
            if (sother != null) {
                other = new ArrayList<I_CmsSearchConfigurationFacetRange.Other>(sother.size());
                for (String so : sother) {
                    try {
                        I_CmsSearchConfigurationFacetRange.Other o = I_CmsSearchConfigurationFacetRange.Other.valueOf(
                            so);
                        other.add(o);
                    } catch (Exception e) {
                        LOG.error(Messages.get().getBundle().key(Messages.ERR_INVALID_OTHER_OPTION_1, so), e);
                    }
                }
            }
            Boolean isAndFacet = parseOptionalBooleanValue(rangeFacetObject, JSON_KEY_FACET_ISANDFACET);
            List<String> preselection = parseOptionalStringValues(rangeFacetObject, JSON_KEY_FACET_PRESELECTION);
            Boolean ignoreAllFacetFilters = parseOptionalBooleanValue(
                rangeFacetObject,
                JSON_KEY_FACET_IGNOREALLFACETFILTERS);
            return new CmsSearchConfigurationFacetRange(
                range,
                start,
                end,
                gap,
                other,
                hardEnd,
                name,
                minCount,
                label,
                isAndFacet,
                preselection,
                ignoreAllFacetFilters);
        } catch (JSONException e) {
            LOG.error(
                Messages.get().getBundle().key(
                    Messages.ERR_RANGE_FACET_MANDATORY_KEY_MISSING_1,
                    JSON_KEY_RANGE_FACET_RANGE
                        + ", "
                        + JSON_KEY_RANGE_FACET_START
                        + ", "
                        + JSON_KEY_RANGE_FACET_END
                        + ", "
                        + JSON_KEY_RANGE_FACET_GAP),
                e);
            return null;
        }

    }
467890
@CheckForNull
  public LinkedHashMap<String, Long> get(String facetName) {
    return facetsByName.get(facetName);
  }
1331593
public DTMAxisTraverser getAxisTraverser(final int axis)
  {

    DTMAxisTraverser traverser;

    if (null == m_traversers)  // Cache of stateless traversers for this DTM
    {
      m_traversers = new DTMAxisTraverser[Axis.getNamesLength()];
      traverser = null;
    }
    else
    {
      traverser = m_traversers[axis];  // Share/reuse existing traverser

      if (traverser != null)
        return traverser;
    }

    switch (axis)  // Generate new traverser
    {
    case Axis.ANCESTOR :
      traverser = new AncestorTraverser();
      break;
    case Axis.ANCESTORORSELF :
      traverser = new AncestorOrSelfTraverser();
      break;
    case Axis.ATTRIBUTE :
      traverser = new AttributeTraverser();
      break;
    case Axis.CHILD :
      traverser = new ChildTraverser();
      break;
    case Axis.DESCENDANT :
      traverser = new DescendantTraverser();
      break;
    case Axis.DESCENDANTORSELF :
      traverser = new DescendantOrSelfTraverser();
      break;
    case Axis.FOLLOWING :
      traverser = new FollowingTraverser();
      break;
    case Axis.FOLLOWINGSIBLING :
      traverser = new FollowingSiblingTraverser();
      break;
    case Axis.NAMESPACE :
      traverser = new NamespaceTraverser();
      break;
    case Axis.NAMESPACEDECLS :
      traverser = new NamespaceDeclsTraverser();
      break;
    case Axis.PARENT :
      traverser = new ParentTraverser();
      break;
    case Axis.PRECEDING :
      traverser = new PrecedingTraverser();
      break;
    case Axis.PRECEDINGSIBLING :
      traverser = new PrecedingSiblingTraverser();
      break;
    case Axis.SELF :
      traverser = new SelfTraverser();
      break;
    case Axis.ALL :
      traverser = new AllFromRootTraverser();
      break;
    case Axis.ALLFROMNODE :
      traverser = new AllFromNodeTraverser();
      break;
    case Axis.PRECEDINGANDANCESTOR :
      traverser = new PrecedingAndAncestorTraverser();
      break;
    case Axis.DESCENDANTSFROMROOT :
      traverser = new DescendantFromRootTraverser();
      break;
    case Axis.DESCENDANTSORSELFFROMROOT :
      traverser = new DescendantOrSelfFromRootTraverser();
      break;
    case Axis.ROOT :
      traverser = new RootTraverser();
      break;
    case Axis.FILTEREDLIST :
      return null; // Don't want to throw an exception for this one.
    default :
      throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_UNKNOWN_AXIS_TYPE, new Object[]{Integer.toString(axis)})); //"Unknown axis traversal type: "+axis);
    }

    if (null == traverser)
      throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_AXIS_TRAVERSER_NOT_SUPPORTED, new Object[]{Axis.getNames(axis)}));
      // "Axis traverser not supported: "
      //                       + Axis.names[axis]);

    m_traversers[axis] = traverser;

    return traverser;
  }
654836
@Override
    protected Collection<Object> elementsOf(Map<Object, Object> facetValue) {
        return facetValue.values();
    }
845451
public JsHandlerRegistration addGeometryIndexHighlightEndHandler(final GeometryIndexHighlightEndHandler handler) {
		org.geomajas.plugin.editing.client.event.state.GeometryIndexHighlightEndHandler h;
		h = new org.geomajas.plugin.editing.client.event.state.GeometryIndexHighlightEndHandler() {

			public void onGeometryIndexHighlightEnd(GeometryIndexHighlightEndEvent event) {
				org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexHighlightEndEvent e;
				List<GeometryIndex> indices = event.getIndices();
				e = new org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexHighlightEndEvent(
						event.getGeometry(), indices.toArray(new GeometryIndex[indices.size()]));
				handler.onGeometryIndexHighlightEnd(e);
			}
		};
		return new JsHandlerRegistration(new HandlerRegistration[] { delegate.addGeometryIndexHighlightEndHandler(h) });
	}
876307
public long queryIndexedFeaturesCount(BoundingBox webMercatorBoundingBox) {

		// Create an expanded bounding box to handle features outside the tile
		// that overlap
		BoundingBox expandedQueryBoundingBox = expandBoundingBox(webMercatorBoundingBox);

		// Query for the count of geometries matching the bounds in the index
		long count = featureIndex.count(expandedQueryBoundingBox,
				WEB_MERCATOR_PROJECTION);

		return count;
	}
93372
public SimpleOrderedMap<Object> create(ComponentFacet facet, Boolean encode)
      throws IOException {
    SimpleOrderedMap<Object> mtasFacetResponse = new SimpleOrderedMap<>();
    mtasFacetResponse.add("key", facet.key);
    HashMap<MtasDataCollector<?, ?>, HashMap<String, MtasSolrMtasResult>> functionData = new HashMap<>();
    for (int i = 0; i < facet.baseFields.length; i++) {
      if (facet.baseFunctionList[i] != null) {
        for (MtasDataCollector<?, ?> functionDataCollector : facet.baseFunctionList[i]
            .keySet()) {
          SubComponentFunction[] tmpSubComponentFunctionList = facet.baseFunctionList[i]
              .get(functionDataCollector);
          if (tmpSubComponentFunctionList != null) {
            HashMap<String, MtasSolrMtasResult> tmpList = new HashMap<>();
            for (SubComponentFunction tmpSubComponentFunction : tmpSubComponentFunctionList) {
              tmpList.put(tmpSubComponentFunction.key,
                  new MtasSolrMtasResult(tmpSubComponentFunction.dataCollector,
                      tmpSubComponentFunction.dataType,
                      tmpSubComponentFunction.statsType,
                      tmpSubComponentFunction.statsItems, null, null));
            }
            functionData.put(functionDataCollector, tmpList);
          }
        }
      }
    }
    MtasSolrMtasResult data = new MtasSolrMtasResult(facet.dataCollector,
        facet.baseDataTypes, facet.baseStatsTypes, facet.baseStatsItems, null,
        facet.baseSortTypes, facet.baseSortDirections, null, facet.baseNumbers,
        functionData);

    if (encode) {
      mtasFacetResponse.add("_encoded_list", MtasSolrResultUtil.encode(data));
    } else {
      mtasFacetResponse.add("list", data);
      MtasSolrResultUtil.rewrite(mtasFacetResponse, searchComponent);
    }
    return mtasFacetResponse;
  }
1310129
public UIComponent getFacet(String name) {

        if (facets != null) {
            return (facets.get(name));
        } else {
            return (null);
        }

    }
575735
public static <FACETEDTYPE extends Faceted<FACETTYPE>, FACETTYPE extends Facet<FACETEDTYPE>> Set<Class<FACETTYPE>> getAllOptionalFacets(
            final Class<FACETTYPE> inspectedType)
   {
      Set<Class<FACETTYPE>> seen = new LinkedHashSet<Class<FACETTYPE>>();
      return getAllRelatedFacets(seen, inspectedType, FacetConstraintType.OPTIONAL);
   }
1175881
@Override
  public FacetResult getFacetResult(String name) {
    if (facets == null || facets.isEmpty()) {
      return null;
    }
    return facets.get(name);
  }
308294
public static <T extends FieldDescription> ElementMatcher.Junction<T> definedField(ElementMatcher<? super FieldDescription.InDefinedShape> matcher) {
        return new DefinedShapeMatcher<T, FieldDescription.InDefinedShape>(matcher);
    }
753176
public static <FACETTYPE extends Facet<?>> Set<Class<FACETTYPE>> getAllRequiredFacets(final Class<?> inspectedType)
   {
      Set<Class<FACETTYPE>> seen = new LinkedHashSet<Class<FACETTYPE>>();
      return getAllRelatedFacets(seen, inspectedType, FacetConstraintType.REQUIRED);
   }
1143637
@SuppressWarnings("unchecked") public Class<T> getAnnotationHandledByThisHandler() {
		return (Class<T>) SpiLoadUtil.findAnnotationClass(getClass(), JavacAnnotationHandler.class);
	}
961383
@Requires({
    "parent != null",
    "annotation != null"
  })
  @Ensures("result != null")
  @SuppressWarnings("unchecked")
  protected List<Long> getLineNumbers(Element parent,
                                      AnnotationMirror annotation) {
    if (JavaUtils.classExists("com.sun.source.util.Trees")) {
      try {
        return (List<Long>) Class
            .forName("com.google.java.contract.core.apt.JavacUtils")
            .getMethod("getLineNumbers", ProcessingEnvironment.class,
                       Element.class, AnnotationMirror.class)
            .invoke(null, utils.processingEnv, parent, annotation);
      } catch (Exception e) {
        return Collections.emptyList();
      }
    } else {
      return Collections.emptyList();
    }
  }
482482
public <I extends Renderable, O> Renderer<? super I, ? extends O> getRenderer(final I renderable,
            final Class<? extends RenderingFormat<? extends O>> renderingFormat) {

        RendererSelection bestMatch = null;

        final Collection<RendererBeanDescriptor<?>> descriptors =
                _descriptorProvider.getRendererBeanDescriptorsForRenderingFormat(renderingFormat);
        for (final RendererBeanDescriptor<?> descriptor : descriptors) {
            final RendererSelection rendererMatch = isRendererMatch(descriptor, renderable, bestMatch);
            if (rendererMatch != null) {
                bestMatch = rendererMatch;
            }
        }

        if (bestMatch == null) {
            logger.warn("Didn't find any matches for renderable {} (format={})", renderable, renderingFormat);
            return null;
        }

        @SuppressWarnings("unchecked") final Renderer<? super I, ? extends O> renderer =
                (Renderer<? super I, ? extends O>) bestMatch.getRenderer();

        if (logger.isInfoEnabled()) {
            logger.info("Returning renderer '{}' for renderable '{}' in format '{}'",
                    new Object[] { renderer, renderable.getClass().getName(), renderingFormat.getName() });
        }

        return renderer;
    }