Makes the "meta" api call
<p>
HttpMethod: GET

@param type          the BullhornEntity type
@param metaParameter additional meta parameters
@param fieldSet      fields to return meta information about. Pass in null for all fields.
@return the MetaData
333797
protected <T extends BullhornEntity> MetaData<T> handleGetMetaData(Class<T> type, MetaParameter metaParameter, Set<String> fieldSet, Integer privateLabelId) {
        Map<String, String> uriVariables = restUriVariablesFactory.getUriVariablesForMeta(BullhornEntityInfo.getTypesRestEntityName(type),
                metaParameter, fieldSet, privateLabelId);

        return handleGetMetaData(uriVariables, privateLabelId);
    }
448576
private Map<String, Object> getEntityAsMap(
      Entity entity,
      EntityType meta,
      Set<String> attributesSet,
      Map<String, Set<String>> attributeExpandsSet) {
    if (null == entity) throw new IllegalArgumentException("entity is null");

    if (null == meta) throw new IllegalArgumentException("meta is null");

    Map<String, Object> entityMap = new LinkedHashMap<>();
    entityMap.put("href", UriUtils.createEntityUriPath(meta.getId(), entity.getIdValue()));

    for (Attribute attr : meta.getAtomicAttributes()) {
      // filter fields
      if (attributesSet != null && !attributesSet.contains(attr.getName().toLowerCase())) continue;

      String attrName = attr.getName();
      AttributeType attrType = attr.getDataType();

      if (attrType == COMPOUND) {
        if (attributeExpandsSet != null
            && attributeExpandsSet.containsKey(attrName.toLowerCase())) {
          Set<String> subAttributesSet = attributeExpandsSet.get(attrName.toLowerCase());
          entityMap.put(
              attrName,
              new AttributeResponse(
                  meta.getId(),
                  meta,
                  attr,
                  subAttributesSet,
                  null,
                  permissionService,
                  dataService));
        } else {
          entityMap.put(
              attrName,
              Collections.singletonMap(
                  "href",
                  UriUtils.createEntityAttributeUriPath(
                      meta.getId(), entity.getIdValue(), attrName)));
        }
      } else if (attrType == DATE) {
        LocalDate date = entity.getLocalDate(attrName);
        entityMap.put(attrName, date != null ? date.toString() : null);
      } else if (attrType == DATE_TIME) {
        Instant date = entity.getInstant(attrName);
        entityMap.put(attrName, date != null ? date.toString() : null);
      } else if (attrType != XREF
          && attrType != CATEGORICAL
          && attrType != MREF
          && attrType != CATEGORICAL_MREF
          && attrType != ONE_TO_MANY
          && attrType != FILE) {
        entityMap.put(attrName, entity.get(attr.getName()));
      } else if ((attrType == XREF || attrType == CATEGORICAL || attrType == FILE)
          && attributeExpandsSet != null
          && attributeExpandsSet.containsKey(attrName.toLowerCase())) {
        Entity refEntity = entity.getEntity(attr.getName());
        if (refEntity != null) {
          Set<String> subAttributesSet = attributeExpandsSet.get(attrName.toLowerCase());
          EntityType refEntityType = dataService.getEntityType(attr.getRefEntity().getId());
          Map<String, Object> refEntityMap =
              getEntityAsMap(refEntity, refEntityType, subAttributesSet, null);
          entityMap.put(attrName, refEntityMap);
        }
      } else if ((attrType == MREF || attrType == CATEGORICAL_MREF || attrType == ONE_TO_MANY)
          && attributeExpandsSet != null
          && attributeExpandsSet.containsKey(attrName.toLowerCase())) {
        EntityType refEntityType = dataService.getEntityType(attr.getRefEntity().getId());
        Iterable<Entity> mrefEntities = entity.getEntities(attr.getName());

        Set<String> subAttributesSet = attributeExpandsSet.get(attrName.toLowerCase());
        List<Map<String, Object>> refEntityMaps = new ArrayList<>();
        for (Entity refEntity : mrefEntities) {
          Map<String, Object> refEntityMap =
              getEntityAsMap(refEntity, refEntityType, subAttributesSet, null);
          refEntityMaps.add(refEntityMap);
        }

        EntityPager pager =
            new EntityPager(
                0,
                new EntityCollectionRequest().getNum(),
                (long) refEntityMaps.size(),
                mrefEntities);

        EntityCollectionResponse ecr =
            new EntityCollectionResponse(
                pager,
                refEntityMaps,
                UriUtils.createEntityAttributeUriPath(meta.getId(), entity.getIdValue(), attrName),
                null,
                permissionService,
                dataService);

        entityMap.put(attrName, ecr);
      } else if ((attrType == XREF && entity.get(attr.getName()) != null)
          || (attrType == CATEGORICAL && entity.get(attr.getName()) != null)
          || (attrType == FILE && entity.get(attr.getName()) != null)
          || attrType == MREF
          || attrType == CATEGORICAL_MREF
          || attrType == ONE_TO_MANY) {
        // Add href to ref field
        Map<String, String> ref = new LinkedHashMap<>();
        ref.put(
            "href",
            UriUtils.createEntityAttributeUriPath(meta.getId(), entity.getIdValue(), attrName));
        entityMap.put(attrName, ref);
      }
    }

    return entityMap;
  }
