Examples of XBELStatementGroup


Examples of org.openbel.bel.xbel.model.XBELStatementGroup

     */
    @Override
    public XBELStatementGroup convert(StatementGroup source) {
        if (source == null) return null;

        XBELStatementGroup xsg = new XBELStatementGroup();

        AnnotationGroup ag = source.getAnnotationGroup();
        AnnotationGroupConverter agConverter = new AnnotationGroupConverter();
        // Defer to AnnotationGroupConverter
        XBELAnnotationGroup xag = agConverter.convert(ag);
        xsg.setAnnotationGroup(xag);

        String name = source.getName();
        xsg.setName(name);

        String comment = source.getComment();
        xsg.setComment(comment);

        List<Statement> statements = source.getStatements();
        StatementConverter sConverter = new StatementConverter();
        if (hasItems(statements)) {
            List<XBELStatement> xstmts = xsg.getStatement();
            for (final Statement stmt : statements) {
                // Defer to StatementConverter
                xstmts.add(sConverter.convert(stmt));
            }
        }

        List<StatementGroup> statementGroups = source.getStatementGroups();
        if (hasItems(statementGroups)) {
            List<XBELStatementGroup> xstmtgroup = xsg.getStatementGroup();
            for (final StatementGroup sg : statementGroups) {
                xstmtgroup.add(convert(sg));
            }
        }

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.