Converts {@link org.openbel.framework.common.enums.CitationType} to
{@link CitationType}.

@param objCitationType Citation type
@return {@link CitationType}; may be null
438721
public static
            CitationType
            convert(
                    org.openbel.framework.common.enums.CitationType objCitationType) {
        if (objCitationType == null) {
            return null;
        }
        switch (objCitationType) {
        case BOOK:
            return CitationType.BOOK;
        case JOURNAL:
            return CitationType.JOURNAL;
        case ONLINE_RESOURCE:
            return CitationType.ONLINE_RESOURCE;
        case OTHER:
            return CitationType.OTHER;
        case PUBMED:
            return CitationType.PUBMED;
        default:
            return null;
        }
    }
155340
def objc_type_encoding(self):
        """"""
        if not hasattr(self, '_objc_type_encoding'):
            self._objc_type_encoding = \
              conf.lib.clang_getDeclObjCTypeEncoding(self)

        return self._objc_type_encoding
1085003
@SuppressWarnings("unchecked")
    public <T> Serializer<T> getSerializer(Class<T> type, String mediaType) throws SerializationException {
        checkNotNull(type, "Type (Class<T>) cannot be null.");
        checkNotNull(mediaType, "Media-Type cannot be null.");

        final String typeName = getClassName(type);
        final Key key = new Key(typeName, mediaType);

        logger.log(Level.FINE, "Querying for Serializer of type '" + typeName + "' and " + "media-type '" + mediaType
                + "'.");

        ArrayList<SerializerHolder> holders = serializers.get(typeName);
        if (holders != null) {
            for (SerializerHolder holder : holders) {
                if (holder.key.matches(key)) {
                    logger.log(Level.FINE, "Serializer for type '" + holder.serializer.handledType() + "' and " +
                            "media-type '" + Arrays.toString(holder.serializer.mediaType()) + "' matched: " +
                            holder.serializer.getClass().getName());
                    return (Serializer<T>) holder.serializer;
                }
            }
        }

        logger.log(Level.WARNING, "There is no Serializer registered for type " + type.getName() +
                " and media-type " + mediaType + ". If you're relying on auto-generated serializers," +
                " please make sure you imported the correct GWT Module.");

        return null;
    }
333758
@SuppressWarnings("unused")
    protected static Class<?> findModelIdTypeByAnnotation(Class<?> modelType, Class<? extends Annotation> idAnnotation) {
        Class<?> curClass = modelType;
        while (Object.class != curClass && null != curClass) {
            for (Field f : curClass.getDeclaredFields()) {
                if (f.isAnnotationPresent(idAnnotation)) {
                    return f.getType();
                }
            }
            curClass = curClass.getSuperclass();
        }
        return null;
    }
332937
public static ObjectFields convertGenObjectFieldsToObjectFields(org.fcrepo.server.types.gen.ObjectFields source) {
        if (source == null) {
            return null;
        }
        ObjectFields result = new ObjectFields();
        result.setPid(source.getPid() != null ? source.getPid().getValue() : null);
        result.setLabel(source.getLabel() != null ? source.getLabel().getValue() : null);
        result.setState(source.getState() != null ? source.getState().getValue() : null);
        result.setOwnerId(source.getOwnerId() != null ? source.getOwnerId().getValue() : null);
        result.setCDate(source.getCDate() != null ? DateUtility.convertStringToDate(source.getCDate().getValue()) : null);
        result.setMDate(source.getMDate() != null ? DateUtility.convertStringToDate(source.getMDate().getValue()) : null);
        result.setDCMDate(source.getDcmDate() != null ? DateUtility.convertStringToDate(source.getDcmDate().getValue()) : null);
        result.titles().addAll(convertStringArray(source.getTitle()));
        result.subjects().addAll(convertStringArray(source.getSubject()));
        result.descriptions()
                .addAll(convertStringArray(source.getDescription()));
        result.publishers().addAll(convertStringArray(source.getPublisher()));
        result.contributors()
                .addAll(convertStringArray(source.getContributor()));
        result.dates().addAll(convertStringArray(source.getDate()));
        result.types().addAll(convertStringArray(source.getType()));
        result.formats().addAll(convertStringArray(source.getFormat()));
        result.identifiers().addAll(convertStringArray(source.getIdentifier()));
        result.sources().addAll(convertStringArray(source.getSource()));
        result.languages().addAll(convertStringArray(source.getLanguage()));
        result.relations().addAll(convertStringArray(source.getRelation()));
        result.coverages().addAll(convertStringArray(source.getCoverage()));
        result.rights().addAll(convertStringArray(source.getRights()));
        return result;
    }