1096197
@SuppressWarnings("unchecked")
    public HashMap<String, HashMap<String, String>> getMetaData() {
        HashMap<String, HashMap<String, String>> result = new HashMap<String, HashMap<String, String>>();
        for (MetaRecord mr : meta) {
            result.put((String) mr.get(FieldName.META_FILENAME),
                    (HashMap<String, String>) mr.get(FieldName.META_PROPERTIES));
        }
        return result;
    }
602584
protected FieldExtractor getMetadataExtractorOrFallback(Metadata meta, FieldExtractor fallbackExtractor) {
        if (metaExtractor != null) {
            FieldExtractor metaFE = metaExtractor.get(meta);
            if (metaFE != null) {
                return metaFE;
            }
        }
        return fallbackExtractor;
    }
841722
@Override
    public BeanMetaData getBeanMetaData(Object homeKey)
    {
        HomeRecord hr = homesByName.get(homeKey); // d366845.3
        return hr.bmd;
    }
1315670
public com.google.api.MetricDescriptor.MetricDescriptorMetadata getMetadata() {
    return metadata_ == null ? com.google.api.MetricDescriptor.MetricDescriptorMetadata.getDefaultInstance() : metadata_;
  }
1203572
public Metadata getMetadata(String typeName) {
        String scope = Metadata.scopeBasedOnType(typeName);
        return this.getMetadata(typeName, scope);
    }
666177
@PostMapping(
      value = "/{entityTypeId}/{id}",
      params = "_method=GET",
      produces = APPLICATION_JSON_VALUE)
  @ResponseBody
  public Map<String, Object> retrieveEntity(
      @PathVariable("entityTypeId") String entityTypeId,
      @PathVariable("id") String untypedId,
      @Valid @RequestBody EntityTypeRequest request) {
    Set<String> attributesSet = toAttributeSet(request != null ? request.getAttributes() : null);
    Map<String, Set<String>> attributeExpandSet =
        toExpandMap(request != null ? request.getExpand() : null);

    EntityType meta = dataService.getEntityType(entityTypeId);
    Object id = getTypedValue(untypedId, meta.getIdAttribute());
    Entity entity = dataService.findOneById(entityTypeId, id);

    if (entity == null) {
      throw new UnknownEntityException(meta, untypedId);
    }

    return getEntityAsMap(entity, meta, attributesSet, attributeExpandSet);
  }
716451
public static ServiceEndpoint decodeMetadata(String metadata) {
    try {
      return objectMapper.readValue(metadata, ServiceEndpoint.class);
    } catch (IOException e) {
      LOGGER.error("Failed to read metadata: " + e);
      return null;
    }
  }
