Package org.sbml.jsbml.ext.qual

Examples of org.sbml.jsbml.ext.qual.Transition


        String speciesId = data[0];
        String role = data[1];
        generateAllEdges(rGlyph, speciesId, role);
      }
    }
    Transition transition = getTransitionForReactionGlyph(rGlyph);
    if (transition != null){
      List<String[]> connectedQSpecies = getConnectedQualitativeSpecies(transition);
      for (String[] data : connectedQSpecies){
        String qSpeciesId = data[0];
        String role = data[1];
View Full Code Here


  public Transition getTransitionForReactionGlyph(ReactionGlyph rGlyph) {
    if (qModel == null || !rGlyph.isSetReaction()){
      return null;
    }
    String reactionId = rGlyph.getReaction();
    Transition transition = null;
    if (qModel.isSetListOfTransitions()) {
      for (Transition t : qModel.getListOfTransitions()) {
        if (t.getId().equals(reactionId)) {
          transition = t;
          break;
View Full Code Here

      CyNode rNode = Cytoscape.getCyNode(rGlyph.getId(), false);
      if (rGlyph.isSetListOfSpeciesReferencesGlyphs()) {
       
        if (rGlyph.isSetReaction()) {
          String reactionId = rGlyph.getReaction();
          Transition transition = (Transition) qModel.getTransition(reactionId);
          if (transition != null){
            for (SpeciesReferenceGlyph sRefGlyph: rGlyph.getListOfSpeciesReferenceGlyphs()){
              String sGlyphId = sRefGlyph.getSpeciesGlyph();
              SpeciesGlyph sGlyph = layout.getSpeciesGlyph(sGlyphId);
             
View Full Code Here

        ListOf<Transition> listOfObjectives = qualModel.getListOfTransitions();
        groupList = QualList.listOfTransitions;
        return listOfObjectives;
      }
    } else if (contextObject instanceof Transition) {
      Transition transition = (Transition) contextObject;

      if (elementName.equals("listOfInputs")) {
        ListOf<Input> listOfInputs = transition.getListOfInputs();
        groupList = QualList.listOfInputs;
        return listOfInputs;
      } else if (elementName.equals("listOfOutputs")) {
        ListOf<Output> listOfOutputs = transition.getListOfOutputs();
        groupList = QualList.listOfOutputs;
        return listOfOutputs;
      } else if (elementName.equals("listOfFunctionTerms")) {
        ListOf<FunctionTerm> listOfFunctionTerms = transition.getListOfFunctionTerms();
        groupList = QualList.listOfFunctionTerms;
        return listOfFunctionTerms;
      }
    }
    else if (contextObject instanceof ListOf<?>) {
      ListOf<SBase> listOf = (ListOf<SBase>) contextObject;

      if (elementName.equals("transition") && groupList.equals(QualList.listOfTransitions)) {
        Model model = (Model) listOf.getParentSBMLObject();
        QualitativeModel extendeModel = (QualitativeModel) model.getExtension(QualConstants.namespaceURI);

        Transition transition = new Transition();
        extendeModel.addTransition(transition);
        return transition;

      } else if ((elementName.equals("qualitativeSpecies")) && groupList.equals(QualList.listOfQualitativeSpecies)) {
        Model model = (Model) listOf.getParentSBMLObject();
        QualitativeModel extendeModel = (QualitativeModel) model.getExtension(QualConstants.namespaceURI);

        QualitativeSpecies qualSpecies = new QualitativeSpecies();
        extendeModel.addQualitativeSpecies(qualSpecies);
        return qualSpecies;

      } else if (elementName.equals("input") && groupList.equals(QualList.listOfInputs)) {
        Transition transition = (Transition) listOf.getParentSBMLObject();

        Input input = new Input();
        transition.addInput(input);
        return input;

      } else if (elementName.equals("output") && groupList.equals(QualList.listOfOutputs)) {
        Transition transition = (Transition) listOf.getParentSBMLObject();

        Output output = new Output();
        transition.addOutput(output);
        return output;

      } else if (elementName.equals("functionTerm") && groupList.equals(QualList.listOfFunctionTerms)) {
        Transition transition = (Transition) listOf.getParentSBMLObject();

        FunctionTerm functionTerm = new FunctionTerm();
        transition.addFunctionTerm(functionTerm);
        return functionTerm;

      } else if (elementName.equals("defaultTerm") && groupList.equals(QualList.listOfFunctionTerms)) {
        Transition transition = (Transition) listOf.getParentSBMLObject();

        FunctionTerm functionTerm = new FunctionTerm();
        functionTerm.setDefaultTerm(true);
        transition.addFunctionTerm(functionTerm);
        return functionTerm;
      }
    }
    return contextObject;
  }
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.ext.qual.Transition

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.