Package org.sbml.jsbml.ext.layout

Examples of org.sbml.jsbml.ext.layout.SpeciesGlyph


          box.setVersion(version);
          box.setPosition(point);
          box.setDimensions(dim);
         
          if (nodeType.equals(CySBMLConstants.NODETYPE_SPECIES)){
            SpeciesGlyph sGlyph = new SpeciesGlyph();
            sGlyph.setId(nodeId);
            sGlyph.setVersion(version);
            sGlyph.setLevel(level);
            sGlyph.setBoundingBox(box);
            sGlyph.setSpecies(nodeId);
            layout.addSpeciesGlyph(sGlyph);
           
          }
          else if (nodeType.equals(CySBMLConstants.NODETYPE_REACTION)){
            ReactionGlyph rGlyph = new ReactionGlyph();
View Full Code Here


            System.err.println("reactionId in in ReactionGlyph is not in SBML model: " + reactionId);
            continue;
          }
          for (SpeciesReferenceGlyph sRefGlyph : rGlyph.getListOfSpeciesReferenceGlyphs()) {
            String sGlyphId = sRefGlyph.getSpeciesGlyph();
            SpeciesGlyph sGlyph = layout.getSpeciesGlyph(sGlyphId);
           
            String edgeType = getEdgeTypeFromSpeciesReferenceGlyphRole(sRefGlyph);
            // if not found try via SBML model
            if (edgeType.equals(CySBMLConstants.EDGETYPE_UNDEFINED)){
              edgeType = getEdgeTypeFromSBMLModel(reaction, sGlyph);
View Full Code Here

          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);
             
              String edgeType = getEdgeTypeFromSpeciesReferenceGlyphRole(sRefGlyph);
              // if not found try via SBML model
              if (edgeType.equals(CySBMLConstants.EDGETYPE_UNDEFINED)){
                edgeType = getEdgeTypeFromQualModel(transition, sGlyph);
View Full Code Here

    Layout layout = extendedModel.getLayout(0);

    // System.out.println("Group sboTerm, id = " + group.getSBOTermID() + ", " + group.getId()); print dimension
    System.out.println("Nb SpeciesGlyphs = " + layout.getListOfSpeciesGlyphs().size());

    SpeciesGlyph  speciesGlyph = layout.getSpeciesGlyph(0);

    // System.out.println("Member(0).symbol = " + member.getSymbol());

  }
View Full Code Here

              groupList = LayoutList.listOfTextGlyphs;
              return textGlyph;
            } else if (elementName.equals("speciesGlyph")
                && groupList.equals(LayoutList.listOfSpeciesGlyphs)) {
              ListOf<SpeciesGlyph> listOfSpeciesGlyph = (ListOf<SpeciesGlyph>) contextObject;
              SpeciesGlyph speciesGlyph = (SpeciesGlyph) newContextObject;
              setNamespace(listOfSpeciesGlyph, namespaceURI);
              setNamespace(speciesGlyph, namespaceURI);
              listOfSpeciesGlyph.add(speciesGlyph);
              groupList = LayoutList.listOfSpeciesGlyphs;
              return speciesGlyph;
            } else if (elementName.equals("reactionGlyph")
                && groupList.equals(LayoutList.listOfReactionGlyphs)) {
              ListOf<ReactionGlyph> listOfReactionGlyph = (ListOf<ReactionGlyph>) contextObject;
              ReactionGlyph reactionGlyph = (ReactionGlyph) newContextObject;
              setNamespace(listOfReactionGlyph, namespaceURI);
              setNamespace(reactionGlyph, namespaceURI);
              listOfReactionGlyph.add(reactionGlyph);
              groupList = LayoutList.listOfReactionGlyphs;
              return reactionGlyph;
            } else if (elementName.equals("boundingBox")
                && groupList.equals(LayoutList.listOfCompartmentGlyphs)) {
              CompartmentGlyph compartmentGlyph = (CompartmentGlyph) contextObject;
              BoundingBox boundingBox = (BoundingBox) newContextObject;
              setNamespace(boundingBox, namespaceURI);
              compartmentGlyph.setBoundingBox(boundingBox);
              return boundingBox;
            }
          } else if (listOf.getParentSBMLObject() instanceof ReactionGlyph) {
            if (elementName.equals("speciesReferenceGlyph")
                && groupList.equals(LayoutList.listOfSpeciesReferenceGlyphs)) {
              SpeciesReferenceGlyph speciesReferenceGlyph = (SpeciesReferenceGlyph) newContextObject;
              setNamespace(speciesReferenceGlyph, namespaceURI);
              ListOf<SpeciesReferenceGlyph> listOfSpeciesReferenceGlyph = (ListOf<SpeciesReferenceGlyph>) contextObject;
              listOfSpeciesReferenceGlyph
              .add(speciesReferenceGlyph);
              return speciesReferenceGlyph;
            }
          } else if (elementName.equals("curveSegment")
              && groupList.equals(LayoutList.listOfCurveSegments)) {
            ListOf<CurveSegment> listOfLineSegment = (ListOf<CurveSegment>) contextObject;
            CubicBezier lineSegment = (CubicBezier) newContextObject;
            setNamespace(lineSegment, namespaceURI);
            listOfLineSegment.add(lineSegment);
            groupList = LayoutList.listOfCurveSegments;
            return lineSegment;
          } else if (listOf.getParentSBMLObject() instanceof Curve) {

            if (elementName.equals("curveSegment") || elementName.equals("cubicBezier")
                || elementName.equals("lineSegment"))
            {
              ListOf<CurveSegment> listOfLineSegment = (ListOf<CurveSegment>) contextObject;
              CubicBezier lineSegment = (CubicBezier) newContextObject;
              setNamespace(lineSegment, namespaceURI);
              listOfLineSegment.add(lineSegment);
              return lineSegment;
            }
          }

        } else if (contextObject instanceof Layout) {
          Layout layout = (Layout) contextObject;
          groupList = LayoutList.listOfLayouts;
          if (elementName.equals("dimensions")
              && groupList.equals(LayoutList.listOfLayouts)) {
            Dimensions dimensions = (Dimensions) newContextObject;
            setNamespace(dimensions, namespaceURI);
            layout.setDimensions(dimensions);
            return dimensions;
          } else if (elementName.equals("listOfCompartmentGlyphs")
              && groupList.equals(LayoutList.listOfLayouts)) {
            ListOf<CompartmentGlyph> listOfCompartmentGlyphs = (ListOf<CompartmentGlyph>) newContextObject;
            listOfCompartmentGlyphs.setSBaseListType(ListOf.Type.other);
            layout.setListOfCompartmentGlyphs(listOfCompartmentGlyphs);
            groupList = LayoutList.listOfCompartmentGlyphs;
            return listOfCompartmentGlyphs;
          } else if (elementName.equals("listOfSpeciesGlyphs")
              && groupList.equals(LayoutList.listOfLayouts)) {
            ListOf<SpeciesGlyph> listofSpeciesGlyph = (ListOf<SpeciesGlyph>) newContextObject;
            listofSpeciesGlyph.setSBaseListType(ListOf.Type.other);
            layout.setListOfSpeciesGlyphs(listofSpeciesGlyph);
            groupList = LayoutList.listOfSpeciesGlyphs;
            return listofSpeciesGlyph;
          } else if (elementName.equals("listOfReactionGlyphs")
              && groupList.equals(LayoutList.listOfLayouts)) {
            ListOf<ReactionGlyph> listOfReactionGlyphs = (ListOf<ReactionGlyph>) newContextObject;
            listOfReactionGlyphs.setSBaseListType(ListOf.Type.other);
            layout.setListOfReactionGlyphs(listOfReactionGlyphs);
            groupList = LayoutList.listOfReactionGlyphs;
            return listOfReactionGlyphs;
          } else if (elementName.equals("listOfTextGlyphs")
              && groupList.equals(LayoutList.listOfLayouts)) {
            ListOf<TextGlyph> listOfTextGlyphs = (ListOf<TextGlyph>) newContextObject;
            listOfTextGlyphs.setSBaseListType(ListOf.Type.other);
            layout.setListOfTextGlyphs(listOfTextGlyphs);
            groupList = LayoutList.listOfTextGlyphs;
            return listOfTextGlyphs;
          }
        } else if (contextObject instanceof ReactionGlyph) {
          ReactionGlyph reactionGlyph = (ReactionGlyph) contextObject;
          if (elementName.equals("curve")
              && groupList.equals(LayoutList.listOfReactionGlyphs)) {
            Curve curve = (Curve) newContextObject;
            setNamespace(curve, namespaceURI);
            reactionGlyph.setCurve(curve);
            return curve;
          } else if (elementName
              .equals("listOfSpeciesReferenceGlyphs")
              && groupList.equals(LayoutList.listOfReactionGlyphs)) {
            ListOf<SpeciesReferenceGlyph> listOfSpeciesReferenceGlyphs = (ListOf<SpeciesReferenceGlyph>) newContextObject;
            listOfSpeciesReferenceGlyphs.setSBaseListType(ListOf.Type.other);
            reactionGlyph.setListOfSpeciesReferencesGlyph(listOfSpeciesReferenceGlyphs);
            groupList = LayoutList.listOfSpeciesReferenceGlyphs;
            return listOfSpeciesReferenceGlyphs;
          } else if (elementName.equals("boundingBox")) {
            BoundingBox boundingBox = (BoundingBox) newContextObject;
            setNamespace(boundingBox, namespaceURI);
            reactionGlyph.setBoundingBox(boundingBox);
            return boundingBox;
          }
        } else if (contextObject instanceof SpeciesGlyph) {
          SpeciesGlyph speciesGlyph = (SpeciesGlyph) contextObject;
          if (elementName.equals("boundingBox")) {
            BoundingBox boundingBox = (BoundingBox) newContextObject;
            setNamespace(boundingBox, namespaceURI);
            speciesGlyph.setBoundingBox(boundingBox);
            return boundingBox;
          }
        } else if (contextObject instanceof CompartmentGlyph) {
          if (elementName.equals("boundingBox")
              && groupList.equals(LayoutList.listOfCompartmentGlyphs)) {
View Full Code Here

      }
      else if (elementName.equals(compartmentGlyph)) {
        newElement = new CompartmentGlyph();
      }
      else if (elementName.equals(speciesGlyph)) {
        newElement = new SpeciesGlyph();
      }
      else if (elementName.equals(reactionGlyph)) {
        newElement = new ReactionGlyph();
      }
      else if (elementName.equals(textGlyph)) {
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.ext.layout.SpeciesGlyph

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.