Package org.sbml.jsbml.ext.groups

Examples of org.sbml.jsbml.ext.groups.GroupsModelPlugin


    if (contextObject instanceof Model) {
      Model model = (Model) contextObject;

      if (elementName.equals("listOfGroups")) {

        GroupsModelPlugin groupModelPlugin = new GroupsModelPlugin(model);
        model.addExtension(GroupsConstants.namespaceURI, groupModelPlugin);

        return groupModelPlugin.getListOfGroups();
      }
    } else if (contextObject instanceof Group) {
      Group group = (Group) contextObject;

      if (elementName.equals("listOfMembers")) {

        return group.getListOfMembers();
      }
      else if (elementName.equals("listOfMemberConstraints")) {

        return group.getListOfMemberConstraints();
      }

    }

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

      if (elementName.equals("group")) {
        Model model = (Model) listOf.getParentSBMLObject();
        GroupsModelPlugin extendeModel = (GroupsModelPlugin) model.getExtension(GroupsConstants.namespaceURI);

        Group group = new Group();
        extendeModel.addGroup(group);

        return group;
      } else if (elementName.equals("member")) {
        Member member = new Member();
        listOf.add(member);
View Full Code Here


  @Override
  public SBasePlugin createPluginFor(SBase sbase) {

    if (sbase != null) {
      if (sbase instanceof Model) {
        return new GroupsModelPlugin((Model) sbase);
      }
    }

    return null;
  }
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.ext.groups.GroupsModelPlugin

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.