336793
private Collection<MethodMetadata<?, ?>> getMethodMetadataOfType(AnnotatedType annotatedType, Collection<AnnotatedMethod> annotatedMethods) {
        Collection<MethodMetadata<?, ?>> methodMetadataOfType = new ArrayList<>();
        // Collect the getter methods as they provide annotations holding meta
        // information also to be applied to setters
        for (AnnotatedMethod annotatedMethod : annotatedMethods) {
            MethodMetadata<?, ?> methodMetadata;
            ImplementedBy implementedBy = annotatedMethod.getAnnotation(ImplementedBy.class);
            ResultOf resultOf = annotatedMethod.getAnnotation(ResultOf.class);
            if (implementedBy != null) {
                methodMetadata = new ImplementedByMethodMetadata<>(annotatedMethod, implementedBy.value(),
                        metadataFactory.createImplementedByMetadata(annotatedMethod));
            } else if (resultOf != null) {
                methodMetadata = createResultOfMetadata(annotatedMethod, resultOf);
            } else if (annotatedMethod instanceof PropertyMethod) {
                PropertyMethod propertyMethod = (PropertyMethod) annotatedMethod;
                Transient transientAnnotation = propertyMethod.getAnnotationOfProperty(Transient.class);
                if (transientAnnotation != null) {
                    methodMetadata = new TransientPropertyMethodMetadata(propertyMethod);
                } else {
                    methodMetadata = createPropertyMethodMetadata(annotatedType, propertyMethod);
                }
            } else {
                methodMetadata = new UnsupportedOperationMethodMetadata((UserMethod) annotatedMethod);
            }
            methodMetadataOfType.add(methodMetadata);
        }
        return methodMetadataOfType;
    }
704421
public static Map<String, String> resource(String type, Map<String, String> meta) {
        HashMap<String, String> authResource = new HashMap<String, String>();
        if (null != meta) {
            authResource.putAll(meta);
        }
        authResource.put(TYPE_FIELD, type);
        return authResource;
    }
837082
private EntityMetadata build(Class<V> clazz) throws MetadataException {
        return EntityMetadata.buildEntityMetadata(clazz, getCassandraClient());
    }
457536
public FieldMetadata getFieldMetadata(final String name)
    {
        return new FieldMetadata((ProxyFieldImpl)m_proxyObject.getProxyField(name),
                (PropertyMetadataImpl) m_classMetadata.getField(name));
    }
252751
@Override
    public MetaProperty<?> findMetaProperty(Class<?> beanType, MetaBean metaBean, String propertyName) {
        // dynamic beans force code by exception
        try {
            return metaBean.metaProperty(propertyName);
        } catch (NoSuchElementException ex) {
            return null;
        }
    }
215463
public static <T> Qualifier<T> byAnnotation(AnnotationMetadata metadata, Class<? extends Annotation> type) {
        if (Type.class == type) {
            Optional<Class> aClass = metadata.classValue(type);
            if (aClass.isPresent()) {
                return byType(aClass.get());
            }
        } else if (Named.class == type) {
            Optional<String> value = metadata.getValue(type, String.class);
            if (value.isPresent()) {
                return byName(value.get());
            }
        }
        return new AnnotationMetadataQualifier<>(metadata, type);
    }
79432
@Override
	public Collection<HttpMethod> getRequestMethod(Class<?> type, Method method) {
		return METHODS.computeIfAbsent(key(type, method), __ -> delegate.getRequestMethod(type, method));
	}
1187424
@SuppressWarnings("unused") // called through reflection by RequestServer
  public MetadataV3 fetchSchemaMetadata(int version, MetadataV3 docs) {
    if ("void".equals(docs.schemaname)) {
      docs.schemas = new SchemaMetadataV3[0];
      return docs;
    }

    docs.schemas = new SchemaMetadataV3[1];
    // NOTE: this will throw an exception if the classname isn't found:
    Schema schema = Schema.newInstance(docs.schemaname);
    // get defaults
    try {
      Iced impl = (Iced) schema.getImplClass().newInstance();
      schema.fillFromImpl(impl);
    }
    catch (Exception e) {
      // ignore if create fails; this can happen for abstract classes
    }
    SchemaMetadataV3 meta = new SchemaMetadataV3(new SchemaMetadata(schema));
    docs.schemas[0] = meta;
    return docs;
  }