Package jSimMacs.data

Examples of jSimMacs.data.ProjectType


    projectTypes = new ArrayList<ProjectType>();
    File projectTypeDir = new File(JSimConstants.PROJECTTYPESPATH);
    if (!projectTypeDir.exists())
      projectTypeDir.mkdir();
    File[] fileList = projectTypeDir.listFiles(new XMLFileFilter());
    ProjectType type = createEmptyProjectType();// new
    // ProjectType(JSimConstants.EMPTYPROJECTSTRING);
    projectTypes.add(type);
    for (int i = 0; i < fileList.length; i++) {
      type = new ProjectType();
      projectTypeIniReader = new XMLSAXReader(fileList[i],
          new ProjectTypeIniHandler(type));
      URL schemaURL = this.getClass().getResource(
          JSimConstants.PROJECTTYPESCHEMAFILE);
      try {
View Full Code Here


  /**
   * Creates the Empty Project Type
   * @return Empty Project type
   */
  private ProjectType createEmptyProjectType() {
    ProjectType type = new ProjectType(JSimConstants.EMPTYPROJECTSTRING);
    type.getCommandData().add(new Pdb2gmxData());
    type.getCommandData().add(new EditconfData());
    type.getCommandData().add(new GenboxData());
    type.getCommandData().add(new SimStepData());
    return type;
  }
View Full Code Here

   * @return object of ProjectType
   * @throws CloneNotSupportedException
   */
  public ProjectType findType(String typeName)
      throws CloneNotSupportedException {
    ProjectType searchKey = new ProjectType(typeName);
    int i = Collections.binarySearch(projectTypes, searchKey);
    if (i >= 0)
      return (ProjectType) projectTypes.get(i).clone();
    return null;
  }
View Full Code Here

   * Creates Default XML File for Projects
   * @param project
   * @param projectFile
   */
  private void createProjectDefaultFile(Project project, File projectFile) {
    ProjectType type;
    try {
      type = findType(JSimConstants.EMPTYPROJECTSTRING);

      project.setType(type);
      IXMLWriter projectWriter = new ProjectSAXWriter(project);
View Full Code Here

   * @param wizard
   * @param project
   */
  public void setUpWizard(JSimRunWizard wizard, Project project) {
    wizard.setProject(project);
    ProjectType type = project.getType();

    for (int i = 0; i < type.getCommandData().size(); ++i) {
      CommandStep cmdStep = type.getCommandData().get(i);
      if (cmdStep instanceof Pdb2gmxData) {
        wizard.addTab(type.getCommandData().get(i).getName(),
            new Pdb2gmxPanel(project, i));
      }
      if (cmdStep instanceof EditconfData) {
        wizard.addTab(type.getCommandData().get(i).getName(),
            new EditconfPanel(project, i));
      }
      if (cmdStep instanceof GenboxData) {
        wizard.addTab(type.getCommandData().get(i).getName(),
            new GenboxPanel(project, i));
      }
      if (cmdStep instanceof SimStepData) {
        wizard.addTab(type.getCommandData().get(i).getName()
            + " grompp", new GromppPanel(project, i));
        wizard.addTab(
            type.getCommandData().get(i).getName() + " mdrun",
            new MdrunPanel(project, i));
      }
    }

  }
View Full Code Here

  public void startElement(String uri, String localName, String name,
      Attributes attributes) throws SAXException {

    if (name.equalsIgnoreCase(XMLConstants.PROJECT)) {
      project.setName(attributes.getValue(XMLConstants.PROJECTTYPENAME));
      ProjectType type = null;
      try {
        type = JSimLogic.getInstance().findType(
            attributes.getValue(XMLConstants.PROJECTATTRIBUTETYPE));
      } catch (CloneNotSupportedException e) {
        throw new SAXException(e);
View Full Code Here

 
  private MdrunData mdrunData;

  public ProjectTypeIniHandler(ProjectType type) {
    if (type == null)
      type = new ProjectType();
    else
      this.type = type;
  }
View Full Code Here

TOP

Related Classes of jSimMacs.data.ProjectType

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.