Examples of BELObject


Examples of org.openbel.framework.common.model.BELObject

        if (noItems(args) || args.size() != 2) {
            // Two function arguments only
            return false;
        }

        BELObject x = args.get(0);
        if (!(x instanceof Parameter)) {
            // First argument must be a parameter
            return false;
        }

        BELObject y = args.get(1);
        if (!(y instanceof Term)) {
            // Second argument must be a term
            return false;
        }
View Full Code Here

Examples of org.openbel.framework.common.model.BELObject

    @Override
    public List<Statement> expand(Term term) {
        List<Statement> statements = new ArrayList<Statement>();

        // first argument of a protein mod term is the protein parameter
        BELObject proteinArgument = term.getFunctionArguments().get(0);
        Parameter pp = (Parameter) proteinArgument;

        // second argument of a protein mod term is the modification
        BELObject modArgument = term.getFunctionArguments().get(1);
        Term mt = (Term) modArgument;

        FunctionEnum fx = mt.getFunctionEnum();

        Term proteinTrm = new Term(PROTEIN_ABUNDANCE);
View Full Code Here

Examples of org.openbel.framework.common.model.BELObject

        bldr.append("(");

        List<BELObject> functionArguments = term.getFunctionArguments();
        if (hasItems(functionArguments)) {
            for (int i = 0; i < functionArguments.size(); i++) {
                final BELObject bo = functionArguments.get(i);

                String arg = null;
                if (bo instanceof Parameter) {
                    arg = processParameter((Parameter) bo);
                } else if (bo instanceof Term) {
                    arg = processTerm((Term) bo);
                    if (arg == null) continue;
                } else {
                    String type = bo.getClass().getName();
                    final String err = "unknown function argument " + type;
                    throw new UnsupportedOperationException(err);
                }
                if (i != 0) bldr.append(",");
                bldr.append(arg);
View Full Code Here

Examples of org.openbel.framework.common.model.BELObject

        bldr.append("(");

        List<BELObject> functionArguments = term.getFunctionArguments();
        if (hasItems(functionArguments)) {
            for (int i = 0; i < functionArguments.size(); i++) {
                final BELObject bo = functionArguments.get(i);

                String arg = null;
                if (bo instanceof Term) {
                    arg = processTerm((Term) bo);
                    if (arg == null) continue;
                } else {
                    String type = bo.getClass().getName();
                    final String err = "unhandled function argument " + type;
                    throw new UnsupportedOperationException(err);
                }
                if (i != 0) bldr.append(",");
                bldr.append(arg);
View Full Code Here

Examples of org.openbel.framework.common.model.BELObject

        if (noItems(args)) {
            // At least one function argument is required
            return false;
        }

        BELObject x = args.get(0);
        if (!(x instanceof Term)) {
            // First argument must be a term
            return false;
        }
        return true;
View Full Code Here

Examples of org.openbel.framework.common.model.BELObject

    @Override
    public List<Statement> expand(Term translocation) {
        List<Statement> statements = new ArrayList<Statement>();

        BELObject firstArgument = translocation.getFunctionArguments().get(0);

        Term abundance = (Term) firstArgument; // first argument of a
                                               // translocation term is the
                                               // abundance
        // tranlocation connects the abundance term with TRANSLOCATES
View Full Code Here

Examples of org.openbel.framework.common.model.BELObject

        if (noItems(args)) {
            // Must have at least one function argument
            return false;
        }

        BELObject x = args.get(0);
        if (!(x instanceof Term)) {
            // First argument must be a term
            return false;
        }
        return true;
View Full Code Here

Examples of org.openbel.framework.common.model.BELObject

     */
    @Override
    public List<Statement> expand(Term activity) {
        List<Statement> statements = new ArrayList<Statement>();

        BELObject firstArgument = activity.getFunctionArguments().get(0);
        Term abundance = (Term) firstArgument; // only argument of a moleculary
                                               // activity term is the abundance
        // Molecular activities connect to its abundance term with ACTS_IN
        // relationship
        final Object obj = new Object(activity);
View Full Code Here

Examples of org.openbel.framework.common.model.BELObject

        if (noItems(args) || args.size() != 2) {
            // Two function arguments only
            return false;
        }

        BELObject x = args.get(0);
        if (!(x instanceof Term)) {
            // First argument must be a term
            return false;
        }

        BELObject y = args.get(1);
        if (!(y instanceof Term)) {
            // Second argument must be a term
            return false;
        }
View Full Code Here

Examples of org.openbel.framework.common.model.BELObject

     */
    @Override
    public List<Statement> expand(Term reaction) {
        List<Statement> statements = new ArrayList<Statement>();

        BELObject firstArgument = reaction.getFunctionArguments().get(0);
        BELObject secondArgument = reaction.getFunctionArguments().get(1);
        // first argument of a reaction is the reactants
        Term reactants = (Term) firstArgument;
        // second argument of a reaction is the products
        Term products = (Term) secondArgument;

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.