Examples of BELAnnotation


Examples of org.openbel.bel.model.BELAnnotation

        BELStatement stmt = stmts.get(0);
        List<BELAnnotation> annos = stmt.getAnnotations();
        assertTrue(annos.size() == 1);

        BELAnnotation anno = annos.get(0);
        assertTrue(anno.getValues().size() == 1);

        assertTrue("0.42".equals(anno.getValues().get(0)));
    }
View Full Code Here

Examples of org.openbel.bel.model.BELAnnotation

                    final String name = an.getText();

                    BELAnnotationDefinition ad = definedAnnotations.get(name);
                    if (ad != null) {
                        // read annotation value
                        final BELAnnotation annotation;
                        if (qv != null) {
                            annotation = new BELAnnotation(ad, qv.getText());
                        } else if (oi != null) {
                            annotation = new BELAnnotation(ad, oi.getText());
                        } else {
                            if (list == null) {
                                throw new IllegalStateException("Did not understand annotation value, expecting annotation list form.");
                            }

                            String listvalues = list.getText();
                            listvalues = listvalues.substring(1, listvalues.length() - 1);
                            annotation = new BELAnnotation(ad, Arrays.asList(ParserUtil.parseListRecord(listvalues)));
                        }

                        if (activeStatementGroup != null) {
                            // add to local statement group scope
                            sgAnnotationContext.put(name, annotation);
View Full Code Here

Examples of org.openbel.bel.model.BELAnnotation

            }

            values.add(ann.getValue());
        }

        return new BELAnnotation(badc.convert(ad), values);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.