本文整理了Java中org.molgenis.data.Entity.getAttributeNames()
方法的一些代码示例,展示了Entity.getAttributeNames()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.getAttributeNames()
方法的具体详情如下:
包路径:org.molgenis.data.Entity
类名称:Entity
方法名:getAttributeNames
暂无
代码示例来源:origin: org.molgenis/molgenis-settings
@Override
public Iterable<String> getAttributeNames() {
return getEntity().getAttributeNames();
}
代码示例来源:origin: org.molgenis/molgenis-data-annotators
private Stream<Entity> createVariantEffectStructureForSingleEntity(Attribute attributeToParse,
ArrayList<Attribute> effectFieldAttributeList, EntityType effectsEntityType, Entity vcfInputEntity,
EntityType variantEntityType)
{
List<Entity> results = new ArrayList<>();
Entity variantEntity = new DynamicEntity(variantEntityType);
for (String attr : variantEntity.getAttributeNames())
{
if (vcfInputEntity.getEntityType().getAttribute(attr) != null)
{
variantEntity.set(attr, vcfInputEntity.get(attr));
}
}
List<Entity> result = createEffectsEntitiesForSingleVariant(effectsEntityType, effectFieldAttributeList,
vcfInputEntity.getString(attributeToParse.getName()), variantEntity).collect(Collectors.toList());
results.addAll(result);
return results.stream();
}
代码示例来源:origin: org.molgenis/molgenis-annotators-cmd
private Stream<Entity> createVariantEffectStructureForSingleEntity(Attribute attributeToParse,
ArrayList<Attribute> effectFieldAttributeList, EntityType effectsEntityType, Entity vcfInputEntity,
EntityType variantEntityType)
{
List<Entity> results = new ArrayList<>();
Entity variantEntity = new DynamicEntity(variantEntityType);
for (String attr : variantEntity.getAttributeNames())
{
if (vcfInputEntity.getEntityType().getAttribute(attr) != null)
{
variantEntity.set(attr, vcfInputEntity.get(attr));
}
}
List<Entity> result = createEffectsEntitiesForSingleVariant(effectsEntityType, effectFieldAttributeList,
vcfInputEntity.getString(attributeToParse.getName()), variantEntity).collect(Collectors.toList());
results.addAll(result);
return results.stream();
}
代码示例来源:origin: org.molgenis/molgenis-ontology
/**
* A helper function to check if the ontology term (OT) contains the ontology annotations provided
* in input. If the OT has the same annotation, the OT will be considered as a good match and the
* similarity scores 100 are allocated to the OT
*/
private Entity calculateNGromOTAnnotations(Entity inputEntity, Entity ontologyTermEntity) {
OntologyTermHitEntity mapEntity =
new OntologyTermHitEntity(ontologyTermEntity, ontologyTermHitMetaData);
for (Entity annotationEntity :
ontologyTermEntity.getEntities(OntologyTermMetaData.ONTOLOGY_TERM_DYNAMIC_ANNOTATION)) {
String annotationName =
annotationEntity.getString(OntologyTermDynamicAnnotationMetaData.NAME);
String annotationValue =
annotationEntity.getString(OntologyTermDynamicAnnotationMetaData.VALUE);
for (String attributeName : inputEntity.getAttributeNames()) {
if (StringUtils.isNotEmpty(inputEntity.getString(attributeName))
&& StringUtils.equalsIgnoreCase(attributeName, annotationName)
&& StringUtils.equalsIgnoreCase(
inputEntity.getString(attributeName), annotationValue)) {
mapEntity.set(SCORE, 100d);
mapEntity.set(COMBINED_SCORE, 100d);
return mapEntity;
}
}
}
return mapEntity;
}
代码示例来源:origin: org.molgenis/molgenis-ontology
for (String attributeName : inputEntity.getAttributeNames()) {
if (StringUtils.isNotEmpty(inputEntity.getString(attributeName))
&& !attributeName.equalsIgnoreCase(DEFAULT_MATCHING_IDENTIFIER)) {
代码示例来源:origin: org.molgenis/molgenis-das
List<String> attributes = Lists.newArrayList(entity.getAttributeNames().iterator());
if (stopAttribute != null)
代码示例来源:origin: org.molgenis/molgenis-omx-biobankconnect
Iterable<String> attributeNames = entity.getAttributeNames();
for (String attributeName : attributeNames)
代码示例来源:origin: org.molgenis/molgenis-ontology
.getAttributeNames()
.forEach(
attributeName -> {
代码示例来源:origin: org.molgenis/molgenis-ontology
Entity addLexicalScoreToMatchedEntity(
Entity inputEntity,
Entity ontologyTerm,
String ontologyIri) // TODO Change 'Entity ontologyTerm' to 'OntologyTerm ontologyTerm'
{
double maxNgramScore = 0;
double maxNgramIDFScore = 0;
for (String inputAttrName : inputEntity.getAttributeNames()) {
String queryString = inputEntity.getString(inputAttrName);
if (StringUtils.isNotEmpty(queryString) && isAttrNameValidForLexicalMatch(inputAttrName)) {
Entity topMatchedSynonymEntity =
findSynonymWithHighestNgramScore(ontologyIri, queryString, ontologyTerm);
if (maxNgramScore < topMatchedSynonymEntity.getDouble(SCORE)) {
maxNgramScore = topMatchedSynonymEntity.getDouble(SCORE);
}
if (maxNgramIDFScore < topMatchedSynonymEntity.getDouble(COMBINED_SCORE)) {
maxNgramIDFScore = topMatchedSynonymEntity.getDouble(COMBINED_SCORE);
}
}
}
OntologyTermHitEntity mapEntity =
new OntologyTermHitEntity(ontologyTerm, ontologyTermHitMetaData);
mapEntity.set(SCORE, maxNgramScore);
mapEntity.set(COMBINED_SCORE, maxNgramIDFScore);
return mapEntity;
}
内容来源于网络,如有侵权,请联系作者删除!