Get all the annotation by a given name.
518591
def get_all(self, name):
        
        return [annot for annot in self.all_annotations if annot.name == name]
390236
public static AnnotationNode getAnnotation(AnnotatedNode node, String name) {
        List<AnnotationNode> annotations = node.getAnnotations();
        for (AnnotationNode annot : annotations) {
            if (annot.getClassNode().getName().equals(name)) {
                return annot;
            }
        }
        return null;
    }
612814
def get_annotations(self, min_rho=None):
        '''
        
        '''
        return (a for a in self.annotations if min_rho is None or a.score > min_rho)
246098
def get_all_names(self):
        """"""
        result = set()
        for module in self.names:
            result.update(set(self.names[module]))
        return result
1014972
def parse_annotation(obj: dict) -> BioCAnnotation:
    """"""
    ann = BioCAnnotation()
    ann.id = obj['id']
    ann.infons = obj['infons']
    ann.text = obj['text']
    for loc in obj['locations']:
        ann.add_location(BioCLocation(loc['offset'], loc['length']))
    return ann
485473
def _get_objanno(self, assoc_fn):
        """"""
        # Determine annotation file format from filename, if possible
        anno_type = get_anno_desc(assoc_fn, None)
        # Default annotation file format is id2gos
        if anno_type is None:
            anno_type = self.args.annofmt if self.args.annofmt else 'id2gos'
        kws = {'taxid': self.args.taxid} if anno_type == 'gene2go' else {}
        return get_objanno(assoc_fn, anno_type, **kws)
172348
def get_by_name(self, name):
        
        san_managers = self._client.get_all()
        result = [x for x in san_managers if x['name'] == name]
        return result[0] if result else None
1210826
private void extractAnnotation() {
		for (Class<? extends IFile> clazz : LISTE_CLASS) {

			Map<ITag, AnnotationData> maps = new HashMap<ITag, AnnotationData>();
			Set<AnnotationData> set = new TreeSet<AnnotationData>();

			Field[] fields = clazz.getDeclaredFields();
			for (Field field : fields) {
				AnnotationData param = new AnnotationData();
				field.setAccessible(true);
				param.setField(field);
				Data annotation = field.getAnnotation(Data.class);
				if (annotation != null) {
					param.initFromAnnotation(annotation);
					maps.put(param.getTag(), param);
					try {
						set.add((AnnotationData) param.clone());
					} catch (CloneNotSupportedException e) {
						// do nothing
					}
				}
			}
			mapSet.put(clazz.getName(), set);
			map.put(clazz.getName(), maps);
		}
	}
615595
def get_person_by_full_name(self, name):
        """"""
        return next((person for person in self.get_all_people()
                     if person.full_name.lower() == name.lower()), None)
36215
def getAnnotations_via_tid(self,
                               tids,
                               LIMIT=25,
                               _print=True,
                               crawl=False):
        
        url_base = self.base_url + \
            '/api/1/term/get-annotations/{tid}?key=' + self.api_key
        urls = [url_base.format(tid=str(tid)) for tid in tids]
        return self.get(urls,
                        LIMIT=LIMIT,
                        _print=_print,
                        crawl=crawl)
1309736
def get_all(self, name, default=None):
        """"""
        if default is None:
            default = []
        return self._headers.get_list(name) or default
565094
private String getAnnotations(Annotate annotator, String stringFromClient)
      throws JDOMException, IOException {
    // get a breader from the string coming from the client
    BufferedReader clientReader = new BufferedReader(
        new StringReader(stringFromClient));
    KAFDocument kaf = KAFDocument.createFromStream(clientReader);
    KAFDocument.LinguisticProcessor newLp = kaf.addLinguisticProcessor(
        "entities", "ixa-pipe-nerc-" + Files.getNameWithoutExtension(model),
        version + "-" + commit);
    newLp.setBeginTimestamp();
    annotator.annotateNEsToKAF(kaf);
    // get outputFormat
    String kafToString = null;
    if (outputFormat.equalsIgnoreCase("conll03")) {
      kafToString = annotator.annotateNEsToCoNLL2003(kaf);
    } else if (outputFormat.equalsIgnoreCase("conll02")) {
      kafToString = annotator.annotateNEsToCoNLL2002(kaf);
    } else {
      newLp.setEndTimestamp();
      kafToString = kaf.toString();
    }
    return kafToString;
  }
535155
async def _get_annotations(entity_tag, connection):
    
    facade = client.AnnotationsFacade.from_connection(connection)
    result = (await facade.Get([{"tag": entity_tag}])).results[0]
    if result.error is not None:
        raise JujuError(result.error)
    return result.annotations
718780
def get_by(self, name):
    """"""
    return next((item for item in self if item.name == name), None)
32390
public function getAnnotation($name)
    {
        return $this->annotations
            ->map(
                function (ArrayMap $value) use ($name) {
                    return $value->lookup($name);
                }
            )
            ->filter(
                function (Maybe $value) {
                    return $value->isJust();
                }
            )
            ->map(
                function (Maybe $value) {
                    return Maybe::fromJust($value);
                }
            );
    }
1114948
def get_edges_with_annotation(self, annotation: str, value: str) -> List[Edge]:
        """"""
        query = self.session.query(Edge).join(NamespaceEntry, Edge.annotations).join(Namespace)
        query = query.filter(Namespace.keyword == annotation).filter(NamespaceEntry.name == value)
        return query.all()
1057745
private boolean containsAnnotation(List<AnnotationExpr> annos, String annotationName) {
        for (AnnotationExpr anno : annos) {
            if (anno.getName().getName().equals(annotationName)) {
                return true;
            }
        }
        return false;
    }