Package org.sbml.jsbml.ext.fbc

Examples of org.sbml.jsbml.ext.fbc.Objective


        ListOf<Objective> listOfObjectives = fbcModel.getListOfObjectives();
        groupList = FBCList.listOfObjectives;
        return listOfObjectives;
      }
    } else if (contextObject instanceof Objective) {
      Objective objective = (Objective) contextObject;

      if (elementName.equals("listOfFluxObjectives") || elementName.equals("listOfFluxes")) {
        // listOfFluxes was the first name of listOfFluxObjectives in the preliminary specifications
        ListOf<FluxObjective> listOfFluxObjectives = objective.getListOfFluxObjectives();
        groupList = FBCList.listOfFluxObjectives;
        return listOfFluxObjectives;
      }
    }

    else if (contextObject instanceof ListOf<?>) {
      ListOf<SBase> listOf = (ListOf<SBase>) contextObject;

      if (elementName.equals("fluxBound")
          && groupList.equals(FBCList.listOfFluxBounds)) {
        Model model = (Model) listOf.getParentSBMLObject();
        FBCModelPlugin extendeModel = (FBCModelPlugin) model.getExtension(FBCConstants.namespaceURI);

        FluxBound fluxBound = new FluxBound();
        extendeModel.addFluxBound(fluxBound);
        return fluxBound;

      } else if (elementName.equals("objective")
          && groupList.equals(FBCList.listOfObjectives)) {
        Model model = (Model) listOf.getParentSBMLObject();
        FBCModelPlugin extendeModel = (FBCModelPlugin) model.getExtension(FBCConstants.namespaceURI);

        Objective objective = new Objective();
        extendeModel.addObjective(objective);

        return objective;
      } else if (elementName.equals("fluxObjective")
          && groupList.equals(FBCList.listOfFluxObjectives)) {
        Objective objective = (Objective) listOf.getParentSBMLObject();

        FluxObjective fluxObjective = new FluxObjective();
        objective.addFluxObjective(fluxObjective);

        return fluxObjective;
      }

    }
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.ext.fbc.Objective

Copyright © 2018 www.massapicom. 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.