541502
private IntermediateParseResults getEntityTypeFromSource(RepositoryCollection source) {
    IntermediateParseResults intermediateResults = parseTagsSheet(source.getRepository(EMX_TAGS));

    parsePackagesSheet(source.getRepository(EMX_PACKAGES), intermediateResults);
    parseEntitiesSheet(source.getRepository(EMX_ENTITIES), intermediateResults);
    parseAttributesSheet(source.getRepository(EMX_ATTRIBUTES), intermediateResults);
    reiterateToMapRefEntity(source.getRepository(EMX_ATTRIBUTES), intermediateResults);

    // languages tab
    if (source.hasRepository(EMX_LANGUAGES))
      parseLanguages(source.getRepository(EMX_LANGUAGES), intermediateResults);

    // i18nstrings tab
    if (source.hasRepository(EMX_I18NSTRINGS))
      parseI18nStrings(source.getRepository(EMX_I18NSTRINGS), intermediateResults);

    postProcessMetadata(intermediateResults);

    return intermediateResults;
  }
671576
public BaseTypeId getBaseTypeId(final Class<? extends GraphObject> type) {

		final CMISInfo info = getCMISInfo(type);
		if (info != null) {

			return info.getBaseTypeId();
		}

		return null;
	}
920428
@Override
    public Type<?> getIdType()
    {
        if (idAttribute != null && !isIdClass)
        {
            return idAttribute.getType();
        }

        return getSupertype().getIdType();
    }
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);
  }
1013165
@RequestMapping(value = "information/{entityType}/{id}", method = RequestMethod.GET)
    public Resources<EntityInformation> getInformation(@PathVariable ProjectEntityType entityType, @PathVariable ID id) {
        // Gets the entity
        ProjectEntity entity = getEntity(entityType, id);
        // List of informations to return
        List<EntityInformation> informations = extensionManager.getExtensions(EntityInformationExtension.class).stream()
                .map(x -> x.getInformation(entity))
                .filter(Optional::isPresent)
                .map(Optional::get)
                .collect(Collectors.toList());

        // OK
        return Resources.of(
                informations,
                uri(MvcUriComponentsBuilder.on(getClass()).getInformation(entityType, id))
        );
    }
847839
public String findStringValue(JvmAnnotationTarget op, Class<? extends Annotation> annotationType) {
		final JvmAnnotationReference reference = this.lookup.findAnnotation(op, annotationType);
		if (reference != null) {
			return findStringValue(reference);
		}
		return null;
	}
127025
public SparkDocumentStream annotate(@NonNull AnnotatableType... types) {
      return new SparkDocumentStream(source.map(json -> {
         Hermes.initializeWorker(configBroadcast.value());
         if (Document.hasAnnotations(json, types)) {
            return json;
         }
         Document document = Document.fromJson(json);
         Pipeline.process(document, types);
         return document.toJson();
      }));
   }
583516
public Response getEntityListByType(String entityType) {
        try {
            Preconditions.checkNotNull(entityType, "Entity type cannot be null");

            if (LOG.isDebugEnabled()) {
                LOG.debug("Fetching entity list for type={} ", entityType);
            }

            final List<String> entityList = metadataService.getEntityList(entityType);

            JSONObject response = new JSONObject();
            response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId());
            response.put(AtlasClient.TYPENAME, entityType);
            response.put(AtlasClient.RESULTS, new JSONArray(entityList));
            response.put(AtlasClient.COUNT, entityList.size());

            return Response.ok(response).build();
        } catch (NullPointerException e) {
            LOG.error("Entity type cannot be null", e);
            throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
        } catch (AtlasException | IllegalArgumentException e) {
            LOG.error("Unable to get entity list for type {}", entityType, e);
            throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
        } catch (WebApplicationException e) {
            LOG.error("Unable to get entity list for type {}", entityType, e);
            throw e;
        } catch (Throwable e) {
            LOG.error("Unable to get entity list for type {}", entityType, e);
            throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
        }
    }
1055810
public JvmTypeReference inferredType() {
		XComputedTypeReference result = xtypesFactory.createXComputedTypeReference();
		result.setTypeProvider(new InferredTypeIndicator(null));
		return result;
	}
299165
def _generate_annotation_type_class(self, ns, annotation_type):
        # type: (ApiNamespace, AnnotationType) -> None
        """"""
        self.emit('class {}(object):'.format(class_name_for_annotation_type(annotation_type, ns)))
        with self.indent():
            self._generate_annotation_type_class_init(ns, annotation_type)
            self._generate_annotation_type_class_properties(ns, annotation_type)
        self.emit()
1212610
@SuppressWarnings("unchecked")
    public <T extends Annotation> T getParameterAnnotation(Class<T> annotationType) {
        Annotation[] anns = getParameterAnnotations();
        for (Annotation ann : anns) {
            if (annotationType.isInstance(ann)) {
                return (T) ann;
            }
        }
        return null;
    }
405496
public String getGenericType(RepositoryOperation op) {
		GenericAccessObjectStrategy strategy = genericAccessObjectStrategies.get(op.getName());
		if (strategy == null) {
			return "";
		} else {
			return strategy.getGenericType(op);
		}
	}